REOspeedwagon
New Member
- Reaction score
- 0
So I am creating a game called "Demonic Defense", and if you've been on battle.net lately; you've probably seen it hosted. I am having one problem with one of the defenders. Whenever the Shadow Beetle (a unit in Demonic defense) casts one of his abilities (A transform ability made via triggers, based off of channel) he randomly dies.
The unit has 2 spells; one to transform him into a unit, and one to transform him back to his original form. Below is the trigger for which transforms him back into his regular form.
Some reason, (I think after upgrading something that both the "Ragthark" and "Shadow Beetle" uses, it does this) after using this ability to revert him into his normal form; he randomly dies. Also I have tried the Action "Replace Unit", but ended up changing the trigger to this, as I thought it was that causing the death. Note: Both the abilities in which transforms into Ragthark, and from are based off of channel, but have different base order IDs.
The unit has 2 spells; one to transform him into a unit, and one to transform him back to his original form. Below is the trigger for which transforms him back into his regular form.
Code:
Rise of Ragthark Inverse
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Rise of Ragthark From Ragthark
Actions
Set tempPoint = (Position of (Triggering unit))
Special Effect - Create a special effect at tempPoint using Abilities\Spells\Other\Volcano\VolcanoDeath.mdl
Special Effect - Destroy (Last created special effect)
Set tempint = (Integer((Percentage life of (Triggering unit))))
Set tempInt2 = (Integer((Mana of (Triggering unit))))
Unit - Remove (Triggering unit) from the game
Unit - Create 1 Shadow Beetle for (Owner of (Triggering unit)) at tempPoint facing (Facing of (Triggering unit)) degrees
Unit - Set mana of (Last created unit) to ((Real(tempInt2)) - 15.00)
Unit - Set life of (Last created unit) to (Real(tempint))%
Custom script: call RemoveLocation( udg_tempPoint )