• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!

Prevent Partial User Control

Status
Not open for further replies.
Level 12
Joined
Sep 4, 2007
Messages
407
I got a map that must partially disable user control. That means the players might be able to control a limited number of units, but most of the units must be controlled only by the AI i'm making. How do I do that?

The units MUST be selectable and MUST belong to the controlling player. Order overlap might be possible, but since i'm using an AI, it must see difference between AI given orders and player given orders.
 
Level 13
Joined
Mar 4, 2009
Messages
1,156
you can stop unit when he is ordered and when you are ordering him with trigger than make it "known"

ORDER_AI = Boolean

TRIGGER ORDER
set ORDER_AI = True
order you unit to ....
set ORDER_AI = False

the trigger that will stop players from controlling a unit must have condition
set ORDER_AI equal to False

btw.if you want to stop unit when he is ordered you can

puse unit
unapuse unit
order triggering unit to stop
-add "issued order not equal to stop" if issued order is with no target

And even better way

make units have rally-point ability and ward classification
-that will disable full control of unit,but he will be selectable
 
Status
Not open for further replies.
Top