• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Aura Trigger Effect Issues

Status
Not open for further replies.
Level 6
Joined
Feb 23, 2010
Messages
222
So I have this Aura called Rallying Presence and its based off of Endurance Aura and gives allies bonus Move and Att. Speed.
OFC That works...

I have a trigger that when 'proc'd' gives an ally with the Rallying Presence Aura a buff that gives additional move and attack speed for 3 seconds.

PROBLEM:
A.] The Aura works fine... on enemies. For some reason the ability only seems to give enemies the buff.
B.] Seems to keep one unit buffed and than stop working, and it keeps that one unit buffed permanently.

It looks something like this. :hohum:
  • Victorious Assault
    • Events
      • Unit - A unit Is attacked
    • Conditions
    • Actions
      • Set UnitAttacker = (Attacking Unit)
      • If (All Conditions are True)then do(Then Actions)else do(Else Actions)
        • If - Conditions
      • Unit Attacker has buff Rallying Presence [Knight - Leadership]) Equal to True
      • Then - Actions
  • If (All Conditions are True)then do(Then Actions)else do(Else Actions
  • If - Conditions
  • (Random integer number between 1 and 10)Less than or equal to (2x (Level of Rallying Presence [Knight - Leadership] for UnitAttacker))
  • Then - Actions)
  • Set TempLoc1 = (Position of UnitAttacker)
  • Unit - Create 1 Dummy for (Triggering Player) at TempLoc1 facing Default building facing degrees
  • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
  • Unit - Ad Victorious Assault [Rallying Presence Proc] to Last Created Unit)
  • Unit - Order (Last Created unit) to Orc Shaman - Bloodlust UnitAttacker
  • Custom script: call RemoveLocation (udg_TempLoc1)
  • Else - Actions
  • Else - Actions
 
Last edited:
Level 16
Joined
May 1, 2008
Messages
1,605
Moin moin =)

Somehow I get confused: So friendly units should have this Rallying Presence Aura.

Now I understand this buffed unit from this aura should get a buff, which increase the move + attackspeed for 3 seconds.

=== Questions ===
1) HOW there should get this additional buff? - when they attacking or get attacked?

2) The get this additional buff always or is there a percent chance how they can get this buff?

3) Should this buff stack?

Greetings
~ King of Bomb > Dr. Boom


Edit: Hmm I thing when the buffed unit is attacking there is a percent chance that this unit get's the additional buff so I got this for you:
JASS:
function Trig_Rallying_Presence_Jass_Actions takes nothing returns nothing
    local unit u1 = GetAttacker()
    local unit u2
    local location l = Location(GetUnitX(u1), GetUnitY(u1))
    
        if GetUnitAbilityLevel(u1, 'B000') > 0 then
            if GetRandomInt(1, 10) <= (2 * GetUnitAbilityLevel(u1, 'B000')) then
                set u2 = CreateUnitAtLoc(GetOwningPlayer(u1), 'h000', l, 0.00)
                call UnitApplyTimedLife(u2, 'BTLF', 3.00)
                call SetUnitAbilityLevel( u2, 'A001', GetUnitAbilityLevel(u1, 'B000'))
                call IssueTargetOrder(u2, "bloodlust", u1)
            endif
        endif
        
    set u1 = null
    set u2 = null
    call RemoveLocation(l)
endfunction
//===========================================================================
function InitTrig_Rallying_Presence_Jass takes nothing returns nothing
    set gg_trg_Rallying_Presence_Jass = CreateTrigger(  )
    call TriggerRegisterAnyUnitEventBJ( gg_trg_Rallying_Presence_Jass, EVENT_PLAYER_UNIT_ATTACKED )
    call TriggerAddAction( gg_trg_Rallying_Presence_Jass, function Trig_Rallying_Presence_Jass_Actions )
endfunction

'B000' = Buff ID of the Rallying Presence aura
'h000' = The Unit ID of the dummy
'A001' = Ability ID of the Bloodlust based ability ( which gives the additional buff for 3 seconds )

How to show you ideas: Go to the object editor > View > Display Values as raw data

Greetings
~ The Bomb King > Dr. Boom
 

Attachments

  • T_T.w3x
    17.7 KB · Views: 58
Last edited:
Level 6
Joined
Feb 23, 2010
Messages
222
Wow... seems like its quite legit... but, alas, I am a GUI noob. There is no way to do it in GUI? I'd just be copying your work other wise... and I don't wanna do that.

Oh and yes, the attacker potentially gets a speed boost (whom is within Aura Range)... never thought about it stacking... I like it though.

EDIT: +rep

EDIT2: I need to know because a few auras in my game will need this to work.
 
Last edited:
Level 16
Joined
May 1, 2008
Messages
1,605
Moin moin =)

Ok I hope the GUI of this is correct:

  • Rallying Presence GUI
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • ((Attacking unit) has buff Rallying Presence ) Equal to (==) True
    • Actions
      • Set RP_Unit = (Attacking unit)
      • Set RP_Loc = (Position of RP_Unit)
        • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Random integer number between 1 and 10) Less than or equal to (<=) (2 x (For RP_Unit the level of Rallying Presence ))
          • Then - Actions
            • Unit - Create 1 Dummy for (Owner of RP_Unit) at RP_Loc facing (Position of RP_Unit)
            • Unit - Add a 3.00 second Generic expiration timer to (Last created unit)
            • Unit - Set level of Rallying Presence [Proc] for (Last created unit) to (For RP_Unit the level of Rallying Presence )
            • Unit - Order (Last created unit) to Orc Shaman - Bloodlust RP_Unit
          • Else - Actions
      • Set RP_Unit = No unit
      • Custom script: call RemoveLocation(udg_RP_Loc)
