Author |
Message |
tcsoccerman Server Help Squatter
Age:31 Gender: Joined: Jan 15 2007 Posts: 694 Location: Atlantis Offline
|
Posted: Thu Jul 24, 2008 9:09 pm Post subject: Sending Weapons Packets |
|
|
|
|
I've searched vigoursly for a topic that explains how to send/create a bullet or bomb packet with no luck. Basically here's what my intentions are:
Create a fake player(Completed).
Create a weapon packet (Completed).
Make it look like that fake player is shooting the weapon packet(Not completed).
I have a feeling that net->SendToOne/Set/Arena() has something to do with this but some examples i've seen use that to kill players (such as hscore->kill module).
Thank you. |
|
Back to top |
|
|
Dr Brain Flip-flopping like a wind surfer
Age:38 Gender: Joined: Dec 01 2002 Posts: 3502 Location: Hyperspace Offline
|
|
Back to top |
|
|
tcsoccerman Server Help Squatter
Age:31 Gender: Joined: Jan 15 2007 Posts: 694 Location: Atlantis Offline
|
Posted: Fri Jul 25, 2008 11:32 pm Post subject: |
|
|
|
|
yes i did and it helped alot. the only thing is i don't want to kill anyone, i just want them to shoot a bullet. hmmm it's making sense now. i would just not place the weapon packet in a position to kill.
now if i want the weapon packet to be seen/affected by the whole arena would i do SendToArena though.
and do i have to put the packets in a loop like i do for the position packet on my turrets.
ty for helping. |
|
Back to top |
|
|
Bak ?ls -s 0 in
Age:24 Gender: Joined: Jun 11 2004 Posts: 1826 Location: USA Offline
|
|
Back to top |
|
|
tcsoccerman Server Help Squatter
Age:31 Gender: Joined: Jan 15 2007 Posts: 694 Location: Atlantis Offline
|
Posted: Sat Jul 26, 2008 8:45 am Post subject: |
|
|
|
|
no, i just didn't know if i needed to update the weapons packet or it would "dissapear". |
|
Back to top |
|
|
tcsoccerman Server Help Squatter
Age:31 Gender: Joined: Jan 15 2007 Posts: 694 Location: Atlantis Offline
|
Posted: Sat Jul 26, 2008 7:56 pm Post subject: |
|
|
|
|
alright i got it all working. the problem before was i was accidently making me an exception in sendtoarena so i wasn't seeing anything.
now the thing is whenever the weapon packet is sent, the playerid in the struct gets warped too the location (x and y in the struct) of the weapon packet location. i don't want that but i do want the playerid of the struct to get the kill reward. is their a fix for this? |
|
Back to top |
|
|
Dr Brain Flip-flopping like a wind surfer
Age:38 Gender: Joined: Dec 01 2002 Posts: 3502 Location: Hyperspace Offline
|
Posted: Sat Jul 26, 2008 11:14 pm Post subject: |
|
|
|
|
If you send a packet to the player, they'll warp. Your choice is to not send them the weapon, or to warp them.
To not send it to them, there's an argument for net->SendToArena that needs to be the player you *don't* want it sent to. It's probably NULL at the moment. Look at the documentation in net.h. |
|
Back to top |
|
|
tcsoccerman Server Help Squatter
Age:31 Gender: Joined: Jan 15 2007 Posts: 694 Location: Atlantis Offline
|
Posted: Sun Jul 27, 2008 12:06 pm Post subject: |
|
|
|
|
but then they don't see it, that's the problem. they also change ships, for some reason(when they warp).
so if they have to warp or not see the weapon, bots can now do something asss can't.
also, do fake players have pid's? what if i set it to -1? |
|
Back to top |
|
|
Dr Brain Flip-flopping like a wind surfer
Age:38 Gender: Joined: Dec 01 2002 Posts: 3502 Location: Hyperspace Offline
|
Posted: Sun Jul 27, 2008 12:46 pm Post subject: |
|
|
|
|
tcsoccerman wrote: | but then they don't see it, that's the problem. they also change ships, for some reason(when they warp). |
I now have no idea what you're talking about.
tcsoccerman wrote: | so if they have to warp or not see the weapon, bots can now do something asss can't. |
Don't take your buggy module to mean no one else can do it.
tcsoccerman wrote: | also, do fake players have pid's? what if i set it to -1? |
Yes. Setting it to -1 will have odd results. |
|
Back to top |
|
|
tcsoccerman Server Help Squatter
Age:31 Gender: Joined: Jan 15 2007 Posts: 694 Location: Atlantis Offline
|
Posted: Sun Jul 27, 2008 1:12 pm Post subject: |
|
|
|
|
sorry,
I did get it to work by setting the weapon packets pid to the fakeplayer's pid. sorry for making any offensive assumptions doc. your post before that mis-made me think that it was not possible in asss.
thanks for all you're help. |
|
Back to top |
|
|
Dr Brain Flip-flopping like a wind surfer
Age:38 Gender: Joined: Dec 01 2002 Posts: 3502 Location: Hyperspace Offline
|
Posted: Sun Jul 27, 2008 2:34 pm Post subject: |
|
|
|
|
Glad you got it resolved. Everything in SS uses pids, so you really have to make sure you get them correctly set, especially if you ever do any work with the attach packets. |
|
Back to top |
|
|
hellzlaker Registered Cap Buster Popping men in the ass since Oct 2005
Gender: NEVER ENOUGH! Joined: Oct 27 2005 Posts: 34 Offline
|
Posted: Sun Jul 27, 2008 2:57 pm Post subject: |
|
|
|
|
hm this is a bit offtopic, but tcsoccerman is halo going to be ASSS since i see you working on different modules :\ |
|
Back to top |
|
|
tcsoccerman Server Help Squatter
Age:31 Gender: Joined: Jan 15 2007 Posts: 694 Location: Atlantis Offline
|
Posted: Sun Jul 27, 2008 8:52 pm Post subject: |
|
|
|
|
you're assuming this isn't for halo. yes, it's for a different zone but will quite possibly be used in halo after a few changes. |
|
Back to top |
|
|
hellzlaker Registered Cap Buster Popping men in the ass since Oct 2005
Gender: NEVER ENOUGH! Joined: Oct 27 2005 Posts: 34 Offline
|
Posted: Sun Jul 27, 2008 11:37 pm Post subject: |
|
|
|
|
This isn't what i meant I was just asking if halo was ASSS or SubGame, and i meant to say "i think its ASSS because your working on modules instead of bots" |
|
Back to top |
|
|
tcsoccerman Server Help Squatter
Age:31 Gender: Joined: Jan 15 2007 Posts: 694 Location: Atlantis Offline
|
Posted: Mon Jul 28, 2008 9:20 am Post subject: |
|
|
|
|
yes this is asss. that's why it's in asss custom projects forum. |
|
Back to top |
|
|
tcsoccerman Server Help Squatter
Age:31 Gender: Joined: Jan 15 2007 Posts: 694 Location: Atlantis Offline
|
|
Back to top |
|
|
Dr Brain Flip-flopping like a wind surfer
Age:38 Gender: Joined: Dec 01 2002 Posts: 3502 Location: Hyperspace Offline
|
Posted: Tue Aug 05, 2008 7:57 am Post subject: |
|
|
|
|
In the settings, bombs have fixed bomb speeds. If you need to send a bomb at a specific speed, make the player travel that fast minus the bomb speed. |
|
Back to top |
|
|
tcsoccerman Server Help Squatter
Age:31 Gender: Joined: Jan 15 2007 Posts: 694 Location: Atlantis Offline
|
Posted: Tue Aug 05, 2008 4:10 pm Post subject: |
|
|
|
|
is it possible to send a bomb at any speed without moving the player?
it seems whenever i set packet.x/yspeed to anything those values are applied onto the player with pid of packet.pid, and whenever i do not set those values, the bombs turn into mines and don't move.
thank you. |
|
Back to top |
|
|
Dr Brain Flip-flopping like a wind surfer
Age:38 Gender: Joined: Dec 01 2002 Posts: 3502 Location: Hyperspace Offline
|
Posted: Tue Aug 05, 2008 5:43 pm Post subject: |
|
|
|
|
No. |
|
Back to top |
|
|
|