- Joined
- Mar 2, 2024
- Messages
- 2
Hello guys! This is my first time posting here and I'm kind of a noob when it comes to triggers; all my knowledge is GUI and I search how to make most of the things I try.
I have a custom skill concept I want to execute, and it feels like I'm almost done with it, but what happens is... It's way too inconsistent and something I can't point out is probably leaking.
The concept itself is: On my map, every playable hero will start with a trait ability that can't be levelled up. This one will start with an active skill called Lunar Infusion, which is a buff spell (made out of Bloodlust) that'll mark an allied unit and spawn a dummy on top of the buffed unit every 2 seconds, which will then cast Lunar Strike (made out of Acid Bomb) at a random nearby enemy also every 2 seconds, dealing 10 + (Caster Intelligence) damage. The buff has permanent duration but can only be applied to a single target at once. If the hero tries to buff another target, the previous one will be removed.
The triggers can probably be briefed, but take it easy on me since I'm just a beginner. My issue is: Trigger 1 and 2 seems to work just fine, but the third trigger seems to be leaking or failing since the dummy is inconsistent when casting Lunar Strike. Sometimes he will, sometimes he won't.
Trigger 1: Lunar Infusion's buff setup
Caster = Unit
InfundidoTarget (Target of the Lunar Infusion) = Unit
MiraLunar_Targets (Available targets for Lunar Strike) = Unit Group
MiraLunar_AlvoAleatorio (Random target for Lunar Strike) = Unit
Thanks in advance!
I have a custom skill concept I want to execute, and it feels like I'm almost done with it, but what happens is... It's way too inconsistent and something I can't point out is probably leaking.
The concept itself is: On my map, every playable hero will start with a trait ability that can't be levelled up. This one will start with an active skill called Lunar Infusion, which is a buff spell (made out of Bloodlust) that'll mark an allied unit and spawn a dummy on top of the buffed unit every 2 seconds, which will then cast Lunar Strike (made out of Acid Bomb) at a random nearby enemy also every 2 seconds, dealing 10 + (Caster Intelligence) damage. The buff has permanent duration but can only be applied to a single target at once. If the hero tries to buff another target, the previous one will be removed.
The triggers can probably be briefed, but take it easy on me since I'm just a beginner. My issue is: Trigger 1 and 2 seems to work just fine, but the third trigger seems to be leaking or failing since the dummy is inconsistent when casting Lunar Strike. Sometimes he will, sometimes he won't.
Trigger 1: Lunar Infusion's buff setup
-
Infusao Lunar Setup
-
Events
- Unit - A unit Begins casting an ability
-
Conditions
- (Ability being cast) Equal to Lunar Infusion
-
Actions
- Set VariableSet Caster = (Casting unit)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Infundido_Target Equal to No unit
-
Then - Actions
- Set VariableSet Infundido_Target = (Target unit of ability being cast)
- Special Effect - Create a special effect attached to the origin of Infundido_Target using Abilities\Spells\Other\Monsoon\MonsoonBoltTarget.mdl
-
Else - Actions
- Unit - Remove All buffs from Infundido_Target
- Set VariableSet Infundido_Target = (Target unit of ability being cast)
- Special Effect - Create a special effect attached to the origin of Infundido_Target using Abilities\Spells\Other\Monsoon\MonsoonBoltTarget.mdl
-
If - Conditions
-
Events
-
Mira Lunar
-
Events
- Time - Every 2.00 seconds of game time
- Conditions
-
Actions
- Unit Group - Remove all units from MiraLunar_Targets.
-
Unit Group - Pick every unit in (Units within 800.00 of (Position of Infundido_Target) matching (((Picked unit) belongs to an enemy of (Owner of Caster).) Equal to True).) and do (Actions)
-
Loop - Actions
- Unit Group - Add (Picked unit) to MiraLunar_Targets
-
Loop - Actions
-
Events
-
Golpe Lunar
-
Events
- Time - Every 2.00 seconds of game time
-
Conditions
- (Infundido_Target is alive) Equal to True
-
Actions
- Set VariableSet MiraLunar_AlvoAleatorio = (Random unit from MiraLunar_Targets)
- Unit - Create 1 Dummy Lunar Strike for (Owner of Caster) at (Position of Infundido_Target) facing Default building facing degrees
- Unit - Add Lunar Strike to (Last created unit)
- Unit - Order (Last created unit) to Neutral Alchemist - Acid Bomb MiraLunar_AlvoAleatorio
- Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
-
Events
Caster = Unit
InfundidoTarget (Target of the Lunar Infusion) = Unit
MiraLunar_Targets (Available targets for Lunar Strike) = Unit Group
MiraLunar_AlvoAleatorio (Random target for Lunar Strike) = Unit
Thanks in advance!