View unanswered posts | View active topics It is currently Sat Apr 27, 2024 11:16 am



Reply to topic  [ 4 posts ] 
 Turning an actor into a live grenade. 
Author Message
User avatar

Joined: Tue Mar 20, 2007 10:16 am
Posts: 186
Location: Australia
Reply with quote
Post 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?


Thu Dec 15, 2011 8:38 am
Profile
Data Realms Elite
Data Realms Elite
User avatar

Joined: Fri Jan 07, 2011 8:01 am
Posts: 6211
Location: In your office, earning your salary.
Reply with quote
Post 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).


Thu Dec 15, 2011 8:43 am
Profile
User avatar

Joined: Tue Mar 20, 2007 10:16 am
Posts: 186
Location: Australia
Reply with quote
Post 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


Thu Dec 15, 2011 12:44 pm
Profile
Data Realms Elite
Data Realms Elite
User avatar

Joined: Fri Jan 07, 2011 8:01 am
Posts: 6211
Location: In your office, earning your salary.
Reply with quote
Post Re: Turning an actor into a live grenade.
Heh, you are welcome.


Thu Dec 15, 2011 9:16 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 4 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.069s | 15 Queries | GZIP : Off ]