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
Attaching turret with aim and firing commands

 
Post new topic   Reply to topic Printable version
 View previous topic  <c> drone Post :: Post Python Module  View next topic  
Author Message
CaptainPoopface
Newbie


Joined: Dec 16 2008
Posts: 17
Offline

PostPosted: Tue Dec 16, 2008 12:25 pm    Post subject: Attaching turret with aim and firing commands Reply to topic Reply with quote

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
View users profile Send private message Add User to Ignore List
Samapico
No, these DO NOT look like penises, ok?


Joined: May 08 2003
Posts: 1252
Offline

PostPosted: Tue Dec 16, 2008 1:19 pm    Post subject: Reply to topic Reply with quote

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
View users profile Send private message Add User to Ignore List
tcsoccerman
Server Help Squatter


Age:31
Gender:Gender:Male
Joined: Jan 15 2007
Posts: 694
Location: Atlantis
Offline

PostPosted: Tue Dec 16, 2008 3:49 pm    Post subject: Reply to topic Reply with quote

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
View users profile Send private message Add User to Ignore List Send email AIM Address
CaptainPoopface
Newbie


Joined: Dec 16 2008
Posts: 17
Offline

PostPosted: Tue Dec 16, 2008 10:52 pm    Post subject: Reply to topic Reply with quote

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
View users profile Send private message Add User to Ignore List
Samapico
No, these DO NOT look like penises, ok?


Joined: May 08 2003
Posts: 1252
Offline

PostPosted: Wed Dec 17, 2008 1:18 am    Post subject: Reply to topic Reply with quote

<waits for Brain to answer>
Back to top
View users profile Send private message Add User to Ignore List
Dr Brain
Flip-flopping like a wind surfer


Age:38
Gender:Gender:Male
Joined: Dec 01 2002
Posts: 3502
Location: Hyperspace
Offline

PostPosted: Wed Dec 17, 2008 6:33 am    Post subject: Reply to topic Reply with quote

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 65 time(s)
Back to top
View users profile Send private message Add User to Ignore List AIM Address Yahoo Messenger MSN Messenger
CaptainPoopface
Newbie


Joined: Dec 16 2008
Posts: 17
Offline

PostPosted: Thu Dec 18, 2008 1:00 am    Post subject: Reply to topic Reply with quote

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
View users profile Send private message Add User to Ignore List
Dr Brain
Flip-flopping like a wind surfer


Age:38
Gender:Gender:Male
Joined: Dec 01 2002
Posts: 3502
Location: Hyperspace
Offline

PostPosted: Thu Dec 18, 2008 6:34 am    Post subject: Reply to topic Reply with quote

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
View users profile Send private message Add User to Ignore List AIM Address Yahoo Messenger MSN Messenger
anonymously
Guest


Offline

PostPosted: Wed Jan 14, 2009 6:36 pm    Post subject: Reply to topic Reply with quote

Would anyone be willing to link me to a compiled .so of the pointdefence module?
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Server Help Forum Index -> ASSS Custom Projects 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: 632 page(s) served in previous 5 minutes.

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