[Trigger] Switching Teams

Status
Not open for further replies.
Level 2
Joined
Jul 23, 2007
Messages
3
I have two noob questions for you.
First question -->How would I make it if a specific unit dies you switch teams?
Second question -->Is it possible to make a peasant build a gate with open/close with triggers?

Thanks for all the help in advance.
 
Level 6
Joined
Mar 2, 2006
Messages
306
i'll take number 2:

let the peon build some building (doesn't matter which one; just let him hammer it for a while) with gate icon and cost
when finished detect it with generic unit event - unit finishes construction
check if unit-type of finished structure equals your dummy gate unit
remove the dummy unit (that was just built)
create a gate there (a destructible) and store it in a variable
activate previously inactive gate-triggers that will work with the variable you just assigned. (if you need to have lots of gates, at this point you register appropriate events with them)

if you have problems with gate triggers, see other threads...
 
Status
Not open for further replies.
Top