Uncontrollable player owned units

Bethezard

New Member
Reaction score
0
Hey,
How to make units owned by player, without player being able to control them. The same as in "Castle Fight", when unit buildings spawn a unit and it is purely controlled by AI/script, and player can't order anything, its just titled with player name above, but player can't neither select them in group, neither see any actions.
 

GFreak45

I didnt slap you, i high 5'd your face.
Reaction score
130
ward setting... unit classifications->ward->true
 

GFreak45

I didnt slap you, i high 5'd your face.
Reaction score
130
what that will do is remove the attack/stop/move/patrol/cast buttons and stop the unit from being selected via dragging a selection square. It can still be controlled via selecting it and ordering it explicitly to do things, however you can prevent this via triggers (event that a unit is ordered to do something)
 

Bethezard

New Member
Reaction score
0
Yes, ward setting works.
But, can you please be more specific, what trigger should I use, to prevent human control of units, without interfering their active order? I can't find an action, that would allow issue an order original order targeting original target.
Only idea left - when unit is produced, add unit to unit group variable, that combines all units with same order/target, and when player tries to issue new order, just search if ordered unit is within "unit group" and override order, depending on the group, it is in.
 

KaerfNomekop

Swim, fishies. Swim through the veil of steel.
Reaction score
613
Trigger:
  • Initialization
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Hashtable - Create a hashtable
      • Set Hashtable = (Last created hashtable)

Trigger:
  • Training Complete
    • Events
      • Unit - A unit Finishes training a unit
    • Conditions
    • Actions
      • Hashtable - Save Handle Of(Rally-Point of (Triggering unit) as a point) as (Key TargetPoint) of (Key (Trained unit)) in Hashtable
      • Set TempPoint = (Rally-Point of (Triggering unit) as a point)
      • Unit - Order (Trained unit) to Attack-Move To TempPoint
      • Custom script: call RemoveLocation (udg_TempPoint)
      • Trigger - Add to Reorder <gen> the event (Unit - (Trained unit) Is issued an order targeting an object)
      • Trigger - Add to Reorder <gen> the event (Unit - (Trained unit) Is issued an order targeting a point)
      • Trigger - Add to Reorder <gen> the event (Unit - (Trained unit) Is issued an order with no target)

Trigger:
  • Reorder
    • Events
    • Conditions
    • Actions
      • Trigger - Turn off (This trigger)
      • Unit - Order (Triggering unit) to Attack-Move To (Load (Key TargetPoint) of (Key (Triggering unit)) in Hashtable)
      • Trigger - Turn on (This trigger)

Trigger:
  • Removal
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
    • Hashtable - Clear all child hashtables of child (Key (Triggering unit)) in Hashtable

This set of triggers ought to work.
 

Amn

Member
Reaction score
18
Hey,
How to make units owned by player, without player being able to control them. The same as in "Castle Fight", when unit buildings spawn a unit and it is purely controlled by AI/script, and player can't order anything, its just titled with player name above, but player can't neither select them in group, neither see any actions.
that sounds like a locusted unit. unselectable, no group, no orders.
 

GFreak45

I didnt slap you, i high 5'd your face.
Reaction score
130
thats not what he was meaning, more that it cant be controlled by the players, but it can be controlled by the computer (including attacking) which locusted units cant do unless they are spawned from the locust ability
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top