Right now i have a function which picks each player in player group allies of player 1 and returns a variable playerID.
I'm using this as a substitute for Current Player because scII doesn't have it.
my problem is that it seems to work till i use it on some action definitions where the parameter is the player
so i can set a lot of variables for each player and setup the game depending on their choice.
I have another action definition that creates a unit and modifies minerals and it wont execute that.
well how come it works for the if dialog is visible it returns true and executes the hiding of the dialog and setting the mazeisselected Boolean to true?
Because if your the only one testing it at the moment as player 1 with no neutral players ( 0 ) then it will work. But if you add in a neutral player it will try to do all the code to player 0 and not yourself.
However i've made the function (action) of creating the units exactly besides the point of where the unit spawns, linked it to a keypress and it functions without fail.
I assume the Setpoints sets up crucial info for the waves and the spawning of the builder? A picture of those would be nice.
I still can't figure out what the hell you're even asking here. The best I can guess is that it's a single player map and you're trying to get the player number of the human player? If that's the case it's always 1.
Hey guys.
Right now i have a function which picks each player in player group allies of player 1 and returns a variable playerID.
I'm using this as a substitute for Current Player because scII doesn't have it.
my problem is that it seems to work till i use it on some action definitions where the parameter is the player so i can set a lot of variables for each player and setup the game depending on their choice. I have another action definition that creates a unit and modifies minerals and it wont execute that.
Players are just integers. There is no "Player" data type.
are you using picked player as the player value or triggering player?
also some more info on this trigger would be nice (pictures / map file)
I'm just using playerID for a variable name i know that players are just integers.
That's the function that returns the playerID(variable)
These are a few action definitions. The use the parameter playerID in which i use the function getPlayerID to cycle through the allies of player 1.
Ignore this im talking bollocks and making myself look a fool
ive just attached the getplayerid function you've wrote to a debug message and it always pulls the lowest player character.. It doesn't cycle.
well how come it works for the if dialog is visible it returns true and executes the hiding of the dialog and setting the mazeisselected Boolean to true?
@EFoG: Go
Because if your the only one testing it at the moment as player 1 with no neutral players ( 0 ) then it will work. But if you add in a neutral player it will try to do all the code to player 0 and not yourself.
However i've made the function (action) of creating the units exactly besides the point of where the unit spawns, linked it to a keypress and it functions without fail.
I assume the Setpoints sets up crucial info for the waves and the spawning of the builder? A picture of those would be nice.
I still can't figure out what the hell you're even asking here. The best I can guess is that it's a single player map and you're trying to get the player number of the human player? If that's the case it's always 1.
@RileyStarcraft: Go
Are you picking ALL PLAYERS or ACTIVE PLAYERS.
If you just want to pick the human players currently in the map it has to be ACTIVE PLAYERS.
@EFoG: Go
Without looking at it too hard your issue probably lies in the fact that the player index of player 1 is 1, but the first element in an array is 0.
(Player 0 is "Neutral" and player 17 is "Hostile" unless you change that)
If you have a one player map, I highly recomend just making a variable and sticking the player in it...