gadget:Explosion

gadget:Explosion

Discuss Lua based Spring scripts (LuaUI widgets, mission scripts, gaia scripts, mod-rules scripts, scripted keybindings, etc...)

Moderator: Moderators

Post Reply
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

gadget:Explosion

Post by Argh »

Trying to do some fancy stuff with explosions. Wrote the following code in a Gadget's synced loop:
function gadget:Explosion(weaponID, px, py, pz, ownerID)
Spring.Echo(weaponID, px, py, pz, ownerID)
end
...and it returned nothing. It's like the function isn't even being called. Any idea what I might be doing wrong?
trepan
Former Engine Dev
Posts: 1200
Joined: 17 Nov 2005, 00:52

Re: gadget:Explosion

Post by trepan »

Script.SetWatchWeapon(number weaponDefID, boolean state)
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: gadget:Explosion

Post by Argh »

Not to be more obtuse than usual, but where do I invoke that? Within the Explosion loop, or do I need to use COB-->Lua and set it up when the Unit's created, or is prepping to fire? I take it that watching a weapon must be expensive?
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: gadget:Explosion

Post by Argh »

Nevermind, I've got it. I'll post up some code here in a bit, I've gotten an idea about how to do some interesting stuff.

[EDIT]

Forget "interesting". This may completely change how we do effects with this engine.

[/EDIT]
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Re: gadget:Explosion

Post by KDR_11k »

Yeah, we call that LUPS.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: gadget:Explosion

Post by Argh »

<laughs>

Sorry, but no. It's not LUPS. Not even slightly. Much more useful. Screenshots when I've refined the content a bit.
Post Reply

Return to “Lua Scripts”