Author |
Message |
CaptainPoopface Newbie
Joined: Dec 16 2008 Posts: 17 Offline
|
Posted: Tue Dec 16, 2008 12:25 pm Post subject: Attaching turret with aim and firing commands |
|
|
|
|
I would like to make a fake player that acts as your turret, meaning it flies on your ship and fires independently. I'd like to have commands to:
- tell it how many ticks to rotate clockwise or counterclockwise from current position, or a simpler workaround, tick once CW or CCW.
- make it fire a bomb in the direction it is currently pointing
- spawn/attach, and die/detach
- snap the aiming direction to N, S, E or W (least important feature)
For example,
?attachturret <playername>
?aimnorth
?cw 3 ;;rotate 3 ticks clockwise
?firebomb
?killturret
This doesn't seem too difficult, but I am new to ASSS and haven't coded for a long time. I've played with autoturret.c somewhat, but it is a bit mystifying to me exactly how the code works.
Is this feasible? Can someone point me in the right direction? For example, how to spawn a fake player and make him attach?
Thanks to MineGoBoom and other contributors for making this forum.
|
|
Back to top |
|
|
Samapico No, these DO NOT look like penises, ok?
Joined: May 08 2003 Posts: 1252 Offline
|
Posted: Tue Dec 16, 2008 1:19 pm Post subject: |
|
|
|
|
Hyperspace has this item you can buy they call 'point defense'
It's pretty much exactly what you're asking for, except its rotation speed isn't limited. It also fires bullets automatically on its own, no other ?command involved.
But I'm sure you'd have a nice head start with that. _________________ (Insert a bunch of dead links here)
|
|
Back to top |
|
|
tcsoccerman Server Help Squatter
Age:32 Gender: Joined: Jan 15 2007 Posts: 694 Location: Atlantis Offline
|
Posted: Tue Dec 16, 2008 3:49 pm Post subject: |
|
|
|
|
i've made an module that creates a fakeplayer as a turret. when someone enters a specific region, they control that turret by rotating or shooting guns and bombs.
unfortunately it's closed source for SSCC the CompleX. Maybe when the zone is public i will go open source with it.
|
|
Back to top |
|
|
CaptainPoopface Newbie
Joined: Dec 16 2008 Posts: 17 Offline
|
Posted: Tue Dec 16, 2008 10:52 pm Post subject: |
|
|
|
|
Is the hyperspace point defense code publicly available? I found a post with some HS utility-related things, but they seemed more general (selfpos and kill), not directly related.
|
|
Back to top |
|
|
Samapico No, these DO NOT look like penises, ok?
Joined: May 08 2003 Posts: 1252 Offline
|
Posted: Wed Dec 17, 2008 1:18 am Post subject: |
|
|
|
|
<waits for Brain to answer>
|
|
Back to top |
|
|
Dr Brain Flip-flopping like a wind surfer
Age:38 Gender: Joined: Dec 01 2002 Posts: 3502 Location: Hyperspace Offline
|
Posted: Wed Dec 17, 2008 6:33 am Post subject: |
|
|
|
|
I never bothered releasing it because it's full of bugs that I've never gotten around to fixing.
I've attached it, but remember that there are more than a few bugs in the code. I suggest using it for reference, but not to copy code from it directly. _________________ Hyperspace Owner
Smong> so long as 99% deaths feel lame it will always be hyperspace to me
BEWARE OF BAD CODE!
hs_pointdefense.c - 15.75 KB
File downloaded or viewed 66 time(s)
|
|
Back to top |
|
|
CaptainPoopface Newbie
Joined: Dec 16 2008 Posts: 17 Offline
|
Posted: Thu Dec 18, 2008 1:00 am Post subject: |
|
|
|
|
Thank you for posting. It actually looks fairly intuitive. I saw it in action in Hyperspace and was impressed.
After compiling, I get an error when I try to attach the module:
E <cmod> error in dlsym: ./bin/asss: undefined symbol: MM_hs_pointdefense
What does this mean? And is it compatible with ASSS 1.4.4?
|
|
Back to top |
|
|
Dr Brain Flip-flopping like a wind surfer
Age:38 Gender: Joined: Dec 01 2002 Posts: 3502 Location: Hyperspace Offline
|
Posted: Thu Dec 18, 2008 6:34 am Post subject: |
|
|
|
|
You need to ?insmod whatever:hs_pointdefense, where whatever is the name of the .so or .dll file you compiled it into.
|
|
Back to top |
|
|
anonymously Guest
Offline
|
Posted: Wed Jan 14, 2009 6:36 pm Post subject: |
|
|
|
|
Would anyone be willing to link me to a compiled .so of the pointdefence module?
|
|
Back to top |
|
|
|