Setting Variables

Orphen_123

New Member
Reaction score
2
I want a variable that picks all the Human players and adds them to the one Unit Group.

So far I've done that by picking every unit in Region X and adding them to the Variable AllPlayersHuman

But if that specific unit dies and I respawn one. It is no longer in the Unit Group set by the variable.

If I try use the Set Variable Action to make the new unit apart of the Variable, nothing shows up. It doesn't show the Variable I have already created.

How else can I set all Human Players to a Player Group type Variable.
 

Yoshii

New Member
Reaction score
74
How else can I set all Human Players to a Player Group type Variable.

What your asking is odd, first you mention you want to set all human player to a player group then in the other part of your post you are talking about unit.

if you want to put all human player in a group then you can just use
Player Group - Pick each player in (All players) and do (Actions)
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
(Controller of player (Picked player)) == User
Then
Player Group - Add player (Picked player) to Untitled Variable 001
Else
 

Orphen_123

New Member
Reaction score
2
Ok cool that works. I've got all the User players in a 'Player Group'

Now I want to make it so
When any unit owned by anyone of the players in the Player Group I just made enters a region, a trigger goes off.

If I try use 'Unit enterers Region' I need to use a Unit Group variable.




I might have it figured out but I'll see how it goes.
Thanks
 

Yoshii

New Member
Reaction score
74
If I try use 'Unit enterers Region' I need to use a Unit Group variable.




I might have it figured out but I'll see how it goes.
Thanks
no for unit enter region you can use any unit, or a unit already in the map or even a variable (unit) you dont need to use unit group
 

Orphen_123

New Member
Reaction score
2
no for unit enter region you can use any unit, or a unit already in the map or even a variable (unit) you dont need to use unit group

I can do that but not exactly what I want.

Players 1-6 all own 1 Zergling.

I want the trigger to work like:
When a unit from UNITGROUP enters START, LEVEL 1

UNITGROUP being any of the Zerglings.
START being the Region.
LEVEL 1 Being the Trigger.

I know I can select the Zerglings straight off the map.
But if they die and a new one is respawned, it is no longer apart of the group.
 

Yoshii

New Member
Reaction score
74
I can do that but not exactly what I want.

Players 1-6 all own 1 Zergling.

I want the trigger to work like:
When a unit from UNITGROUP enters START, LEVEL 1

UNITGROUP being any of the Zerglings.
START being the Region.
LEVEL 1 Being the Trigger.

I know I can select the Zerglings straight off the map.
But if they die and a new one is respawned, it is no longer apart of the group.
in your re spawn trigger, whenever the unit is recreated, add it to a unit group variable
edit:I see what your trying to do,I can think of a way to do that but its abit more complex than I want let me test
heres, the first thing you need to do is make sure all unit(zerg) are part of the unit group at start, also in your respawn trigger make sure the "created" unit is added to the unit group variable then a trigger
Unit - Any Unit Enters (Region((Point(0.0, 0.0)), 1.0))
Conditions
((Triggering unit) is in Untitled Variable 001) == true
Actions
(enable your LEVEL1 trigger here)
 
Reaction score
54
Going a bit too complicated for what you're doing.
Why not just do:

Trigger:
  • Events
    • Unit - Any Unit Enters (START)
    • Conditions
      • (Controller of player (Owner of (Triggering unit))) == User
    • Actions
      • Run (Level1)
 

Orphen_123

New Member
Reaction score
2
Going a bit too complicated for what you're doing.
Why not just do:

Trigger:
  • Events
    • Unit - Any Unit Enters (START)
    • Conditions
      • (Controller of player (Owner of (Triggering unit))) == User
    • Actions
      • Run (Level1)

Wow...
I think that is exaclty what I want......./facepalm
I just totally forgot about conditions...

I knew it could not of been as complicated as I had it.
/ragequit.

Thank you!
 

Orphen_123

New Member
Reaction score
2
Actually I think I just found a problem with my trigger
Heh.

KK think I just screwed it up, all good.
THANK YOU :D:D:D:D:D:D
 

Yoshii

New Member
Reaction score
74
Going a bit too complicated for what you're doing.
Why not just do:

Trigger:
  • Events
    • Unit - Any Unit Enters (START)
    • Conditions
      • (Controller of player (Owner of (Triggering unit))) == User
    • Actions
      • Run (Level1)

I thought he only wanted to make it work with one type of unit;)
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top