You probably want to change the player 2 from all players to player (random integer between 1 and number of players in all players variable) from all players variable, but other than that it looks fine.
Add in a message telling you the number of players in the player group. (Should hopefully be 0 or somethings very wrong)
Edit: LOL I figured out the problem. Player 0 is player 1 from all players. He's the first player in that player group. (Player group indexes are from 1-16, not 0-15) what you'd need is player 2 from all players, or player 1 from all players variable.
Look at the trigger your thing is telling you who Player Winner (your global variable) is, when all you set in the trigger is Winning Player (your local variable). what you need to do is add another line after you set winning player, that sets player winner = winning player.
you set the variable used by the create unit action if you use your command, but you don't set the variable within the trigger. So if you don't make yourself the ghost, it will only spawn the ghost for player 0.
1) I made what is pretty much an exact copy of your opt system into this map to help debug it, and it spawns the units, you'll need to modify/add some of the conditions so that it function like in your map, and also you'll need to deal with the attack disable etc.
2) Right now in your map, if you try to make yourself become the ghost it's not going to spawn properly for because it doesn't know who it's spawning for (look at 3-3 in my map.
hmm, so is it not creating a unit at all, or is it just creating units for the wrong player?, You might want to pick each player and check if it's human or computer, and if it's human add them to the all player variable, instead of setting it to active players.
Could you add a message that says "player inttotext(lv_winning_player) is the winning player" after you set the winning player variable for 3-1 and 3-2?
You are using the wrong condition here, you shuold be using player iteration, not picked player. Also you might want to consider using the pick each player in player group function and using picked player instead of player iteration in your code
According to your code you should be spawning the ghost after 5. Is that happening?
Also according to your code, when you single player test it, it shouldn't run 4 at all.
Does your other trigger that allows you to opt in to become the ghost, set the become ghost variable to false then
This is all I have time for, I'll check again later.
willuwontu #1157
Still alive and kicking, just busy.
My guide to the trigger editor (still a work in progress)
You probably want to change the player 2 from all players to player (random integer between 1 and number of players in all players variable) from all players variable, but other than that it looks fine.
Still alive and kicking, just busy.
My guide to the trigger editor (still a work in progress)
Add in a message telling you the number of players in the player group. (Should hopefully be 0 or somethings very wrong)
Edit: LOL I figured out the problem. Player 0 is player 1 from all players. He's the first player in that player group. (Player group indexes are from 1-16, not 0-15) what you'd need is player 2 from all players, or player 1 from all players variable.
Still alive and kicking, just busy.
My guide to the trigger editor (still a work in progress)
You may want to do an "or" condition, that checks if it's <= 0, or an empty player group
Still alive and kicking, just busy.
My guide to the trigger editor (still a work in progress)
Look at the trigger your thing is telling you who Player Winner (your global variable) is, when all you set in the trigger is Winning Player (your local variable). what you need to do is add another line after you set winning player, that sets player winner = winning player.
Still alive and kicking, just busy.
My guide to the trigger editor (still a work in progress)
you set the variable used by the create unit action if you use your command, but you don't set the variable within the trigger. So if you don't make yourself the ghost, it will only spawn the ghost for player 0.
Still alive and kicking, just busy.
My guide to the trigger editor (still a work in progress)
So a couple of things
1) I made what is pretty much an exact copy of your opt system into this map to help debug it, and it spawns the units, you'll need to modify/add some of the conditions so that it function like in your map, and also you'll need to deal with the attack disable etc.
2) Right now in your map, if you try to make yourself become the ghost it's not going to spawn properly for because it doesn't know who it's spawning for (look at 3-3 in my map.
Still alive and kicking, just busy.
My guide to the trigger editor (still a work in progress)
hmm, so is it not creating a unit at all, or is it just creating units for the wrong player?, You might want to pick each player and check if it's human or computer, and if it's human add them to the all player variable, instead of setting it to active players.
Still alive and kicking, just busy.
My guide to the trigger editor (still a work in progress)
Could you add a message that says "player inttotext(lv_winning_player) is the winning player" after you set the winning player variable for 3-1 and 3-2?
Still alive and kicking, just busy.
My guide to the trigger editor (still a work in progress)
I can point out that that should be referring to the players opt in variable not all player variable.
You are using the wrong condition here, you shuold be using player iteration, not picked player. Also you might want to consider using the pick each player in player group function and using picked player instead of player iteration in your code
According to your code you should be spawning the ghost after 5. Is that happening?
Also according to your code, when you single player test it, it shouldn't run 4 at all.
Does your other trigger that allows you to opt in to become the ghost, set the become ghost variable to false then
This is all I have time for, I'll check again later.
Still alive and kicking, just busy.
My guide to the trigger editor (still a work in progress)