Trigger not working as intended

Happysmiley

New Member
Reaction score
22
Ok, so I've made this spell which is supposed to fire off a heal on a target every second for two seconds - which works fine up to the point when he should fire the second heal.

My guess is, since everything else is working fine (both triggers that give the target hp works, and the floating text works) is that the

Trigger:
  • Unit - Order Penance_Unit to Neutral - Firebolt Penance_Unit_Target


doesn't function the way it should.. I've set Penance's (the skill) order string to firebolt so that shouldn't be the problem :/

What am I doing wrong?

P.S If you need I'll write you the whole script.
 

vypur85

Hibernate
Reaction score
803
> I've set Penance's (the skill) order string to firebolt so that shouldn't be the problem

Setting the order string does not change anything. You need to use the original order string of the ability.


> If you need I'll write you the whole script.

This is always needed regardless of relevance. It would a lot.
 

Tru_Power22

You can change this now in User CP.
Reaction score
144
Ok, so I've made this spell which is supposed to fire off a heal on a target every second for two seconds - which works fine up to the point when he should fire the second heal.

My guess is, since everything else is working fine (both triggers that give the target hp works, and the floating text works) is that the

Trigger:
  • Unit - Order Penance_Unit to Neutral - Firebolt Penance_Unit_Target


doesn't function the way it should.. I've set Penance's (the skill) order string to firebolt so that shouldn't be the problem :/

What am I doing wrong?

P.S If you need I'll write you the whole script.

Can you please post the rest of the trigger?
 

Happysmiley

New Member
Reaction score
22
Alright, tried setting it to the original order - no success

Here is the script:

Trigger:
  • Events
    • Unit - A unit Begins channeling an ability
    • Actions
    • Set Penance_Unit = (Casting Unit)
    • Set Penance_Unit_Target = (Target unit of ability being cast)
    • Set PenanceFloat = ((Integer((Random real number between 25.00 and 32.00))) + ((Intelligence of Penance_Unit (Include bonuses)) x (Integer(0.70))))
    • Set PenanceFloat1 = ((Integer((Random real number between 25.00 and 32.00))) + ((Intelligence of Penance_Unit (Include bonuses)) x (Integer(0.70))))
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
    • (Ability being cast) Equal to Penance
    • (Level of (Ability being cast) for Penance_Unit) Equal to 1
    • Then - Actions
    • Wait 0.20 seconds
    • Unit - Set life of (Penance_Unit_Target) to ((Life of (Penance_Unit_Target) + (Real(Penance_Float)))
    • Floating Text - Create floating text that reads (String(Penance_Float)) at (Penance_Unit_Target)) with Z offset 170.00, using font size 12.00, color(0.00%, 100.00%, 0.00%) and 0.00% transparency
    • Floating text - Change (Last created floating text): Disable permanence
    • Floating Text - Change the lifespan of (Last created floating text) to 3.00 seconds
    • Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
    • Wait 0.20 seconds
    • Unit - Order Penance_Unit to Neutral Alchemist - Acid Bomb Penance_Unit_Target
    • Unit - Set life of (Penance_Unit_Target) to ((Life of (Penance_Unit_Target) + (Real(Penance_Float1)))
    • Floating Text - Create floating text that reads (String(Penance_Float1)) at (Penance_Unit_Target)) with Z offset 170.00, using font size 12.00, color(0.00%, 100.00%, 0.00%) and 0.00% transparency
    • Floating text - Change (Last created floating text): Disable permanence
    • Floating Text - Change the lifespan of (Last created floating text) to 3.00 seconds
    • Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees

As you can see it's not very leak free :S Partly because I haven't gotten to that part yet and partly because I don't know if it's needed to remove those variables?

Thanks on behalf

EDIT: I forgot to write the else actions, it should be

Trigger:
  • Else - Actions
    • Do nothing
 

Tru_Power22

You can change this now in User CP.
Reaction score
144
You don't need a do nothing with your else, that is the default.

What was the spell originally based off of?
 

millz-

New Member
Reaction score
25
Your trigger shows you are ordering the unit to cast Acid bomb, I assume this acid bomb have the values set to 0 ? Since you are healing with the trigger itself, you should try creating a dummy unit, give it the Acid bomb ability and order it to cast on the Penance target instead. I think ordering the main caster to Acid bomb the target actually made it stop channeling Penance?

Actually it's still unclear about your situation. Is Penance the "Acid bomb" ability? Or is Penance a separate channeling ability that you want the caster to "cast acid bomb" effect while channeling?

Okay I just scrolled down to the first post (while writing this) and saw that Penance IS the Acid bomb ability. So, the problem now could be cooldown issue. I see that the wait inbetween casts is 0.4 seconds. Some abilities, even when set to 0 cooldown, can not be immediately cast again. Try basing the skill off "instant" spells, e.g. Channel.

Does your spell now actually heals 2 time? Meaning, heals twice but only 1 effect of Penance shown. If that's the case, use Channel or some other instant spell that allows you to target a unit instead.
 

Happysmiley

New Member
Reaction score
22
Okay I just scrolled down to the first post (while writing this) and saw that Penance IS the Acid bomb ability. So, the problem now could be cooldown issue. I see that the wait inbetween casts is 0.4 seconds. Some abilities, even when set to 0 cooldown, can not be immediately cast again. Try basing the skill off "instant" spells, e.g. Channel.

- You're right, lol. The spell actually has a cooldown. I've set it to nine seconds just because it's not supposed to be spammed. But thats obviously one of the reasons it doesn't work.

Does your spell now actually heals 2 time? Meaning, heals twice but only 1 effect of Penance shown. If that's the case, use Channel or some other instant spell that allows you to target a unit instead.

- I've never worked with channel before, but I suppose you just set the graphics to whatever you want and then add wanted effect with triggers..? Should I then use "unit begins channeling an ability" instead of "unit starts casting an ability"?

BTW
Thanks for the help so far guys :)

EDIT: Tried setting the cooldown to 0, didn't work.. So I'm thinking about creating a dummy unit.
EDIT: Wait, it did actually work, had to set the wait to 1.3 seconds because of the gcd, only problem now is he repeats the spell until he's out of mana, and the floating text is shown 4 times instead of 2.. xP
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top