Server Help Forum Index Server Help
Community forums for Subgame, ASSS, and bots
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   StatisticsStatistics   RegisterRegister 
 ProfileProfile   Login to check your private messagesLogin to check your private messages   LoginLogin (SSL) 

Server Help | ASSS Wiki (0) | Shanky.com
Creating Fake Turrets

 
Post new topic   Reply to topic Printable version
 View previous topic  Detecting Mines Post :: Post How to get the zone listed?  View next topic  
Author Message
Initrd.gz
Seasoned Helper


Joined: Sep 18 2008
Posts: 134
Location: Over there --->
Offline

PostPosted: Sun Feb 15, 2009 1:22 pm    Post subject: Creating Fake Turrets Reply to topic Reply with quote

I am trying to create a module like hs's pointdefence, but a bit more configurable (eg. Firing repels, bursts). I am looking at hs's pointdefence module, but I am confused about the x and y position, since pointdefence can be un-attached and made to follow the player. So can someone help me with creating a position packet for a turret? I should be able to take it from there.
Back to top
View users profile Send private message Add User to Ignore List AIM Address
Cheese
Wow Cheese is so helpful!


Joined: Mar 18 2007
Posts: 1017
Offline

PostPosted: Sun Feb 15, 2009 4:17 pm    Post subject: Reply to topic Reply with quote

where did you find the pd src?
_________________
SSC Distension Owner
SSCU Trench Wars Developer
Back to top
View users profile Send private message Add User to Ignore List Visit posters website AIM Address
D1st0rt
Miss Directed Wannabe


Age:37
Gender:Gender:Male
Joined: Aug 31 2003
Posts: 2247
Location: Blacksburg, VA
Offline

PostPosted: Sun Feb 15, 2009 5:24 pm    Post subject: Reply to topic Reply with quote

What exactly are you trying to do? If you want it to fire something else, you can just change the weapon (look at addTurret).
_________________

Back to top
View users profile Send private message Add User to Ignore List Visit posters website
Initrd.gz
Seasoned Helper


Joined: Sep 18 2008
Posts: 134
Location: Over there --->
Offline

PostPosted: Sun Feb 15, 2009 5:30 pm    Post subject: Reply to topic Reply with quote

@Cheeze: Someone asked for help on how to create a turret and dr brain gave him the source. Search the forum.

What I am trying to make is a fake player that attaches onto a ship and can fire guns, bombs, bursts, thors, and repels. I want to know how to make the fake attach to a player and rotate.
Back to top
View users profile Send private message Add User to Ignore List AIM Address
CaptainPoopface
Newbie


Joined: Dec 16 2008
Posts: 17
Offline

PostPosted: Sun Feb 15, 2009 6:09 pm    Post subject: Reply to topic Reply with quote

That's exactly what I wanted to know too... Dr. Brain kindly provided his pointdefense source as a reference, but it's intertwined with other Hyperspace modules and not meant to drop directly into ASSS. It's a bit over my head right now to try and implement something similar, even with his code as a guide. He claimed it was buggy as well, although it sure looks good in Hyperspace.


Also look at the funky/autoturret.c for a turret that automatically aims and fires L1 bombs (easy enough to change what it shoots). Wish I could figure out a way to detect projectile collision for it so I could kill it.
Back to top
View users profile Send private message Add User to Ignore List
Initrd.gz
Seasoned Helper


Joined: Sep 18 2008
Posts: 134
Location: Over there --->
Offline

PostPosted: Sun Feb 15, 2009 6:16 pm    Post subject: Reply to topic Reply with quote

CaptainPoopface wrote:
That's exactly what I wanted to know too... Dr. Brain kindly provided his pointdefense source as a reference, but it's intertwined with other Hyperspace modules and not meant to drop directly into ASSS. It's a bit over my head right now to try and implement something similar, even with his code as a guide. He claimed it was buggy as well, although it sure looks good in Hyperspace.

Point defense's usage of hscore is minimal. I will send you mine once I complete it, as you can fire more than guns and bombs, and it will have more settings (eg. make it fire directly in front of you, useful when rushing.)


CaptainPoopface wrote:
Also look at the funky/autoturret.c for a turret that automatically aims and fires L1 bombs (easy enough to change what it shoots). Wish I could figure out a way to detect projectile collision for it so I could kill it.

There's a module called "damage" that allows you to track damage to fake players. Here's the page: http://toktok.sscentral.com/ss-asss.html
Back to top
View users profile Send private message Add User to Ignore List AIM Address
Initrd.gz
Seasoned Helper


Joined: Sep 18 2008
Posts: 134
Location: Over there --->
Offline

PostPosted: Thu Feb 19, 2009 8:15 pm    Post subject: Reply to topic Reply with quote

Soo... Can anyone tell me how to create the turret packets? First, what is the packet? Is it the C2SPosition struct, or is it something different?

I looked in the pd source, and I see that it sends a SimplePacket once when it attaches, but how do you tell it to rotate?
Back to top
View users profile Send private message Add User to Ignore List AIM Address
Samapico
No, these DO NOT look like penises, ok?


Joined: May 08 2003
Posts: 1252
Offline

PostPosted: Thu Feb 19, 2009 9:38 pm    Post subject: Reply to topic Reply with quote

Probably make it send position packets?

Just a guess
_________________
(Insert a bunch of dead links here)
Back to top
View users profile Send private message Add User to Ignore List
Initrd.gz
Seasoned Helper


Joined: Sep 18 2008
Posts: 134
Location: Over there --->
Offline

PostPosted: Thu Feb 19, 2009 10:31 pm    Post subject: Reply to topic Reply with quote

Yeah, thats what PD looks like its doing, but what do I put for the X and Y values? Could I copy off of the attached player?

PD does this for xspeed and yspeed

Code: Show/Hide
   int deltaTime = current_ticks() - data->pos.time;
   int v_x = data->pos.xspeed;
   int v_y = data->pos.yspeed;
   int x = data->pos.x + deltaTime * v_x / 1000;
   int y = data->pos.y + deltaTime * v_y / 1000;

data->pos is the owner's position packet.
Back to top
View users profile Send private message Add User to Ignore List AIM Address
Samapico
No, these DO NOT look like penises, ok?


Joined: May 08 2003
Posts: 1252
Offline

PostPosted: Fri Feb 20, 2009 1:07 am    Post subject: Reply to topic Reply with quote

so that's what it does, it gives the same x/y than the player... because when you detach the PD, it keeps following you

the + deltatime thing is just to put the turret a bit in front of the player (or right on him, if the last known data about the player is a bit old)
Back to top
View users profile Send private message Add User to Ignore List
Initrd.gz
Seasoned Helper


Joined: Sep 18 2008
Posts: 134
Location: Over there --->
Offline

PostPosted: Fri Feb 20, 2009 12:43 pm    Post subject: Reply to topic Reply with quote

Ah, k. I'll just copy that.

I'll let you know if anything else goes wrong.
Back to top
View users profile Send private message Add User to Ignore List AIM Address
Display posts from previous:   
Post new topic   Reply to topic    Server Help Forum Index -> ASSS Questions All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum
View online users | View Statistics | View Ignored List


Software by php BB © php BB Group
Server Load: 253 page(s) served in previous 5 minutes.

phpBB Created this page in 0.454847 seconds : 36 queries executed (93.1%): GZIP compression disabled