I gave it in Jass, because in Jass I can kill every leak and BJ... and ofc it's faster to write as to click =D

Ahh I forgot to say: You should use JNGP as an editor. There are more triggers possible ( and there you can use better Jass ( if you want make your map perfect some days ^^ )

Anyway, if you have more questions - just ask =D

Greetings
~ The Bomb King > Dr. Boom
 
Level 6
Joined
Feb 23, 2010
Messages
222
Moin moin =)

Ok I hope the GUI of this is correct:

  • Rallying Presence GUI
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • ((Attacking unit) has buff Rallying Presence ) Equal to (==) True
    • Actions
      • Set RP_Unit = (Attacking unit)
      • Set RP_Loc = (Position of RP_Unit)
        • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Random integer number between 1 and 10) Less than or equal to (<=) (2 x (For RP_Unit the level of Rallying Presence ))
          • Then - Actions
            • Unit - Create 1 Dummy for (Owner of RP_Unit) at RP_Loc facing (Position of RP_Unit)
            • Unit - Add a 3.00 second Generic expiration timer to (Last created unit)
            • Unit - Set level of Rallying Presence [Proc] for (Last created unit) to (For RP_Unit the level of Rallying Presence )
            • Unit - Order (Last created unit) to Orc Shaman - Bloodlust RP_Unit
          • Else - Actions
      • Set RP_Unit = No unit
      • Custom script: call RemoveLocation(udg_RP_Loc)
I gave it in Jass, because in Jass I can kill every leak and BJ... and ofc it's faster to write as to click =D

Greetings
~ The Bomb King > Dr. Boom

Hm this looks like what I was going for. I'm gonna try this thanks. In the mean time can you explain the oddities with my trigger?
 
Level 16
Joined
May 1, 2008
Messages
1,605
Moin moin =)

Hmm I wondering if you trigger works correctly because:

1) The first thing I notice was the action where you create the dummy unit. You create it for "Triggering Player" but the trigger is run by a unit ( attacked unit )

2) Also I remember that this "timer" you gave to the unit ( 1.00 ) is to short. Because if you order it to cast an ability, there still some sort of delay, so 3.00 seconds are always the best in those situations.

3) Else I can't see any misstake but here's a tip: Your first action was to set the attacking unit into a variable and AFTER you check the condition if this unit has the buff. It's recommend to check first if the attacking unit has the buff and THEN put it into the variable and at the end of your trigger set the unit variable to no unit (null) so the variable is always clear.

Greetings
~ The Bomb King > Dr. Boom
 
Level 6
Joined
Feb 23, 2010
Messages
222
Moin moin =)

Hmm I wondering if you trigger works correctly because:

1) The first thing I notice was the action where you create the dummy unit. You create it for "Triggering Player" but the trigger is run by a unit ( attacked unit )

2) Also I remember that this "timer" you gave to the unit ( 1.00 ) is to short. Because if you order it to cast an ability, there still some sort of delay, so 3.00 seconds are always the best in those situations.

3) Else I can't see any mistake but here's a tip: Your first action was to set the attacking unit into a variable and AFTER you check the condition if this unit has the buff. It's recommend to check first if the attacking unit has the buff and THEN put it into the variable and at the end of your trigger set the unit variable to no unit (null) so the variable is always clear.

Greetings
~ The Bomb King > Dr. Boom

Thanks again man, love your avy too. (Nostalgia)

Maybe I'm tired, but it worked fine(my ability)- it just gave the buff to the enemies instead. o.0 And I had the attacker/attacked thing right. And it was a modified endurance so you know it was only on allies.

Oh and your triggers its fine but for some reason ONLY my Hero gets the buff.
 
Level 16
Joined
May 1, 2008
Messages
1,605
Moin moin =)

A short notice ( I get it while I was making some foot and put salami on my toast ^^ ):

In this way we do it with the triggers, the aura only should have 3 or 4 levels not 5 and above, because if your ability is 5 and above, this trigger will run with every attack ^^
You see in the 2nd condition we search from 1 to 10. So if this Rallying Presence ability is level 1,
there is a 20% chance to run it (2 * level = 2 from 1 to 10) . If Rallying Presence is level 2,
there is a 40% chance ( 2 * level = 4 from 1 to 10) and so on.

Greetings
~ The Bomb King > Dr. Boom
 
Level 6
Joined
Feb 23, 2010
Messages
222
Moin moin =)

A short notice ( I get it while I was making some foot ^^ ):

In this way we do it with the triggers, the aura only should have 3 or 4 levels not 5 and above, because if your ability is 5 and above, this trigger will run with every attack ^^
You see in the 2nd condition we search from 1 to 10. So if this Rallying Presence ability is level 1,
there is a 20% chance to run it (2 * level = 2 from 1 to 10) . If Rallying Presence is level 2,
there is a 40% chance ( 2 * level = 4 from 1 to 10) and so on.

Greetings
~ The Bomb King > Dr. Boom

I know that. Its jus set to proc often right now for testing purposes. The only problem is its buffing issues. Now it will only buff the hero and no one else. My visuals are fine, the effect and buff icon are all fine. Just whom is gettin buffed. Its not the reset of the variable because I've had my guy sit back and just let his aura work but nothing happened. I also moved around the variable and no luck. It might be one of those hidden get things that come up every now and than...who knows.
 
Status
Not open for further replies.
Top