Remove Buff after unit is killed not working

ayumilove

Youtube account suspended! youtube.com/ayumilove8
Reaction score
110
thanks tom for the tutorial link and for pointing my mistake ! <3

*reads the tutorial*


[edit]

but, i still dont understand why we need to add in this code:
Code:
Caster has buff Killing Frenzy Equal to True

(caster = the beastman) right?

but i dont see the relation of it checking targeted unit is dead.

Code:
Trigger: ActivateFrenzy
Event - A unit starts the effect of an ability
Condition - Ability being cast Equal to SuperFrenzy 
Action - 
Set Caster = Triggering Unit
[COLOR="Red"]Set CasterPoint = (Position of (Triggering Unit)) [/COLOR]
Create 1 Dummy for Owner of Triggering Unit at [COLOR="Red"]CasterPoint[/COLOR] facing 0.00 degrees.
Unit - Add Curse to Last Created Unit
Unit - Order Last Created unity to Undead Banshee Curse Target Unit of Ability Being cast 
Unit - Add a 1 second Generic expiration timer to Triggering Unit
Create 1 Dummy for Ownver of Triggering Unit at [COLOR="Red"]CasterPoint [/COLOR]facing 0.00 degrees.
Unit - Add Inner Fire to Last Created Unit
Unit - Order Last Created unity to Human Priest - Inner Fire Triggering Unit
Unit - Add a 1 second Generic expiration timer to Triggering Unit
[COLOR="Red"]Custom script:   call RemoveLocation (udg_CasterPoint)[/COLOR]

Set Leak_Group = (Units in (Playable map area) matching (((Matching unit) has buff FrenzyVictim) Equal to True))

Turn on CheckFrenzyVictim
Code:
Trigger: CheckFrenzyVictim
Event - A unit dies
Condition - 
Action -
Unit Group - Pick every units in Leak_Group and do (Actions)
Loop Actions -
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    If - Conditions
      (Picked unit) Equal to (Dying unit)
    Then - Actions
      Unit - Remove FrenzyHero buff from Caster
      Set Caster = No unit
    Else - Actions
Custom script:   call DestroyGroup (udg_Leak_Group)
 
C

CrazyJanitor

Guest
I did your trigger exactly and it still isnt working.... i double checked all the buffs and spells and they were all correct but it still is not working i may have a variable assigned incorrectly though. I have Caster as a unit and i have Leak_Group as a unit group. BTW i only need the inner fire dummy unit because the curse based skill gives his target the buff i need it to have.
 

ayumilove

Youtube account suspended! youtube.com/ayumilove8
Reaction score
110
sorry...

the triggers above are meant as a guide, but not a fully working one
i'm still figuring out how to fix the problem <3
 
C

CrazyJanitor

Guest
np. It worked up to the removing of the buff lol and it seems to be exactly how i would need to set it up. This trigger just has me stumped :( .
 

ayumilove

Youtube account suspended! youtube.com/ayumilove8
Reaction score
110
could you provide some information about your spell?
such as innerfire or curse?

what do you actually want to make?

when caster cast the spell, you want the caster to speed up attack?
and what effect do you want it on the target? always miss attack?
 
C

CrazyJanitor

Guest
Curse and inner fire are just the skills i used to give the necessary buffs to the unit. The inner fire spell gives him a buff that makes it so he is unselectable. The curse gives the buff to the target enemy and it is the spell he actually has no dummy units casts this. What the spell actually does is it makes the beastman who casts the spell attack the target until he dies or the target does. He also gets bonus damage and a movement speed bonus.

The only part i am haveing trouble with is removing the buff that the inner fire based spell gives him after his target dies. This is a problem because he is unselectable by his owner while he has this buff on him. I cannot make the buff expire after a certain amount of time because that could leave him sitting there unselectable or he can become selectable before he kills his target.

The spell does not need to be MUI becuase it is on a AOS map and there will be only one beastmaster on the map at a time so two people cannot cast it at once.
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,495
> The spell does not need to be MUI


Event:
- A unit starts the effect of an ability
Conditions:
- (Ability being cast) equal to ...
Actions:
- Set CasterUnitVariable = (Casting unit)
- Set TargetUnitVariable = (Target unit of ability being cast)
- Trigger - Turn on <the next trigger here>

Event:
- Timer - every 1.0 seconds
Conditions:
- (TargetUnitVariable has buff <some buff>) equal to false
Actions:
- ... do domething to CasterUnitVariable
- Trigger - Turn off (This trigger)
 
C

CrazyJanitor

Guest
Yes! it works! thanks a million for all the help.:) :) :)

