- Joined
- Jun 30, 2005
- Messages
- 44
I'm working on a capture the flag based game, and I've come across this problem. I've made it so a unit can capture the flag, but I need to know how to make it if that unit is killed with the flag, the flag will return to its base.
Red Flag
Events
Unit - A unit enters Red Flag <gen>
Conditions
Or - Any (Conditions) are true
Conditions
((Owner of (Triggering unit)) controller) Equal to (Player 8 (Pink) controller)
((Owner of (Triggering unit)) controller) Equal to (Player 9 (Gray) controller)
((Owner of (Triggering unit)) controller) Equal to (Player 10 (Light Blue) controller)
((Owner of (Triggering unit)) controller) Equal to (Player 11 (Dark Green) controller)
((Owner of (Triggering unit)) controller) Equal to (Player 12 (Brown) controller)
Actions
Unit - Hide Red Flag 0001 <gen>
Special Effect - Create a special effect attached to the overhead of (Triggering unit) using Doodads\LordaeronSummer\Props\BannerOrc\BannerOrc0.mdl
Game - Display to (All players) the text: ((Name of (Owner of (Triggering unit))) + has stolen the |cffff0000Red|r flag!)
Thats what I have for when the unit captures the flag, but now I need to figure out how to make the flag go back to the base, (ie the guy with the special effect on him dies, and the flag unit unhides)
I have it so when the unit enters the region with the flag in it, the actual flag itself becomes hidden, and a dummy flag is created on top of the unit.
Red Flag
Events
Unit - A unit enters Red Flag <gen>
Conditions
Or - Any (Conditions) are true
Conditions
((Owner of (Triggering unit)) controller) Equal to (Player 8 (Pink) controller)
((Owner of (Triggering unit)) controller) Equal to (Player 9 (Gray) controller)
((Owner of (Triggering unit)) controller) Equal to (Player 10 (Light Blue) controller)
((Owner of (Triggering unit)) controller) Equal to (Player 11 (Dark Green) controller)
((Owner of (Triggering unit)) controller) Equal to (Player 12 (Brown) controller)
Actions
Unit - Hide Red Flag 0001 <gen>
Special Effect - Create a special effect attached to the overhead of (Triggering unit) using Doodads\LordaeronSummer\Props\BannerOrc\BannerOrc0.mdl
Game - Display to (All players) the text: ((Name of (Owner of (Triggering unit))) + has stolen the |cffff0000Red|r flag!)
Thats what I have for when the unit captures the flag, but now I need to figure out how to make the flag go back to the base, (ie the guy with the special effect on him dies, and the flag unit unhides)
I have it so when the unit enters the region with the flag in it, the actual flag itself becomes hidden, and a dummy flag is created on top of the unit.