Bogrim
y hello thar
- Reaction score
- 154
What BlueMirage is suggesting is to use units as a way to keep track of how many seals you have stacked up. You don't really need a custom indexing system for this, though.
Create a unit based on locust and set its art path to ".mdl" as well as remove its attack, shadow and anything that might indicate its presence. Basically you want a unit that only exists, but cannot be seen, selected, used or move. Then whenever you create a seal, create one of these units:
Then when you wish to use the "charges", simply use the number of units currently alive:
I suggested using custom value as a way to count, but this method is just as effecient (and works better as well). Only I'm not sure why you would want to start tinkering with custom values for this system (@ BlueMirage).
Create a unit based on locust and set its art path to ".mdl" as well as remove its attack, shadow and anything that might indicate its presence. Basically you want a unit that only exists, but cannot be seen, selected, used or move. Then whenever you create a seal, create one of these units:
Trigger:
- Divine Punishment
- Events
- Unit - A unit Starts the effect of an ability
- Conditions
- (Ability being cast) Equal to Divine Punishment
- Actions
- Set Temp_Point = (Position of (Triggering unit))
- Unit - Create 1 Seal Dummy for (Owner of (Triggering unit)) at Temp_Point facing Default building facing degrees
- Unit - Add a (5.00 + (5.00 x (Real((Level of Divine Punishment for (Triggering unit)))))) second Generic expiration timer to (Last created unit)
- Custom script: call RemoveLocation( udg_Temp_Point )
- Events
Then when you wish to use the "charges", simply use the number of units currently alive:
Trigger:
- Untitled Trigger 002
- Events
- Unit - A unit Starts the effect of an ability
- Conditions
- (Ability being cast) Equal to Heaven's Mercy
- Actions
- Set Temp_Group = (Units in (Playable map area) matching (((Unit-type of (Matching unit)) Equal to Seal Dummy) and (((Owner of (Matching unit)) Equal to (Owner of (Triggering unit))) and (((Matching unit) is alive) Equal to True))))
- Unit - Cause (Triggering unit) to damage (Target unit of ability being cast), dealing ((20.00 + (20.00 x (Real((Level of Heaven's Mercy for (Triggering unit)))))) x (Real((Number of units in Temp_Group)))) damage of attack type Spells and damage type Normal
- Unit Group - Pick every unit in Temp_Group and do (Unit - Remove (Picked unit) from the game)
- Custom script: call DestroyGroup( udg_Temp_Group )
- Events
I suggested using custom value as a way to count, but this method is just as effecient (and works better as well). Only I'm not sure why you would want to start tinkering with custom values for this system (@ BlueMirage).