| 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
|