Loading...
  OR  Zero-K Name:    Password:   

Post edit history

Help with lua gadgets - Detection target of a shot

To display differences between versions, select one or more edits in the list using checkboxes and click "diff selected"
Post edit history
Date Editor Before After
3/3/2013 8:40:29 AMMYrankxponen before revert after revert
3/3/2013 8:40:07 AMMYrankxponen before revert after revert
3/3/2013 8:39:18 AMMYrankxponen before revert after revert
3/3/2013 8:38:28 AMMYrankxponen before revert after revert
Before After
1 Hi jseah, this example I found in ZKdota: 1 Hi jseah, this example I found in ZKdota:
2 https://code.google.com/p/zero-k/source/browse/trunk/mods/zkdota/scripts/custom_com_recon.lua#378 2 https://code.google.com/p/zero-k/source/browse/trunk/mods/zkdota/scripts/custom_com_recon.lua#378
3 \n 3 \n
4 you use: 4 you use:
5 function script.AimWeapon(num, heading, pitch) end 5 function script.AimWeapon(num, heading, pitch) end
6 \n 6 \n
7 to Allow/Block weapon fire by returning "true" or "false". 7 to Allow/Block weapon fire by returning "true" or "false".
8 and use Spring.GetUnitRulesParam(unitID, tostring(num)) to control them remotely using Gadget. 8 and use Spring.GetUnitRulesParam(unitID, tostring(num)) to control them remotely using Gadget.
9 \n 9 \n
10 There's also: 10 There's also:
11 function script.FireWeapon(num) end 11 function script.FireWeapon(num) end
12 \n 12 \n
13 and 13 and
14 \n 14 \n
15 function script.Shot(num) end 15 function script.Shot(num) end
16 \n 16 \n
17 as event used to trigger shot VFX. 17 as event used to trigger shot VFX.
18 \n 18 \n
19 if this is useful, thanks to N0U 19 if this is useful, give credit to N0U