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
Sending Weapons Packets

 
Post new topic   Reply to topic Printable version
 View previous topic  Fuschia Post :: Post We need 2 modules.  View next topic  
Author Message
tcsoccerman
Server Help Squatter


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

PostPosted: Thu Jul 24, 2008 9:09 pm    Post subject: Sending Weapons Packets Reply to topic Reply with quote

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


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

PostPosted: Fri Jul 25, 2008 9:16 pm    Post subject: Reply to topic Reply with quote

Look at my kill module: http://forums.minegoboom.com/viewtopic.php?t=8092
_________________
Hyperspace Owner

Smong> so long as 99% deaths feel lame it will always be hyperspace to me
Back to top
View users profile Send private message Add User to Ignore List AIM Address Yahoo Messenger MSN Messenger
tcsoccerman
Server Help Squatter


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

PostPosted: Fri Jul 25, 2008 11:32 pm    Post subject: Reply to topic Reply with quote

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
View users profile Send private message Add User to Ignore List Send email AIM Address
Bak
?ls -s
0 in


Age:24
Gender:Gender:Male
Joined: Jun 11 2004
Posts: 1826
Location: USA
Offline

PostPosted: Sat Jul 26, 2008 2:08 am    Post subject: Reply to topic Reply with quote

do you want to send the weapon packet more than once?
_________________
SubSpace Discretion: A Third Generation SubSpace Client
Back to top
View users profile Send private message Add User to Ignore List AIM Address
tcsoccerman
Server Help Squatter


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

PostPosted: Sat Jul 26, 2008 8:45 am    Post subject: Reply to topic Reply with quote

no, i just didn't know if i needed to update the weapons packet or it would "dissapear".
Back to top
View users profile Send private message Add User to Ignore List Send email AIM Address
tcsoccerman
Server Help Squatter


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

PostPosted: Sat Jul 26, 2008 7:56 pm    Post subject: Reply to topic Reply with quote

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


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

PostPosted: Sat Jul 26, 2008 11:14 pm    Post subject: Reply to topic Reply with quote

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


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

PostPosted: Sun Jul 27, 2008 12:06 pm    Post subject: Reply to topic Reply with quote

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


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

PostPosted: Sun Jul 27, 2008 12:46 pm    Post subject: Reply to topic Reply with quote

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


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

PostPosted: Sun Jul 27, 2008 1:12 pm    Post subject: Reply to topic Reply with quote

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


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

PostPosted: Sun Jul 27, 2008 2:34 pm    Post subject: Reply to topic Reply with quote

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
View users profile Send private message Add User to Ignore List AIM Address Yahoo Messenger MSN Messenger
hellzlaker
Registered Cap Buster
Popping men in the ass since Oct 2005


Gender: NEVER ENOUGH!
Joined: Oct 27 2005
Posts: 34
Offline

PostPosted: Sun Jul 27, 2008 2:57 pm    Post subject: Reply to topic Reply with quote

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


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

PostPosted: Sun Jul 27, 2008 8:52 pm    Post subject: Reply to topic Reply with quote

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
View users profile Send private message Add User to Ignore List Send email AIM Address
hellzlaker
Registered Cap Buster
Popping men in the ass since Oct 2005


Gender: NEVER ENOUGH!
Joined: Oct 27 2005
Posts: 34
Offline

PostPosted: Sun Jul 27, 2008 11:37 pm    Post subject: Reply to topic Reply with quote

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


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

PostPosted: Mon Jul 28, 2008 9:20 am    Post subject: Reply to topic Reply with quote

yes this is asss. that's why it's in asss custom projects forum.
Back to top
View users profile Send private message Add User to Ignore List Send email AIM Address
tcsoccerman
Server Help Squatter


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

PostPosted: Mon Aug 04, 2008 3:30 pm    Post subject: Reply to topic Reply with quote

as far as bombs go, i'm trying to set a velocity to the weapons packet but the pid is being velocitized not the bomb. why is this?

Code: Show/Hide

void FireWeapon(struct TurretData *td, int type, int level)
{
     chat->SendArenaMessage(td->arena, "Creating Weapon Data");
     
     struct S2CWeapons packet;
     
    packet.type = S2C_WEAPON; /* 0x05 */
    packet.rotation = td->FakePlayer->position.rotation;
    packet.time = 500;
    packet.x = td->FakePlayer->position.x;
    packet.yspeed = -500;
    packet.playerid = td->FakePlayer->pid;
    packet.xspeed = -600;
    packet.checksum = 0;
    //u8 status = STATUS_STEALTH | STATUS_CLOAK | STATUS_UFO;
    packet.c2slatency = 0;
    packet.y = td->FakePlayer->position.y;
    packet.bounty = 0;
   
    packet.weapon.type = type;
    packet.weapon.shrapbouncing = 1;
    packet.weapon.shraplevel = 2;
    packet.weapon.shrap = 31;
    packet.weapon.alternate = 1;
     packet.weapon.level = level;
     
     Player *p;//null player to except
     
     net->SendToArena(td->arena, td->FakePlayer, (byte*)&packet, sizeof(struct S2CWeapons) - sizeof(struct ExtraPosData), NET_RELIABLE);
}
Back to top
View users profile Send private message Add User to Ignore List Send email AIM Address
Dr Brain
Flip-flopping like a wind surfer


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

PostPosted: Tue Aug 05, 2008 7:57 am    Post subject: Reply to topic Reply with quote

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


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

PostPosted: Tue Aug 05, 2008 4:10 pm    Post subject: Reply to topic Reply with quote

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


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

PostPosted: Tue Aug 05, 2008 5:43 pm    Post subject: Reply to topic Reply with quote

No.
Back to top
View users profile Send private message Add User to Ignore List AIM Address Yahoo Messenger MSN Messenger
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: 631 page(s) served in previous 5 minutes.

phpBB Created this page in 0.543529 seconds : 44 queries executed (78.8%): GZIP compression disabled