HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Initialization trigger not working.

09-30-2010, 10:18 AM#1
Viktory
Hello, I am making a map in which you can play as the naga and there is something wrong with the following trigger:
Trigger:
Collapse NagaRed
Collapse Events
Player - Player 1 (Red) types a chat message containing -naga as An exact match
Conditions
Collapse Actions
Set NagaRed = True
-------- This trigger definitely works - end of story. I checked it myself --------
Collapse Initialization
Collapse Events
Time - Elapsed game time is 10.00 seconds
Conditions
Collapse Actions
Trigger - Turn off NagaRed <gen>
Trigger - Turn off NagaBlue <gen>
Trigger - Turn on Defeat <gen>
Trigger - Turn on Victory <gen>
Melee Game - Create starting units (for all players)
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
NagaRed Equal to True
Collapse Then - Actions
Collapse Unit Group - Pick every unit in (Units owned by Player 1 (Red) matching (((Triggering unit) is A peon-type unit) Equal to True)) and do (Actions)
Collapse Loop - Actions
Unit - Replace (Picked unit) with a Mur'gul Slave using The old unit's relative life and mana
Collapse Unit Group - Pick every unit in (Units owned by Player 1 (Red) matching (((Triggering unit) is A town-hall-type unit) Equal to True)) and do (Actions)
Collapse Loop - Actions
Unit - Replace (Picked unit) with a Temple of Tides using The old unit's relative life and mana
Else - Actions
Melee Game - Use melee time of day (for all players)
Melee Game - Limit Heroes to 1 per Hero-type (for all players)
Melee Game - Give trained Heroes a Scroll of Town Portal (for all players)
Melee Game - Set starting resources (for all players)
Melee Game - Remove creeps and critters from used start locations (for all players)
Melee Game - Run melee AI scripts (for computer players)
Collapse Player Group - Pick every player in (All players matching (((Picked player) slot status) Equal to Is playing)) and do (Actions)
Collapse Loop - Actions
Player Group - Add (Picked player) to PlayersAlive
Instead of creating Naga units, it makes normal ones.

I use an unmodified WE. End of story. I will not switch.
09-30-2010, 12:37 PM#2
WaterKnight
The elapsed game time event does not provide a Triggering unit. You probably meant Matching unit which is used in group pick conditions to refer to the unit that should be checked to get through. Picked unit is then used in the group loop actions. Analogically, this counts for player forces.
09-30-2010, 09:21 PM#3
Viktory
Thanks waterknight, I was tired at the time, no wonder I missed it.

+rep