Data Realms Fan Forums http://45.55.195.193/ |
|
Creating Exploding Explosives that Explode from Explosives http://45.55.195.193/viewtopic.php?f=1&t=28517 |
Page 1 of 1 |
Author: | ryry1237 [ Wed Dec 28, 2011 11:51 am ] |
Post subject: | Creating Exploding Explosives that Explode from Explosives |
So my goal for modding right now is to make an explosive that explodes into multiple other explosives which then explode themselves after a timed delay. I've been able to get most of the things right, but I can't seem to make the explosives that come from the explosive explode via time and not impulse. In Cortex Command speech, I want to create a TDExplosive that gibs into more TDExplosives, and I want the gibbed TDExplosives to gib themselves after a time delay (and not via impulse like the shrapnel explosives that come out from the coalition artillery cannon thingy). TriggerDelay doesn't seem to work for gibbed particles, so I'm not sure how else I should tackle this problem. |
Author: | Arcalane [ Wed Dec 28, 2011 11:58 am ] |
Post subject: | Re: Creating Exploding Explosives that Explode from Explosives |
Your best bet is probably having the submunitions as AEmitters (TDExplosives would show the pickup display, no?), with a short script attached, something like this; Code: function Create(self) self.lifeTimer = Timer(); end function Update(self) if self.lifeTimer:IsPastSimMS(2500) then self:GibThis(); end end This starts a timer when the submunition is spawned, and when it exceeds the value inside IsPastSimMS' brackets in milliseconds, the submunition explodes. |
Author: | The Chairman [ Wed Dec 28, 2011 12:00 pm ] |
Post subject: | Re: Creating Exploding Explosives that Explode from Explosives |
Use a .lua script: Code: function Create(self) self.timer = Timer() end function Update(self) if self.timer:IsPastSimMS(200) then -- if 200 milliseconds have elapsed then... self:GibThis() -- ...Gib! end end I didn't test it, but it should work. Edit: Ninja'd |
Author: | ryry1237 [ Wed Dec 28, 2011 5:32 pm ] |
Post subject: | Re: Creating Exploding Explosives that Explode from Explosives |
Thanks for the replies! Sorry for nooby question, but do you mean I put the script on the AEmitter or the secondary TDExplosive? edit: I assume its both, one to manually gib the AEmitter and one to gib the explosive? I don't recall there being any way to time gib AEmitters using only .ini stuff, but I could be wrong. edit2: I tried to use the code to gib the AEmitter, but it's not gibbing. Not sure what's going on here... |
Author: | Arcalane [ Wed Dec 28, 2011 9:28 pm ] |
Post subject: | Re: Creating Exploding Explosives that Explode from Explosives |
Ah, my bad, I meant MOSRotating instead of AEmitter. Whoops. ![]() Okay so the grenade (I assume it's a cluster grenade of some kind) is a TDExplosive that creates the MOSRotatings when it goes off. Doesn't need the timer script. That's for the MOSRotatings. |
Author: | Gotcha! [ Wed Dec 28, 2011 9:55 pm ] |
Post subject: | Re: Creating Exploding Explosives that Explode from Explosives |
*reads title* |
Author: | ryry1237 [ Thu Dec 29, 2011 2:00 am ] |
Post subject: | Re: Creating Exploding Explosives that Explode from Explosives |
Arcalane wrote: Ah, my bad, I meant MOSRotating instead of AEmitter. Whoops. ![]() Okay so the grenade (I assume it's a cluster grenade of some kind) is a TDExplosive that creates the MOSRotatings when it goes off. Doesn't need the timer script. That's for the MOSRotatings. Ah, alright I'll try that again. Gotcha! wrote: *reads title* ![]() edit: It works! btw I'm making a flak cannon like device that fires out an explosive which splits up into smaller explosives mid air which each explode again (basically cluster fireworks except with 25 kg shrapnel pieces that can tear up armored craft) |
Page 1 of 1 | All times are UTC [ DST ] |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |