View unanswered posts | View active topics It is currently Wed Dec 25, 2024 5:48 pm



Reply to topic  [ 5 posts ] 
 Don't hit own team 
Author Message

Joined: Mon Dec 21, 2015 9:30 am
Posts: 89
Reply with quote
Post Don't hit own team
I have a lua that spawns grenade fragments from a bullet which a gun fires, but I've had this hit the gun itself and members of my own team. Is there any way to avoid this?



This is the code in question. As you can see, I tried to put an IgnoresTeamHits on there, but it has no effect.


Tue Dec 06, 2016 6:21 am
Profile
User avatar

Joined: Mon Oct 11, 2010 1:15 pm
Posts: 594
Location: Finlandia
Reply with quote
Post Re: Don't hit own team
You forgot to assign the team of the spawned particle.


Tue Dec 06, 2016 12:33 pm
Profile

Joined: Mon Dec 21, 2015 9:30 am
Posts: 89
Reply with quote
Post Re: Don't hit own team
4zK wrote:
You forgot to assign the team of the spawned particle.


That's true, I forgot to bring that up. My 5 minutes of intense prowling failed to find any code or function to change a thing's team. How would I go about that?


Tue Dec 06, 2016 3:48 pm
Profile
User avatar

Joined: Tue Jun 12, 2007 11:52 pm
Posts: 13144
Location: Here
Reply with quote
Post Re: Don't hit own team
Effect.Team = self.Team


Tue Dec 06, 2016 5:38 pm
Profile

Joined: Mon Dec 21, 2015 9:30 am
Posts: 89
Reply with quote
Post Re: Don't hit own team
CaveCricket48 wrote:
Effect.Team = self.Team


Thanks a lot, dude! I kinda forgot self still had a team, so I could just copy it over to Effect. I'll go try this right now!


Tue Dec 06, 2016 7:26 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 5 posts ] 

Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.055s | 13 Queries | GZIP : Off ]