- Joined
- May 13, 2023
- Messages
- 72
Hello hive I have this charge ability that needs some modifications. I looked through the Spell section and didn't find any abilities that fulfilled my needs so I'm trying to make my own one.
Here's the Spell.
Initialization Trigger
1st I want the ability to stop when it reaches a terrain thats higher than the caster's currently on meaning if it hits a wall the charge would stop and stun the caster
2nd I want it to push back units caught in it's path by a small amount and stun them for a bit
Any assitance is much obliged
Here's the Spell.
Initialization Trigger
-
Hellcharge Init
-
Events
-
Unit - A unit Starts the effect of an ability
-
-
Conditions
-
(Ability being cast) Equal to Hell Charge
-
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Number of units in HellchargeGroup1[1]) Equal to 0
-
-
Then - Actions
-
Trigger - Turn on Hellcharge End <gen>
-
-
Else - Actions
-
-
Set HellchargeIndex = (HellchargeIndex + 1)
-
Set HellchargeCaster[HellchargeIndex] = (Triggering unit)
-
Set HellchargePos[1] = (Position of HellchargeCaster[HellchargeIndex])
-
Set HellchargePos[2] = (Target point of ability being cast)
-
Set HellchargeDeg[HellchargeIndex] = (Angle from HellchargePos[1] to HellchargePos[2])
-
Unit - Turn collision for HellchargeCaster[HellchargeIndex] Off
-
Unit Group - Add HellchargeCaster[HellchargeIndex] to HellchargeGroup1[1]
-
Unit Group - Add HellchargeCaster[HellchargeIndex] to HellchargeGroup2[HellchargeIndex]
-
Custom script: call RemoveLocation (udg_HellchargePos[1])
-
Custom script: call RemoveLocation (udg_HellchargePos[2])
-
-
-
Hellcharge End
-
Events
-
Time - Every 0.10 seconds of game time
-
-
Conditions
-
Actions
-
For each (Integer A) from 0 to HellchargeIndex, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(HellchargeCaster[(Integer A)] is in HellchargeGroup1[1]) Equal to True
-
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(HellchargeCaster[(Integer A)] is alive) Equal to True
-
HellchargeCounter[(Integer A)] Less than or equal to 50
-
-
Then - Actions
-
Set HellchargeCounter[(Integer A)] = (HellchargeCounter[(Integer A)] + 1)
-
Set HellchargePos[1] = (Position of HellchargeCaster[(Integer A)])
-
Set HellchargePos[2] = (HellchargePos[1] offset by 50.00 towards HellchargeDeg[(Integer A)] degrees)
-
Unit - Move HellchargeCaster[(Integer A)] instantly to HellchargePos[2], facing HellchargeDeg[(Integer A)] degrees
-
Set HellchargeGroup1[2] = (Units within 150.00 of HellchargePos[2] matching ((((Matching unit) is alive) Equal to True) and ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) belongs to an enemy of (Owner of HellchargeCaster[(Integer A)])) Equal to True) and (((
-
Unit Group - Pick every unit in HellchargeGroup1[2] and do (Actions)
-
Loop - Actions
-
Set HellchargePos[3] = (Position of (Picked unit))
-
Unit - Cause HellchargeCaster[(Integer A)] to damage (Picked unit), dealing (Real((Base Damage of HellchargeCaster[(Integer A)] for weapon index 1))) damage of attack type Spells and damage type Normal
-
Custom script: call RemoveLocation (udg_HellchargePos[3])
-
-
-
Custom script: call RemoveLocation (udg_HellchargePos[1])
-
Custom script: call RemoveLocation (udg_HellchargePos[2])
-
Custom script: call DestroyGroup (udg_HellchargeGroup1[2])
-
-
Else - Actions
-
Unit Group - Remove HellchargeCaster[(Integer A)] from HellchargeGroup1[1]
-
Unit Group - Remove all units from HellchargeGroup2[(Integer A)]
-
Unit Group - Remove all units from HellchargeGroup1[3]
-
Unit - Turn collision for HellchargeCaster[(Integer A)] On
-
Set HellchargeCaster[(Integer A)] = No unit
-
Set HellchargeCounter[(Integer A)] = 0
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Number of units in HellchargeGroup1[1]) Equal to 0
-
-
Then - Actions
-
Trigger - Turn off (This trigger)
-
Set HellchargeIndex = 0
-
-
Else - Actions
-
Do nothing
-
-
-
-
-
-
Else - Actions
-
Do nothing
-
-
-
-
-
-
1st I want the ability to stop when it reaches a terrain thats higher than the caster's currently on meaning if it hits a wall the charge would stop and stun the caster
2nd I want it to push back units caught in it's path by a small amount and stun them for a bit
Any assitance is much obliged