| Author |
Message |
Initrd.gz Seasoned Helper
Joined: Sep 18 2008 Posts: 134 Location: Over there ---> Offline
|
Posted: Sun Feb 15, 2009 1:22 pm Post subject: Creating Fake Turrets |
 |
|
|
|
| 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 |
|
 |
Cheese Wow Cheese is so helpful!

Joined: Mar 18 2007 Posts: 1017 Offline
|
Posted: Sun Feb 15, 2009 4:17 pm Post subject: |
 |
|
|
|
where did you find the pd src? _________________ SSC Distension Owner
SSCU Trench Wars Developer |
|
| Back to top |
|
 |
D1st0rt Miss Directed Wannabe

Age:38 Gender: Joined: Aug 31 2003 Posts: 2247 Location: Blacksburg, VA Offline
|
Posted: Sun Feb 15, 2009 5:24 pm Post subject: |
 |
|
|
|
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 |
|
 |
Initrd.gz Seasoned Helper
Joined: Sep 18 2008 Posts: 134 Location: Over there ---> Offline
|
Posted: Sun Feb 15, 2009 5:30 pm Post subject: |
 |
|
|
|
@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 |
|
 |
CaptainPoopface Newbie

Joined: Dec 16 2008 Posts: 17 Offline
|
Posted: Sun Feb 15, 2009 6:09 pm Post subject: |
 |
|
|
|
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 |
|
 |
Initrd.gz Seasoned Helper
Joined: Sep 18 2008 Posts: 134 Location: Over there ---> Offline
|
Posted: Sun Feb 15, 2009 6:16 pm Post subject: |
 |
|
|
|
| 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 |
|
 |
Initrd.gz Seasoned Helper
Joined: Sep 18 2008 Posts: 134 Location: Over there ---> Offline
|
Posted: Thu Feb 19, 2009 8:15 pm Post subject: |
 |
|
|
|
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 |
|
 |
Samapico No, these DO NOT look like penises, ok?

Joined: May 08 2003 Posts: 1252 Offline
|
Posted: Thu Feb 19, 2009 9:38 pm Post subject: |
 |
|
|
|
Probably make it send position packets?
Just a guess _________________ (Insert a bunch of dead links here) |
|
| Back to top |
|
 |
Initrd.gz Seasoned Helper
Joined: Sep 18 2008 Posts: 134 Location: Over there ---> Offline
|
|
| Back to top |
|
 |
Samapico No, these DO NOT look like penises, ok?

Joined: May 08 2003 Posts: 1252 Offline
|
Posted: Fri Feb 20, 2009 1:07 am Post subject: |
 |
|
|
|
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 |
|
 |
Initrd.gz Seasoned Helper
Joined: Sep 18 2008 Posts: 134 Location: Over there ---> Offline
|
Posted: Fri Feb 20, 2009 12:43 pm Post subject: |
 |
|
|
|
Ah, k. I'll just copy that.
I'll let you know if anything else goes wrong. |
|
| Back to top |
|
 |
|