1 |
Tried
it
out
of
curiosity.
This
is
my
first
experience
with
Lua
(
the
makers
specifically
ask
not
to
write
"LUA",
BTW!)
.
This
doesn't
answer
the
question,
but
maybe
it
will
serve
to
help
someone
avoid
my
mistakes
when
someone
who
knows
how
to
do
this
provides
a
solution.
|
1 |
Tried
it
out
of
curiosity.
This
is
my
first
experience
with
Lua
(
the
makers
specifically
ask
not
to
write
"LUA",
BTW!)
.
This
post
doesn't
answer
the
question,
but
maybe
it
will
serve
to
help
someone
avoid
my
mistakes
when
someone
who
knows
how
to
do
this
provides
a
solution.
|
2 |
\n
|
2 |
\n
|
3 |
I managed to find CMD_PUSH_PULL in LuaRules/Configs/customcmds.h.lua, but it's not there in the working game. Using the integer directly doesn't seem to do anything, but the reason is probably that I can't figure out what to give as parameters (I wanted to make the turret switch to "Pull" the moment it was built). The command at the time I gave up on it looked like this:
|
3 |
I managed to find CMD_PUSH_PULL in LuaRules/Configs/customcmds.h.lua, but it's not there in the working game. Using the integer directly doesn't seem to do anything, but the reason is probably that I can't figure out what to give as parameters (I wanted to make the turret switch to "Pull" the moment it was built). The command at the time I gave up on it looked like this:
|
4 |
{{{Spring.GiveOrderToUnit(unitID, 35666, {3}, 0)}}}
|
4 |
{{{Spring.GiveOrderToUnit(unitID, 35666, {3}, 0)}}}
|
5 |
\n
|
5 |
\n
|
6 |
35666 is CMD_PUSH_PULL, 3 is just a guess: I thought that 1 is probably "default", 2 is "Push", 3 is "Pull". This is most likely nowhere close to what it really is though. I don't know where to look up the parameter(s) for this command, if the command is even at all exposed to widgets.
|
6 |
35666 is CMD_PUSH_PULL, 3 is just a guess: I thought that 1 is probably "default", 2 is "Push", 3 is "Pull". This is most likely nowhere close to what it really is though. I don't know where to look up the parameter(s) for this command, if the command is even at all exposed to widgets.
|