I'm using a "Pick each integer from X to Y" trigger so I can use a single trigger to spawn buildings when a player uses an ability to make them. One problem I'm having though is matching the integer to the player using the ability. I want the trigger to run Y times but do nothing unless it matches the triggering player number.
Ideally, I would want it to say something like:
General - Pick each integer from X to Y, and do (Actions)
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
(Picked integer) == (PLAYER NUMBER OF TRIGGERING PLAYER)
Then
blah blah blah
The part I'm having trouble with is comparing the picked integer to the triggering player. Does anyone know how to do this?
Probably just to make it easier to do things like this. Each player is a number, and you can check arrays of stuff such as Minerals[Player], Supply[Player] and X[Player] etc rather than having to get each player number using for loops etc.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
I'm using a "Pick each integer from X to Y" trigger so I can use a single trigger to spawn buildings when a player uses an ability to make them. One problem I'm having though is matching the integer to the player using the ability. I want the trigger to run Y times but do nothing unless it matches the triggering player number.
Ideally, I would want it to say something like:
General - Pick each integer from X to Y, and do (Actions)
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
(Picked integer) == (PLAYER NUMBER OF TRIGGERING PLAYER)
Then
blah blah blah
The part I'm having trouble with is comparing the picked integer to the triggering player. Does anyone know how to do this?
for each K from 1 to playersMax
if K = triggering player
do something on K.
players already are integers :)
@WhiskeeGX: Go
Players are already integers!? I have been making this way harder on myself :D
I just tested and you're right. I can't believe how stupid I was being. Thanks Whiskee!
@Lucavious: Go
In War3 they weren't. They are now though for some reason.
@OneTwoSC: Go
Players being numbers is handy.
@OneTwoSC: Go
Probably just to make it easier to do things like this. Each player is a number, and you can check arrays of stuff such as Minerals[Player], Supply[Player] and X[Player] etc rather than having to get each player number using for loops etc.