I've been working on my first map with the SC2 editor for over a week now and have some questions:
1) I am trying to run a trigger after all the players in the game choose their hero. What is the event that I use to run the trigger? I tried using the "generic event" action and event, but it doesn't seem to work. There doesn't seem to be an event for the changing of a variable either.
2) Regarding the above point, I want to only run the trigger when all active players have chosen a hero. Is this condition supposed to work?
"Number of players in (active Players) == (variable that contains # of players who selected)
3) I want to run a trigger if a certain region has no units of player 1,2,3 and has units for player 4,5,6. Is this the correct way to set it up?
Event:
(Triggering unit) enters (triggering region)
Conditions:
(Triggering region) == XXX
Or (triggering player==4, triggering player==5, triggering player==6)
Count of Any units in (triggering region) owned by player 1 matching Excluded: Missile, Dead, Hidden, with at most any amount)==0
Count of Any units in (triggering region) owned by player 2 matching Excluded: Missile, Dead, Hidden, with at most any amount)==0
Count of Any units in (triggering region) owned by player 3 matching Excluded: Missile, Dead, Hidden, with at most any amount)==0
4) How do I debug the value of a variable ingame? I can't see how to debug message the value of the variable. I also read somewhere there is a debug menu if you press tilda (~) but it doesn't seem to work for me.
1. I assume your hero selection triggers use a Dialog Item Is Used event that then sets/adds an integer variable for each user player which is then used by an If Then Else action to determine if everyone has picked a hero. Use a Run Trigger action in the pervious trigger to use your next trigger since that can be used to run triggers with no events.
2. Yeah that should work unless there is a dropper who selected then dropped. You will need another variable which is a Boolean array that is set by a For Each Player loop where an If Then Else action is used to determine the triggering player vs the integer variable used by the loop and then sets the array of the player integer to true. You then have a second trigger that has a Player Leaves Game event that compares the player has voted array and removes a number from the vote count variable if the leaving player had voted.
3. You could just set your region as xxx in the event.
4. You can use a Text Message action that uses some conversion functions to get the value of a variable. Under the File menu is the Preferences window. Go to the Test Document tab and enable the Show Trigger Debugging Window option. You can then see the value of all local and global variables. Note you cannot scroll between options in the debug window and need to use the keyboard arrows to go through the menus.
Rollback Post to RevisionRollBack
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
Hi,
I've been working on my first map with the SC2 editor for over a week now and have some questions:
1) I am trying to run a trigger after all the players in the game choose their hero. What is the event that I use to run the trigger? I tried using the "generic event" action and event, but it doesn't seem to work. There doesn't seem to be an event for the changing of a variable either.
2) Regarding the above point, I want to only run the trigger when all active players have chosen a hero. Is this condition supposed to work?
"Number of players in (active Players) == (variable that contains # of players who selected)
3) I want to run a trigger if a certain region has no units of player 1,2,3 and has units for player 4,5,6. Is this the correct way to set it up?
Event:
(Triggering unit) enters (triggering region)
Conditions:
(Triggering region) == XXX
Or (triggering player==4, triggering player==5, triggering player==6)
Count of Any units in (triggering region) owned by player 1 matching Excluded: Missile, Dead, Hidden, with at most any amount)==0
Count of Any units in (triggering region) owned by player 2 matching Excluded: Missile, Dead, Hidden, with at most any amount)==0
Count of Any units in (triggering region) owned by player 3 matching Excluded: Missile, Dead, Hidden, with at most any amount)==0
4) How do I debug the value of a variable ingame? I can't see how to debug message the value of the variable. I also read somewhere there is a debug menu if you press tilda (~) but it doesn't seem to work for me.
Thanks!
1. I assume your hero selection triggers use a Dialog Item Is Used event that then sets/adds an integer variable for each user player which is then used by an If Then Else action to determine if everyone has picked a hero. Use a Run Trigger action in the pervious trigger to use your next trigger since that can be used to run triggers with no events.
2. Yeah that should work unless there is a dropper who selected then dropped. You will need another variable which is a Boolean array that is set by a For Each Player loop where an If Then Else action is used to determine the triggering player vs the integer variable used by the loop and then sets the array of the player integer to true. You then have a second trigger that has a Player Leaves Game event that compares the player has voted array and removes a number from the vote count variable if the leaving player had voted.
3. You could just set your region as xxx in the event.
4. You can use a Text Message action that uses some conversion functions to get the value of a variable. Under the File menu is the Preferences window. Go to the Test Document tab and enable the Show Trigger Debugging Window option. You can then see the value of all local and global variables. Note you cannot scroll between options in the debug window and need to use the keyboard arrows to go through the menus.
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg