Author |
Message |
Thatcher_Samurai
Joined: Tue Mar 29, 2011 5:49 am Posts: 6 Location: *Someplace Witty*
|
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/v5qL78HZAny help with this will be appreciated.
|
Thu Jun 30, 2011 9:03 pm |
|
|
Mehman
Joined: Tue Nov 17, 2009 7:38 pm Posts: 909 Location: France
|
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 |
|
|
Thatcher_Samurai
Joined: Tue Mar 29, 2011 5:49 am Posts: 6 Location: *Someplace Witty*
|
Re: Activate Gib-created Explosives
Where would one place this in relation the the TDExplosive Script?
|
Thu Jun 30, 2011 9:13 pm |
|
|
Mehman
Joined: Tue Nov 17, 2009 7:38 pm Posts: 909 Location: France
|
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 |
|
|
Thatcher_Samurai
Joined: Tue Mar 29, 2011 5:49 am Posts: 6 Location: *Someplace Witty*
|
Re: Activate Gib-created Explosives
Most Excellent. Thanks for your help Mehman!
|
Thu Jun 30, 2011 9:24 pm |
|
|
Mehman
Joined: Tue Nov 17, 2009 7:38 pm Posts: 909 Location: France
|
Re: Activate Gib-created Explosives
Always happy to help.
|
Thu Jun 30, 2011 9:29 pm |
|
|
Thatcher_Samurai
Joined: Tue Mar 29, 2011 5:49 am Posts: 6 Location: *Someplace Witty*
|
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 |
|
|
Mehman
Joined: Tue Nov 17, 2009 7:38 pm Posts: 909 Location: France
|
Re: Activate Gib-created Explosives
Add this to every TDExplosive:
OrientToVel = 1.0
|
Fri Jul 01, 2011 12:59 am |
|
|
Thatcher_Samurai
Joined: Tue Mar 29, 2011 5:49 am Posts: 6 Location: *Someplace Witty*
|
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 |
|
|
Kettenkrad
Joined: Mon Oct 25, 2010 5:51 am Posts: 1198 Location: Sydney
|
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 |
|
|
Mehman
Joined: Tue Nov 17, 2009 7:38 pm Posts: 909 Location: France
|
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 |
|
|
|