| 08-05-2003, 02:42 PM | #1 |
I tried to figure this out since about an hour, is there any way to do the following: Unit X and UnitGroup Y are owned by the same Player (or allied) Now I want that when Unit X is attacked a (random) unit of Y takes the damage. (X loses 0 health, Y loses the damage that was dealt to Unit X) Is this possible with Triggers or Abilitys? Thx hodi PS: This will be used pretty often in my campaign so you´d get credit for sure :D |
| 08-05-2003, 02:52 PM | #2 |
I belive there is a Unit takes damage event (you would want to use this and not unit is attacked). Use that to trigger the actions Next if you have assigned units to a unit group, or want to create a unit group on the fly you can. The main part would be: storeing the damage dealt in a temp real value. There is a Unit - Damage Taken when dealing with reals. What you do is: When unit X takes damage, grab that value, set unit X's life = to current life + dmg_Taken. Then pick random unit from unitgroup Y (it could be units owned by player within range (range_Value)) and set unit life = to life - dmg_Taken. |
| 08-05-2003, 02:56 PM | #3 | |
Quote:
ahh such a Real does exist !!! yay:D Thx a lot Dakan hodi PS: Credit added. |
| 08-05-2003, 03:01 PM | #4 |
Unit takes damage event? Didn't know that Thanks for finding that this will help my Arena's Trigger Items and my Tank racing map , a lot! |
| 08-05-2003, 03:44 PM | #5 |
Heh, it has been there since TFT came out. |
| 08-06-2003, 08:15 PM | #6 |
Yesterday I noted why I didn't know about this. I didn't see it before cause this event only applies to Presetted Unit events not to player owned units / generic unit events. So it is pretty useless for me. |
