Page 1 of 1
Looking for a gadget
Posted: 04 Jan 2011, 00:44
by oksnoop2
I'm pretty sure at one time i saw units that could "sprint". I assume that's a gadget but i can't seem to find it. Anyone still have it or know what i'm talking about?
Re: Looking for a gadget
Posted: 04 Jan 2011, 19:57
by CarRepairer
This is the gadget:
name = "CobButton",
desc = "Easy cob button Creation",
http://trac.caspring.org/browser/trunk/ ... button.lua
+
This is the unit script for the Zipper (no longer in ZK). Zipper's script defines what to do when sprinting and the gadget makes the button.
http://trac.caspring.org/browser/trunk/ ... rmfast.bos
I don't recommend using this. Use LUS instead.
Re: Looking for a gadget
Posted: 04 Jan 2011, 20:50
by bobthedinosaur
now do a version for lus...
Re: Looking for a gadget
Posted: 04 Jan 2011, 20:54
by oksnoop2
What he said..... please?
Re: Looking for a gadget
Posted: 04 Jan 2011, 23:16
by CarRepairer
I was wanting to convert it to LUS eventually. I'll give it a shot.
Re: Looking for a gadget
Posted: 05 Jan 2011, 00:23
by FLOZi
I'm personally not a fan of the cobbuttons gadget.
If you're going to have the Sprint ability for multiple units, what are you intending to implement LUS side?
Re: Looking for a gadget
Posted: 05 Jan 2011, 01:36
by knorke
animation like speeding up movement of legs, wheels etc?
do i understand correctly that
Code: Select all
143 Spring.CallCOBScript(unitID, cmd.endcob, 0)
calls the function in the unit script? (when button is pressed and again when sprint has ended or something)
wouldnt that just have to be replaced with
Code: Select all
env = Spring.UnitScript.GetScriptEnv(unitID)
if (env) then Spring.UnitScript.CallAsUnit(unitID, env.sprintstart) end
Re: Looking for a gadget
Posted: 05 Jan 2011, 16:50
by FLOZi
Yes. Which is why I was wondering what else he'd do LUS side, as otherwise you can use the same gadget but just replace the COB anim call with a LUS one.
Re: Looking for a gadget
Posted: 05 Jan 2011, 17:21
by CarRepairer
Sorry. Replace
CarRepairer wrote:I don't recommend using this. Use LUS instead.
with
CarRepairer should have said wrote:I don't recommend using this gadget as-is. Use a converted version of it that uses LUS instead.
Re: Looking for a gadget
Posted: 02 Mar 2011, 21:29
by oksnoop2