Spring.Insert/RemoveUnitCmd Unit Exclusivity

Spring.Insert/RemoveUnitCmd Unit Exclusivity

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

Moderator: Moderators

Post Reply
User avatar
REVENGE
Posts: 2382
Joined: 24 Aug 2006, 06:13

Spring.Insert/RemoveUnitCmd Unit Exclusivity

Post by REVENGE »

Ok, say I use RemoveUnitCmd to prevent a player from issuing CMD.MOVE to a certain unit.

But if I select this unit, along with another unit who's CMD.MOVE is not disabled, then every MOVE command I issue to the other unit is carried over to my move disabled unit, essentially allowing it to move again.

Is there anyway to prevent this from happening?
User avatar
Hoi
Posts: 2917
Joined: 13 May 2008, 16:51

Re: Spring.Insert/RemoveUnitCmd Unit Exclusivity

Post by Hoi »

Maybe you could use cmd.stop when the unit gets cmd.move?
User avatar
REVENGE
Posts: 2382
Joined: 24 Aug 2006, 06:13

Re: Spring.Insert/RemoveUnitCmd Unit Exclusivity

Post by REVENGE »

Hmm, but the unit should still be able to move on its own?
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Re: Spring.Insert/RemoveUnitCmd Unit Exclusivity

Post by imbaczek »

Use AllowedCommand for that.
User avatar
REVENGE
Posts: 2382
Joined: 24 Aug 2006, 06:13

Re: Spring.Insert/RemoveUnitCmd Unit Exclusivity

Post by REVENGE »

Ye, thanks to you and KDR.
Post Reply

Return to “Lua Scripts”