*Edit*

I guess i spoke to soon if i use the trigger u just gave me AceHart it seems i cannot have any other trigger for this spell or else it interupts this one. I have tried useing seperate triggers or adding more to the same one. I have also tried useing a new variable for each new trigger but it all interupts it by removing the buff from the target for some reason and all it does is increase the movement speed of the triggering unit.
 

Sim

Forum Administrator
Staff member
Reaction score
534
2 choices:

1. Augment the cooldown so it lasts as long as the cooldown so it may never be casted twice in a row.

2. Make it MUI (More complicated :p)
 
C

CrazyJanitor

Guest
I am willing to make it MUI if someone shows me how. It cant be cast twice in a row and i dont see why that matters, maybe I didnt get my point across cleary. I cannot have more than one trigger while useing AceHart's trigger for this skill if i do it stops the trigger.
 

Sim

Forum Administrator
Staff member
Reaction score
534
Even if you re-explained, I fear I still don't understand.

What do you mean by "stop the trigger"? The spell is interrupted?
 
C

CrazyJanitor

Guest
For some reason it stops the periodic trigger if have additional triggers and this makes it so the buff is not removed.
 

Sim

Forum Administrator
Staff member
Reaction score
534
if you have what additionnal triggers? I can't read in your mind :rolleyes:

which triggers stop your periodic one.
 
C

CrazyJanitor

Guest
Frenzy attack move
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Killing Frenzy
Actions
Set FrenzyAttackMover = (Triggering unit)
Set FrenzyAttackMoverTarget = (Target unit of ability being cast)
Unit - Order Caster to Attack FrenzyAttackMoverTarget

This trigger makes the periodic trigger that AceHart gave me remove the Killing Frenzy buff on the target or it removes it itself. I have tried it with variables and without.
 

Tom Jones

N/A
Reaction score
437
Could you please add all of the triggers involing your frenzy skill to the above post! It sounds like you got two or more. And could you please make use of the code button when posting triggers. It's the # to the right of the quote button.¨
*Edit*
After reading all the post, and getting a general picture of what you want, how about this:
Code:
Frenzy
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Frenzy
    Actions
        Custom script:   local unit udg_tempcaster
        Custom script:   local unit udg_temptarget
        Set tempcaster = (Triggering unit)
        Set temptarget = (Target unit of ability being cast)
        *All of the stuff you want to happen*
        Wait until (((temptarget is dead) Equal to True) or ((tempcaster is dead) Equal to True)), checking every 1.00 seconds
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (temptarget is dead) Equal to True
            Then - Actions
                Unit - Remove Frenzy(caster) buff from tempcaster
            Else - Actions
                Unit - Remove Frenzy(target) buff from temptarget
        Set tempcaster = No unit
        Set temptarget = No unit
So this will wait untill either the target or caster dies with removing the buff. If the caster dies, the targets buff will be removed and vice versa.
 
C

CrazyJanitor

Guest
Thanks Tom Jones. Your trigger worked perfectly!:D :D Also thanks to every1 else who helped me with this trigger. I am wondering what the custom scripts do though.
 

ayumilove

Youtube account suspended! youtube.com/ayumilove8
Reaction score
110
wow tom codes looks short and sweet <3

the custom script is to make it to become MUI, right?
MUI uses local variables, and Tom had used local variables in his code,
so you can cast many times o_O
 
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