View unanswered posts | View active topics It is currently Mon Dec 30, 2024 11:23 pm



Reply to topic  [ 11 posts ] 
 Activate Gib-created Explosives 
Author Message
User avatar

Joined: Tue Mar 29, 2011 5:49 am
Posts: 6
Location: *Someplace Witty*
Reply with quote
Post Activate Gib-created Explosives
I have been trying to create a weapon based on the standard Flak Cannon which acts as a sort of cluster bomb, ie when the TDExplosive reaches the end of it's TriggerDelay or impacts an object it creates another TDExplosive, or set of TDExplosives which then either reaches it's TriggerDelay or impacts an object.

So far I have tried to do so via gibbing, but this creates the TDExplosives as items, which only explode when they impact an object(and not always) and have no TriggerDelay. Making the real question, how can I get the secondary (and possibly tertiary) TDExplosives to spawn activated.

Pastebin of the .ini file: http://pastebin.com/v5qL78HZ

Any help with this will be appreciated.


Thu Jun 30, 2011 9:03 pm
Profile
User avatar

Joined: Tue Nov 17, 2009 7:38 pm
Posts: 909
Location: France
Reply with quote
Post Re: Activate Gib-created Explosives
You could attatch this lua script to the TDExplosive you want activated:

Code:
function Create(self)
   self:Activate();
end


Thu Jun 30, 2011 9:08 pm
Profile
User avatar

Joined: Tue Mar 29, 2011 5:49 am
Posts: 6
Location: *Someplace Witty*
Reply with quote
Post Re: Activate Gib-created Explosives
Where would one place this in relation the the TDExplosive Script?


Thu Jun 30, 2011 9:13 pm
Profile
User avatar

Joined: Tue Nov 17, 2009 7:38 pm
Posts: 909
Location: France
Reply with quote
Post Re: Activate Gib-created Explosives
Create a .lua file with the script I gave you, then add this line to the TDExplosive ini:
ScriptPath = yourmod.rte/PathToTheLuaFile.lua


Thu Jun 30, 2011 9:16 pm
Profile
User avatar

Joined: Tue Mar 29, 2011 5:49 am
Posts: 6
Location: *Someplace Witty*
Reply with quote
Post Re: Activate Gib-created Explosives
Most Excellent. Thanks for your help Mehman!


Thu Jun 30, 2011 9:24 pm
Profile
User avatar

Joined: Tue Nov 17, 2009 7:38 pm
Posts: 909
Location: France
Reply with quote
Post Re: Activate Gib-created Explosives
Always happy to help.


Thu Jun 30, 2011 9:29 pm
Profile
User avatar

Joined: Tue Mar 29, 2011 5:49 am
Posts: 6
Location: *Someplace Witty*
Reply with quote
Post Re: Activate Gib-created Explosives
I have good news and bad news.

Good news: It works! So I took the basic principal and made a chain of 20 flak explosions.

Bad news: It only fires to the right. If the gun is fired to the left (or down/up) it redirects after about 2-4 explosions to the right. I've tried editing the velocity settings but they don't seem to effect it.

Pastebin of the gun: http://pastebin.com/tKfdPsZV
(I have this .ini under a custom faction .rte)

Pastebin of the TDExplosive chain: http://pastebin.com/FBcSS5Jd
(This one only seems to work when it's put under Base.rte and referenced in Base.rte/index.ini)


Fri Jul 01, 2011 12:12 am
Profile
User avatar

Joined: Tue Nov 17, 2009 7:38 pm
Posts: 909
Location: France
Reply with quote
Post Re: Activate Gib-created Explosives
Add this to every TDExplosive:

OrientToVel = 1.0


Fri Jul 01, 2011 12:59 am
Profile
User avatar

Joined: Tue Mar 29, 2011 5:49 am
Posts: 6
Location: *Someplace Witty*
Reply with quote
Post Re: Activate Gib-created Explosives
That made it ricochet off of walls but it still redirects to the right.


Fri Jul 01, 2011 1:48 am
Profile
User avatar

Joined: Mon Oct 25, 2010 5:51 am
Posts: 1198
Location: Sydney
Reply with quote
Post Re: Activate Gib-created Explosives
It's a sequence of Gibbing is it? Is it because the TDExplosives have a limited spread when defined in the Gib?
If it's not the Gibs that are the problem, are you using an AEmitter to fire the first TDExplosive? They can give you a bit of trouble.


Fri Jul 01, 2011 4:40 am
Profile
User avatar

Joined: Tue Nov 17, 2009 7:38 pm
Posts: 909
Location: France
Reply with quote
Post Re: Activate Gib-created Explosives
The limited spread may be the problem, try increasing it to something like 3.14159 with low min and max velocities.


Fri Jul 01, 2011 12:48 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 11 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.036s | 14 Queries | GZIP : Off ]