| 11-29-2003, 07:07 PM | #1 |
Hey guys, ill cut right to the chase :) What i want is lets say there is a building owned by player 4, but then player 3 comes along and destroys it! Now as soon as its destroyed i want the game to create X building where player 4's building USE to be. Now i know a way to do this.. but its WAY too much triggering and could cause lag. Oh the reason why its so big? Cause ANY player can destroy ANY player's building and the game will have to create a building for the player that killed the old building at the EXACT location of the old building... i just confused myself://// |
| 11-29-2003, 07:13 PM | #2 |
Code:
Give Away at Death
Events
Unit - A unit Dies
Conditions
((Dying unit) is A structure) Equal to True
(Owner of (Dying unit)) Not equal to (Owner of (Killing unit))
Actions
Unit - Replace (Dying unit) with a (Unit-type of (Dying unit)) using The new unit's max life and mana
-------- If you want to give it to the killing player, then use this next action too. --------
Unit - Change ownership of (Last replaced unit) to (Owner of (Killing unit)) and Change colorThat should work. If a player kills another player's building, they get that building with full health at the location of the dead building. |
