Data Realms Fan Forums http://45.55.195.193/ |
|
Team of gibs and the thing they gibbed from http://45.55.195.193/viewtopic.php?f=73&t=14629 |
Page 1 of 1 |
Author: | Darlos9D [ Thu May 14, 2009 9:14 pm ] |
Post subject: | 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. |
Author: | Grif [ Thu May 14, 2009 11:50 pm ] |
Post subject: | 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. |
Author: | Darlos9D [ Fri May 15, 2009 12:10 am ] |
Post subject: | 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. |
Page 1 of 1 | All times are UTC [ DST ] |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |