HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Removing Invulnerable Units From the Game

08-02-2008, 10:41 AM#1
Manee
Why wont this trigger work?

Trigger:
Main Structure Wipe Out
Collapse Events
Unit - Base Obelisk 0016 <gen> Dies
Unit - Base Obelisk 0023 <gen> Dies
Unit - Base Obelisk 0028 <gen> Dies
Conditions
Collapse Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Triggering unit) Equal to Base Obelisk 0016 <gen>
Collapse Then - Actions
Collapse Player Group - Pick every player in Force1 and do (Actions)
Collapse Loop - Actions
Set Force1Units = (Units in (Playable map area) owned by (Picked player))
Collapse Unit Group - Pick every unit in Force1Units and do (Actions)
Collapse Loop - Actions
Unit - Make (Picked unit) Vulnerable
Unit - Remove (Picked unit) from the game
Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Triggering unit) Equal to Base Obelisk 0023 <gen>
Collapse Then - Actions
Collapse Player Group - Pick every player in Force2 and do (Actions)
Collapse Loop - Actions
Set Force2Units = (Units in (Playable map area) owned by (Picked player))
Collapse Unit Group - Pick every unit in Force2Units and do (Actions)
Collapse Loop - Actions
Unit - Make (Picked unit) Vulnerable
Unit - Remove (Picked unit) from the game
Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Triggering unit) Equal to Base Obelisk 0028 <gen>
Collapse Then - Actions
Collapse Player Group - Pick every player in Force3 and do (Actions)
Collapse Loop - Actions
Set Force3Units = (Units in (Playable map area) owned by (Picked player))
Collapse Unit Group - Pick every unit in Force3Units and do (Actions)
Collapse Loop - Actions
Unit - Make (Picked unit) Vulnerable
Unit - Remove (Picked unit) from the game
Else - Actions

this is suppose to remove all units(including the invulnerable ones) after an obelisk is destroyed

edit: nvm, problem solved
08-02-2008, 11:19 AM#2
DioD
nested ForForce and ForGroup calls bugged, rebuild trigger to evoid this.
08-05-2008, 06:28 AM#3
Pyrogasm
What he's saying is that you can't be sure "Picked Player" and/or "Picked Unit" will refer to the proper picked unit/player.