| Data Realms Fan Forums http://45.55.195.193/ | |
| Turning an actor into a live grenade. http://45.55.195.193/viewtopic.php?f=73&t=27389 | Page 1 of 1 | 
| Author: | Squeegy Mackpy [ Thu Dec 15, 2011 8:38 am ] | 
| Post subject: | Turning an actor into a live grenade. | 
| Here's a damn odd request. I have an actor, I have a grenade, and I want to turn the actor into a live grenade. I figured the best way to do this was: Create the grenade Set it at the position of the actor Delete the actor Light the grenade Now unless there's a better method I'm unaware of, how do I go about activating the grenade? | |
| Author: | Asklar [ Thu Dec 15, 2011 8:43 am ] | 
| Post subject: | Re: Turning an actor into a live grenade. | 
| What? You want to transform the actor into a grenade? Or do you want to make the actor explode as if it was a grenade? Or you want to do both, turn your actor into a grenade and then blow it up? You could make the actor create the grenade on it's function Destroy(self), and make the grenade have a lua script attached to it with a self:Activate() line in the function Create(self). | |
| Author: | Squeegy Mackpy [ Thu Dec 15, 2011 12:44 pm ] | 
| Post subject: | Re: Turning an actor into a live grenade. | 
| Sorry for the ambiguity, I want to keep this out of context so it doesnt spoil the surprise. When an actor gets too close to the object this script is attached to, the actor becomes a live grenade. The actor is gone, and a live grenade is in his place, at his origin. Anyway, you've answered my question already with Activate(). I couldn't find the page on the wiki. I'm pretty sure I can finish the rest by myself. Thanks <3 | |
| Author: | Asklar [ Thu Dec 15, 2011 9:16 pm ] | 
| Post subject: | Re: Turning an actor into a live grenade. | 
| Heh, you are welcome. | |
| Page 1 of 1 | All times are UTC [ DST ] | 
| Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ | |