I've cleared the problem with the Timer (Thanks, Kenneth), but I've stumbled into another issue I'm almost embarrassed to be posting on the Forums about. This one I've (regrettably) been working on for the past hour and a half. At first, I created a Trigger for the Builder Selection Dialog that comes up, to which a player clicks on the Builder, the unit is created on the Map at the specified Point. When that didn't work, I started tampering with the Trigger, to which the Dialog eventually wouldn't appear at all. I managed to correct that problem and start mucking around with the Trigger some more so that the window would just disappear when the button was pressed. When that didn't work, I changed the Trigger again to basically display a text message to All Players when Player 1 presses the button.
Builder Selection
Events
Dialog - Any Dialog Item is used by Player Any Player with event type Clicked
Local Variables
Conditions
(Used dialog item) == SCV Select
(Triggering player) == 1
Actions
UI - Display "THIS TRIGGER IS NOW WORKING AS IT'S BLOODY-WELL SUPPOSED TO!!!" for (All players) to Subtitle area
It won't even display the Text on the screen. I started adding/removing some of the Conditions to see if anything more or less refined would change the issue and it's still not working. I've uploaded the Map for anyone to take a look at and see if they can pinpoint the problem.
(There's another Triggerset under the Classic Mode Start Trigger which tells the Builder Selection Trigger to start.)
The key to organization is folders. You are also trying too hard to be variable efficient with the arrays. It hardly decreases your map size, but it does make it a lot more confusing. Look at what I did in my version of your map. You also probably need bank arrays to achieve what you want for the bank areas. I also recommend using constant variables for your dialogs, but I didn't include that in that map I uploaded. I mentioned this in the last post, but here it is again, use Switch Cases instead of a chain of If Then Else's.
Anyways, I only vaguely looked at your triggers, but right now it seems like the method you are using is wrong. All you need are boolean variables PlayerHasVoted[8] == False, set them to true once they uses one of the dialog items, and then when timer expires, you pick each player in active players, compare if PlayerHasVoted[Picked Player] == true, and if not then set their selection to Core.
Take the timer and create dialog out of the action definition with the parameter (player) and have them in their own action definition ... that is bad coding.
Really bad coding.
Instead of using switches you should be using loops ... it is almost like you have gone from Sc1 map making to Sc2 and skipped Wc3.
Ready Check should be an action definition because it doesnt require an event.
If you used a while loop instead of a timer it would be much much better ... how lucky I will make it for you. Feel special? Seriously, I should be working on Tofu but you gotta learn this one.
You should have a Map Start trigger that is ran 0 seconds after the game starts, ie on the first loop ... not on map initialization.
What this would do, is it would allow you to STOP the timer if all players voted.
Your Variables should be inside RECORDS and not folders.
But your map isnt working because of the way you have set it up, for each player in the game you need to set a variable like NumberOfPlayers +1, and then to do your check you can check if votes = that number.
Or a better way to do it is to loop through the players and check if they have voted = true.
You really need a whole tutorial on this subject and I do not have the time at the moment ...
Did you make a Variable called 'Loop' for this? Or a Variable titled timer_length and stop_timer? What kind of Variables did you make in that above coding?
Requesting some minor assistance from anyone who is reading this on a technical hiccup. You can read the first post of this thread for more info.
You need your SCV Select in Arrays. Then change your "Set Last Created DIalog Item == SCV Slect" to "Set Last Created Dialog Item == SCV Select (Picked Player)"
Does anyone know if this Trigger Setup would work properly? I have a Trigger and a Variable tied in together so that when a Player leaves the Game, it adds +10 to a Variable (it starts at an Integer of 1.) So if the Variable is set to 1, that means all Players are still in the Game. Each time a Play kills a unit owned by the Attack Force (Player 9), it adds an Integer of 1. So if the 'Player Leaves Game' Variable is set to 1 and the entire mass of Unit Deaths of Player 9 = 240, then Round 1 Ends and Round 2 Timer is triggered to start. If the 'Player Leaves Game' Variable is set to 11, then the amount of Unit Deaths needed to advance to Round 2 is set to 210.
So the Trigger would look like that which has been indicated below. I realize the approach seems a little complicated because if even a single unit remains on the map, the Trigger won't fire. However, if a single unit remains on the Map, then that means the Players haven't completed Round 1, so there's no reason to advance to Round 2. Would this setup work? Or would something in this Triggerset choke into a spiraling loop?
Trigger Round 2 Timer
Events
Unit - Any Unit dies
Local Variables
Conditions
(Owner of (Triggering unit)) == 9
Actions
Variable - Modify Player 9 Unit Deaths: + 1
General - If (Conditions) then do (Actions) else do (Actions)
If
Players Remaining in Game Variable == 1
Player 9 Unit Deaths == 240
Then
Trigger - Run Round 2 Classic Timer Starts (Check Conditions, Don't Wait until it finishes)
I currently have a Trigger set up so that basically when a Timer Expires, all the units owned by Player 1 need to be replaced with another Unit. I've come as far as "Pick Each Unit in ((Unit Type of (Unit Attached to Region)) units in (Entire Map) Owned by Player 1 and Do Actions."
ACTIONS
Replace (Picked Unit) with a...
It won't let me just pick any unit, it seems to only let me pick a unit that's already on the Map. However, if the unit isn't on the Map, if it's a Unit that the player must build with an SCV to be placed on the Map, it won't let me use that. I basically want to tell this Trigger that when the Timer expires, replace a specific unit owned by Player 1 with something else.
How you plan to pick something that doesn't exist? If you want replace new units with other units you can use 'Unit enters region (Playable Map)' Event. As condition compare unit type of triggering unit
I was able to replace the stale units with live-action units and modify them accordingly, but now I'm not sure what I would do with the Triggers to set them back to their original position before they turned live-action. You know, like how in that Squadron TD you have dummy unit which turn to life, and then they reset to their previous location after the fight. I'm trying to do that.
EDITED 17/03/2012 AT 4:58PM
I've cleared the problem with the Timer (Thanks, Kenneth), but I've stumbled into another issue I'm almost embarrassed to be posting on the Forums about. This one I've (regrettably) been working on for the past hour and a half. At first, I created a Trigger for the Builder Selection Dialog that comes up, to which a player clicks on the Builder, the unit is created on the Map at the specified Point. When that didn't work, I started tampering with the Trigger, to which the Dialog eventually wouldn't appear at all. I managed to correct that problem and start mucking around with the Trigger some more so that the window would just disappear when the button was pressed. When that didn't work, I changed the Trigger again to basically display a text message to All Players when Player 1 presses the button.
Builder Selection
Events
Dialog - Any Dialog Item is used by Player Any Player with event type Clicked
Local Variables
Conditions
(Used dialog item) == SCV Select
(Triggering player) == 1
Actions
UI - Display "THIS TRIGGER IS NOW WORKING AS IT'S BLOODY-WELL SUPPOSED TO!!!" for (All players) to Subtitle area
It won't even display the Text on the screen. I started adding/removing some of the Conditions to see if anything more or less refined would change the issue and it's still not working. I've uploaded the Map for anyone to take a look at and see if they can pinpoint the problem.
(There's another Triggerset under the Classic Mode Start Trigger which tells the Builder Selection Trigger to start.)
Just took a look at your map and seen that you haven't organized your map at all. At least use the version I uploaded yesterday please
http://www.sc2mapster.com/media/attachments/25/358/DefenseTestKenneth.SC2Map
The key to organization is folders. You are also trying too hard to be variable efficient with the arrays. It hardly decreases your map size, but it does make it a lot more confusing. Look at what I did in my version of your map. You also probably need bank arrays to achieve what you want for the bank areas. I also recommend using constant variables for your dialogs, but I didn't include that in that map I uploaded. I mentioned this in the last post, but here it is again, use Switch Cases instead of a chain of If Then Else's.
Anyways, I only vaguely looked at your triggers, but right now it seems like the method you are using is wrong. All you need are boolean variables PlayerHasVoted[8] == False, set them to true once they uses one of the dialog items, and then when timer expires, you pick each player in active players, compare if PlayerHasVoted[Picked Player] == true, and if not then set their selection to Core.
OMG! I'm so sorry.Check the file again. I uploaded the wrong map earlier. This is the right one.
Take the timer and create dialog out of the action definition with the parameter (player) and have them in their own action definition ... that is bad coding.
Really bad coding.
Instead of using switches you should be using loops ... it is almost like you have gone from Sc1 map making to Sc2 and skipped Wc3.
Ready Check should be an action definition because it doesnt require an event.
If you used a while loop instead of a timer it would be much much better ... how lucky I will make it for you. Feel special? Seriously, I should be working on Tofu but you gotta learn this one.
You should have a Map Start trigger that is ran 0 seconds after the game starts, ie on the first loop ... not on map initialization.
You would add this;
What this would do, is it would allow you to STOP the timer if all players voted.
Your Variables should be inside RECORDS and not folders.
But your map isnt working because of the way you have set it up, for each player in the game you need to set a variable like NumberOfPlayers +1, and then to do your check you can check if votes = that number.
Or a better way to do it is to loop through the players and check if they have voted = true.
You really need a whole tutorial on this subject and I do not have the time at the moment ...
@DogmaiSEA: Go
Did you make a Variable called 'Loop' for this? Or a Variable titled timer_length and stop_timer? What kind of Variables did you make in that above coding?
Add
inside the If-Then-Else action @ the trigger Timer Expires
@xKenneth: Go
lol, wow... A Variable? All that trouble over a Variable? It fixed the problem though lol
Requesting some minor assistance from anyone who is reading this on a technical hiccup. You can read the first post of this thread for more info.
You need your SCV Select in Arrays. Then change your "Set Last Created DIalog Item == SCV Slect" to "Set Last Created Dialog Item == SCV Select (Picked Player)"
Man Kenneth,
I'll be sure to add you in the credits when this Map is done lol
Does anyone know if this Trigger Setup would work properly? I have a Trigger and a Variable tied in together so that when a Player leaves the Game, it adds +10 to a Variable (it starts at an Integer of 1.) So if the Variable is set to 1, that means all Players are still in the Game. Each time a Play kills a unit owned by the Attack Force (Player 9), it adds an Integer of 1. So if the 'Player Leaves Game' Variable is set to 1 and the entire mass of Unit Deaths of Player 9 = 240, then Round 1 Ends and Round 2 Timer is triggered to start. If the 'Player Leaves Game' Variable is set to 11, then the amount of Unit Deaths needed to advance to Round 2 is set to 210.
So the Trigger would look like that which has been indicated below. I realize the approach seems a little complicated because if even a single unit remains on the map, the Trigger won't fire. However, if a single unit remains on the Map, then that means the Players haven't completed Round 1, so there's no reason to advance to Round 2. Would this setup work? Or would something in this Triggerset choke into a spiraling loop?
Trigger Round 2 Timer
Events
Unit - Any Unit dies
Local Variables
Conditions
(Owner of (Triggering unit)) == 9
Actions
Variable - Modify Player 9 Unit Deaths: + 1
General - If (Conditions) then do (Actions) else do (Actions)
If
Players Remaining in Game Variable == 1
Player 9 Unit Deaths == 240
Then
Trigger - Run Round 2 Classic Timer Starts (Check Conditions, Don't Wait until it finishes)
@Mesden: Go
What's wrong with this Trigger which would prevent it from working... Anyone..?
Melee Initialization
Events
Game - Map initialization
Local Variables
Conditions
Actions
Unit - Create 10 Drone for player 2 at Point 001 facing 270.0 degrees (No Options)
Unit Group - Pick each unit in (Last created units) and do (Actions)
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
(Owner of (Picked unit)) == 2
(Unit type of (Picked unit)) == Drone
Then
Unit Group - Add (Picked unit) to Drone Group
Else
General - If (Conditions) then do (Actions) else do (Actions)
If
(Number of Dead units in Drone Group) == 5
Then
Unit - Create 5 Drone for player 2 at Point 001 facing 270.0 degrees (No Options)
Else
Try this
I currently have a Trigger set up so that basically when a Timer Expires, all the units owned by Player 1 need to be replaced with another Unit. I've come as far as "Pick Each Unit in ((Unit Type of (Unit Attached to Region)) units in (Entire Map) Owned by Player 1 and Do Actions."
ACTIONS Replace (Picked Unit) with a...
It won't let me just pick any unit, it seems to only let me pick a unit that's already on the Map. However, if the unit isn't on the Map, if it's a Unit that the player must build with an SCV to be placed on the Map, it won't let me use that. I basically want to tell this Trigger that when the Timer expires, replace a specific unit owned by Player 1 with something else.
Any ideas?
How you plan to pick something that doesn't exist? If you want replace new units with other units you can use 'Unit enters region (Playable Map)' Event. As condition compare unit type of triggering unit
@Nerfpl: Go
Ahh. How clumsy of me -_-
@Mesden: Go
I was able to replace the stale units with live-action units and modify them accordingly, but now I'm not sure what I would do with the Triggers to set them back to their original position before they turned live-action. You know, like how in that Squadron TD you have dummy unit which turn to life, and then they reset to their previous location after the fight. I'm trying to do that.
you could just hide them instead of replacing. save them to unit group for future reference and just unhide when needed
@Nerfpl: Go
Will they be detected by detector units, or be obstructed by units attempting to move past them?
no no. think of it as system hide. not really game related except that some aoe abilities may hit them if you check hidden-allowed in target filer