an item that lets you control units?

Arbink

New Member
Reaction score
0
i want to make an item that when u pick it up you get control of certain units and buildings and when you put it down you loose control......i dont know how to do it my guess is triggers......
 

aki15

New Member
Reaction score
5
Yes, you will need triggers:
Trigger:
  • Item
    • Events
    • Unit acquires an item
    • Conditions
    • Hero item manipulating is owned by RED/BLUE/TEAL
    • Actions
    • If/then/else
    • Conditions
    • Item being manipulated is YOUR ITEM
    • Then Actions
    • Change owner of YOUR UNITS to RED/BLUE/TEAL
    • Else



THIS WAS FREEHAND SORRY :p !
 

TomTTT

New Member
Reaction score
44
huh?? i dont understand parts of that

xD yeah it's hard to do it freehand..
Trigger:
  • Ownership
    • Events
      • Unit - A unit Acquires an item
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Item-type of (Item being manipulated)) Equal to ITEM
        • Then - Actions
          • Unit - Change ownership of UNIT to (Owner of (Triggering unit)) and Change color
        • Else - Actions

Pretty simple, if the item is this, then change the ownership, or create a new unit.
UNIT = the unit you want to make the player his.
ITEM = the item that needs to be acquired in order to do the actions.
 

Necrach

You can change this now in User CP.
Reaction score
62
Of course, you'll need at least one other trigger with "Drops item" and maybe when the hero sells it as well, that will remove the control of the units again (change back to neutral?)
 

Ryushi

"I will stand, or I will fall. I will not sit."
Reaction score
59
You could create a unit group and add every unit that would be affected into this unit group. Then use the two following triggers:
Trigger:
  • trigger1
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to "Your Item"
    • Actions
      • Unit Group - Pick every unit in (Units in ("Your Unit Group") and do (Actions)
        • Loop - Actions
          • Unit - Change ownership of (Picked unit) to (Owner of (Triggering unit)) and Change color


Trigger:
  • trigger2
    • Events
      • Unit - A unit Loses an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to "Your Item"
    • Actions
      • Unit Group - Pick every unit in ("Your Unit Group") and do (Actions)
        • Loop - Actions
          • Unit - Change ownership of (Picked unit) to Neutral Passive and Change color
 

Arbink

New Member
Reaction score
0
is it possible for the item to control all of a unit type? it might work better....
 

Ryushi

"I will stand, or I will fall. I will not sit."
Reaction score
59
Pretty much the same way as my other triggers.
Trigger:
  • Trigger
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to Your Item
    • Actions
      • Set TempGroup = (Units in (Playable map area) matching ((Unit-type of (Matching unit)) Equal to Your Unit Type))
      • Unit Group - Pick every unit in TempGroup and do (Actions)
        • Loop - Actions
          • Unit - Change ownership of (Picked unit) to (Owner of (Triggering unit)) and Change color
      • Custom script: call DestroyGroup (udg_TempGroup)


Trigger:
  • Trigger 2
    • Events
      • Unit - A unit Loses an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to Your Item
    • Actions
      • Set TempGroup = (Units in (Playable map area) matching ((Unit-type of (Matching unit)) Equal to Your Unit Type))
      • Unit Group - Pick every unit in TempGroup and do (Actions)
        • Loop - Actions
          • Unit - Change ownership of (Picked unit) to Neutral Passive and Change color
      • Custom script: call DestroyGroup (udg_TempGroup)
 
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