View unanswered posts | View active topics It is currently Thu Dec 26, 2024 4:51 pm



Reply to topic  [ 3 posts ] 
 Team of gibs and the thing they gibbed from 
Author Message
User avatar

Joined: Mon Jul 16, 2007 9:50 am
Posts: 1512
Location: Tallahassee, FL
Reply with quote
Post Team of gibs and the thing they gibbed from
So, here's an issue: gibs inheriting the team of the thing they gibbed from. Does this happen automatically, or do I need to figure out how to do it myself?

I'm completely re-designing my chaff grenade. I got it so the grenade itself knows the team of who last held and threw it, but I'm not sure how to handle the actual particles it releases, since they need to be on the same team as well. If the gibs don't inherit the team, then I'll have to figure out some way to communicate the team of the grenade to the particles, which would require them to exist at the same time, which makes things a bit more complex than just "grenade gibs into particles." The particles would have to appear before the grenade goes away.

EDIT: Crud, now that I look at it, my team-finding method doesn't work. Things like TDExplosives and HDFirearms can have functions run on them when they're not being held, but if they're held they're considered like other attachments and CAN'T have functions run on them. Ugh. Still, I think I can figure some way around this (just have the grenade always set to the team of the closest person to it, and hope the closest person is the one who picks it up), so my question still stands.


Thu May 14, 2009 9:14 pm
Profile YIM
REAL AMERICAN HERO
User avatar

Joined: Sat Jan 27, 2007 10:25 pm
Posts: 5655
Reply with quote
Post Re: Team of gibs and the thing they gibbed from
Yeah, data's attachable code is very barely exposed to our manipulations, which is a real shame. No custom wounds just yet.


Thu May 14, 2009 11:50 pm
Profile
User avatar

Joined: Mon Jul 16, 2007 9:50 am
Posts: 1512
Location: Tallahassee, FL
Reply with quote
Post Re: Team of gibs and the thing they gibbed from
Grif wrote:
Yeah, data's attachable code is very barely exposed to our manipulations, which is a real shame. No custom wounds just yet.

Well, as far as "finding the team of the actor currently holding the weapon" goes in order to set the weapon's team, here's my method: In the update function, just have it constantly searching for the closest actor and setting the weapon's team to that actor's team. With any luck, the last team it'll switch to before becoming a Lua-defunct attachment is the team of the actor who picked it up.

There's a chance it could pick up the wrong actor though. But chances are slim.


Fri May 15, 2009 12:10 am
Profile YIM
Display posts from previous:  Sort by  
Reply to topic   [ 3 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.095s | 15 Queries | GZIP : Off ]