- Joined
- May 20, 2009
- Messages
- 822
Summoned Units to return mana to their Summoner
EDIT: Everything marked with * is not the final trigger. Scroll down to my last post.
EDIT: So, turns out there was a much easier way. So instead, I just need help finishing this trigger, as it does not work properly at all.
In my Mod, I am now starting to rebalance each race and the Undead was the first one to work on as most of their arsenal is highly underutilized. So, I started with the Crypt Fiend. Anyway, here are the triggers.
EDIT: Everything marked with * is not the final trigger. Scroll down to my last post.
So, as it turns out Raise Dead on the Necromancer does not actually target a point. Which means something like this,
So, since when Raise Dead is used the unit using the spell still FACES the corpse, I could grab all units within the range of the spell, check if they're dead, then check if the angle between the unit and the corpse is the same exact angle as the facing, then just get the point of the corpse. But, I'm not really sure how, or if I even can, get the facing of a unit...
I also need to know how to make it that when a unit finishes training, it spawns with a corpse inside it. I'm not really sure how to do that, if it's even possible.
- Unit - A unit Starts the effect of an ability
- ...
- (Ability being cast) Equal to Raise Dead
- ...
- Unit - Create 1 Skeleton Warrior for (Owner of (Triggering unit)) at (Target Point of Ability being cast) facing (Target Point of Ability being cast)
So, since when Raise Dead is used the unit using the spell still FACES the corpse, I could grab all units within the range of the spell, check if they're dead, then check if the angle between the unit and the corpse is the same exact angle as the facing, then just get the point of the corpse. But, I'm not really sure how, or if I even can, get the facing of a unit...
I also need to know how to make it that when a unit finishes training, it spawns with a corpse inside it. I'm not really sure how to do that, if it's even possible.
EDIT: So, turns out there was a much easier way. So instead, I just need help finishing this trigger, as it does not work properly at all.
In my Mod, I am now starting to rebalance each race and the Undead was the first one to work on as most of their arsenal is highly underutilized. So, I started with the Crypt Fiend. Anyway, here are the triggers.
-
Cryptling Start
-
Events
- Unit - A unit Spawns a summoned unit
- Conditions
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Unit-type of (Summoned unit)) Equal to Cryptling
-
Then - Actions
- Set CryptyMaxIndex = (CryptyMaxIndex + 1)
-
For each (Integer CryptySummonedInit) from 1 to CryptyMaxIndex, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Summoning unit) Equal to CryptFiend[CryptySummonedInit]
- Then - Actions
-
Else - Actions
- Set CryptFiend[(CryptyMaxIndex + 1)] = (Triggering unit)
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
- Set Cryptling[CryptyMaxIndex] = (Last created unit)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Events
-
Harvest Flesh Cryptling
-
Events
- Game - GDD_Event becomes Equal to 0.00
- Conditions
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Unit-type of GDD_DamageSource) Equal to Cryptling
-
Then - Actions
-
For each (Integer CryptyInit) from 1 to CryptyMaxIndex, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (CryptyInit mod 2) Not equal to 0
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Or - Any (Conditions) are true
-
Conditions
- GDD_DamageSource Equal to Cryptling[CryptyInit]
- GDD_DamageSource Equal to Cryptling[(CryptyInit + 1)]
-
Conditions
-
Or - Any (Conditions) are true
-
Then - Actions
- Set TempCryptling[1] = GDD_DamageSource
- Unit - Create 1 Dummy Ability Unit 1 for (Owner of GDD_DamageSource) at (Position of GDD_DamagedUnit) facing (Position of GDD_DamagedUnit)
- Unit - Order (Last created unit) to Human Sorceress - Slow GDD_DamagedUnit
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (GDD_DamagedUnit has buff Harvest Flesh ) Equal to True
- Then - Actions
-
Else - Actions
- Set CryptLingyDamage = (Random real number between 3.00 and 5.00)
- Unit - Set mana of CryptFiend[(CryptyInit + 1)] to ((Mana of CryptFiend[(CryptyInit + 1)]) + CryptLingyDamage)
- Trigger - Turn off (This trigger)
- Unit - Cause GDD_DamageSource to damage GDD_DamagedUnit, dealing CryptLingyDamage damage of attack type Pierce and damage type Normal
- Trigger - Turn on (This trigger)
- Set CryptLingyDamage = 0.00
-
If - Conditions
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
For each (Integer CryptyInit) from 1 to CryptyMaxIndex, do (Actions)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Events
-
Cryptors Die
-
Events
- Unit - A unit Dies
- Conditions
-
Actions
-
For each (Integer CryptyContInit) from 1 to CryptyMaxIndex, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Or - Any (Conditions) are true
-
Conditions
- (Triggering unit) Equal to CryptFiend[CryptyContInit]
-
Conditions
-
Or - Any (Conditions) are true
-
Then - Actions
- Set CryptFiend[CryptyContInit] = CryptFiend[CryptyMaxIndex]
- Set CryptFiend[CryptyMaxIndex] = No unit
- Set Cryptling[CryptyContInit] = Cryptling[CryptyMaxIndex]
- Set Cryptling[CryptyMaxIndex] = No unit
- Set Cryptling[(CryptyContInit - 1)] = Cryptling[(CryptyMaxIndex - 1)]
- Set Cryptling[(CryptyMaxIndex - 1)] = No unit
- Set CryptyMaxIndex = (CryptyMaxIndex - 1)
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (CryptyContInit mod 2) Equal to 0
- Cryptling[CryptyContInit] Equal to (Triggering unit)
- (Cryptling[CryptyContInit] is alive) Equal to False
-
Then - Actions
- Set CryptFiend[CryptyContInit] = CryptFiend[CryptyMaxIndex]
- Set CryptFiend[CryptyMaxIndex] = No unit
- Set Cryptling[CryptyContInit] = Cryptling[CryptyMaxIndex]
- Set Cryptling[CryptyMaxIndex] = No unit
- Set Cryptling[(CryptyContInit - 1)] = Cryptling[(CryptyMaxIndex - 1)]
- Set Cryptling[(CryptyMaxIndex - 1)] = No unit
- Set CryptyMaxIndex = (CryptyMaxIndex - 1)
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (CryptyContInit mod 2) Not equal to 0
- Cryptling[CryptyContInit] Equal to (Triggering unit)
- (Cryptling[(CryptyContInit + 1)] is alive) Equal to False
-
Then - Actions
- Set CryptFiend[CryptyContInit] = CryptFiend[CryptyMaxIndex]
- Set CryptFiend[CryptyMaxIndex] = No unit
- Set Cryptling[CryptyContInit] = Cryptling[CryptyMaxIndex]
- Set Cryptling[CryptyMaxIndex] = No unit
- Set Cryptling[(CryptyContInit - 1)] = Cryptling[(CryptyMaxIndex - 1)]
- Set Cryptling[(CryptyMaxIndex - 1)] = No unit
- Set CryptyMaxIndex = (CryptyMaxIndex - 1)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
For each (Integer CryptyContInit) from 1 to CryptyMaxIndex, do (Actions)
-
Events
Also, for future references if anyone needs to figure out how to get a unit to carry a corpse upon being trained, this is how I did it. You'll need Unit Event v2.0.
Here's how I did it:
Here's how I did it:
-
Abomo Cargo Load
-
Events
- Game - CargoEvent becomes Equal to 1.00
- Conditions
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Unit-type of CargoTransportUnit[UDex]) Equal to Abomination
-
Then - Actions
- Unit - Add Abomo Life Bonus to CargoTransportUnit[UDex] \\NOT NECESSARY
- Unit - Remove Exhume Corpses from CargoTransportUnit[UDex]
- Animation - Play CargoTransportUnit[UDex]'s stand animation \\NOT NECESSARY
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Events
-
Abomo Cargo Unload \\NOT NECESSARY
-
Events
- Game - CargoEvent becomes Equal to 2.00
- Conditions
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Unit-type of CargoTransportUnit[UDex]) Equal to Abomination
-
Then - Actions
- Unit - Remove Abomo Life Bonus from CargoTransportUnit[UDex]
- Animation - Play CargoTransportUnit[UDex]'s stand animation
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Events
Last edited: