View unanswered posts | View active topics It is currently Tue Jul 23, 2019 12:33 pm



Reply to topic  [ 3 posts ] 
 Activating grenade through lua? 
Author Message
User avatar

Joined: Wed May 20, 2009 3:10 pm
Posts: 366
Location: Århus, Denmark
Reply with quote
Post Activating grenade through lua?
the self:Activate() doesn't seem to work on grenades.

I have a scenario where I have a grenade that isn't held by any actors which I want to activate as if thrown. Just gibing it won't be the solution as it needs to work on all grenade types.

Help?


Fri Oct 07, 2011 6:35 am
Profile
User avatar

Joined: Tue Nov 17, 2009 7:38 pm
Posts: 909
Location: France
Reply with quote
Post Re: Activating grenade through lua?
That's wierd, I used Activate() several times on TDExplosives and it worked, you should check if the script is executed.

Edit: The vanilla grenades aren't simple TDExplosives anymore in b26: they activate properly only when thrown, but you can either make your own grenade the old fashioned way(like they used to be in the older builds: a simple TDExplosive that actually explodes instead of being replaced by an exploding one when thrown) or get one from an older build, Activate() should then work properly.


Fri Oct 07, 2011 9:09 am
Profile
User avatar

Joined: Wed May 20, 2009 3:10 pm
Posts: 366
Location: Århus, Denmark
Reply with quote
Post Re: Activating grenade through lua?
Got it working using ToTDExplosive(self.grenade):Activate() :)


Fri Oct 07, 2011 5:48 pm
Profile
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:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.016s | 13 Queries | GZIP : Off ]