Hopefully the last spell trigger question I have to ask!

Lady MufflaN

New Member
Reaction score
4
Ain't workin'

Code:
Alone is Weak Group Copy Copy
    Events
        Time - Every 1.00 seconds of game time
    Conditions
    Actions
        Set David = David 0103 <gen>
        Set DavidFinalBond = (Position of David)
        Set DavidFinalBondGroupFriendly = (Units within 400.00 of DavidFinalBond matching ((((Matching unit) belongs to an ally of (Owner of David)) Equal to True) and (((Matching unit) is A Hero) Equal to True)))
        Unit Group - Pick every unit in DavidFinalBondGroupFriendly and do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        ((Triggering unit) has buff Brilliance Aura) Equal to True
                        (Level of Ensam är svag ability bonus (+5 All Stats) for (Picked unit)) Equal to 0
                    Then - Actions
                        Unit - Add Ensam är Svag (BA)  to (Picked unit)
                    Else - Actions
                        Unit - Remove Ensam är Svag (BA)  from (Picked unit)
        Custom script:   call RemoveLocation (udg_DavidFinalBond)
        Custom script:   call DestroyGroup (udg_DavidFinalBondGroupFriendly)
 

vypur85

Hibernate
Reaction score
803
Code:
Untitled Trigger 001
    Events
        Time - Every 1.00 seconds of game time
    Conditions
    Actions
        Set TempGroup = (Units in (Playable map area) matching (((Matching unit) is A Hero) Equal to True))
        Unit Group - Pick every unit in TempGroup and do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        ((Picked unit) has buff (Custom) Brilliance Aura ) Equal to True
                        (Level of (CUSTOM) Attribute Bonus  for (Picked unit)) Equal to 0
                    Then - Actions
                        Unit - Add (CUSTOM) Attribute Bonus  to (Picked unit)
                    Else - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        ((Picked unit) has buff (Custom) Brilliance Aura ) Equal to False
                        (Level of (CUSTOM) Attribute Bonus  for (Picked unit)) Not equal to 0
                    Then - Actions
                        Unit - Remove (CUSTOM) Attribute Bonus  from (Picked unit)
                    Else - Actions

This works.

Code:
(Units within 400.00 of DavidFinalBond matching ((((Matching unit) belongs to an ally of (Owner of David)) Equal to True) and (((Matching unit) is A Hero) Equal to True)))
This is not necessary because only allies can attain Brilliance Aura buff from the unit. Just pick all possible units which have the buff.
 

Attachments

  • Attribute Aura.w3x
    17.1 KB · Views: 125

Lady MufflaN

New Member
Reaction score
4
I'm sure it works if I'd want a aura that gives +stats, but you seem to have lost track of what we've tried to create :p I want an aura that does nothing if there are no friendly heroes close to the hero with the aura, and the more heroes that are close to him the more powerful it will be. e.g: Hero A got Aura Hero B&C is other heroes, now if Hero A is alone the aura do nothing, but if Hero B comes close to Hero A, both Hero A&B get (for example) +5 Agi/Str/Int, and if Hero C comes close to Hero A while B is still around, they all three get +10 Agi/Str/Int, and then if Hero B&C leaves, the aura won't do anything, translated from Swedish the spell is called "Alone ain't strong"
 

vypur85

Hibernate
Reaction score
803
Code:
Untitled Trigger 001
    Events
        Time - Every 1.00 seconds of game time
    Conditions
    Actions
        Set TempGroup = (Units in (Playable map area) matching (((Matching unit) is A Hero) Equal to True))
        Unit Group - Pick every unit in TempGroup and do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        ((Picked unit) has buff (Custom) Brilliance Aura ) Equal to True
                    Then - Actions
                        Set TempGroup_2 = (Units within 300.00 of (Position of (Picked unit)) matching ((((Matching unit) has buff (Custom) Brilliance Aura ) Equal to True) and (((Matching unit) belongs to an ally of (Owner of (Picked unit))) Equal to True)))
                        Set Integer = (Number of units in TempGroup_2)
                        [B]If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                (Level of (CUSTOM) Attribute Bonus  for (Picked unit)) Not equal to Integer
                            Then - Actions
                                Unit - Add (CUSTOM) Attribute Bonus  to (Picked unit)
                                Unit - Set level of (CUSTOM) Attribute Bonus  for (Picked unit) to Integer
                            Else - Actions[/B]
                    Else - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        ((Picked unit) has buff (Custom) Brilliance Aura ) Equal to False
                        (Level of (CUSTOM) Attribute Bonus  for (Picked unit)) Not equal to 0
                    Then - Actions
                        Unit - Remove (CUSTOM) Attribute Bonus  from (Picked unit)
                    Else - Actions

Try this. Hope it's what you want. Not sure.

Edit:
Added a condition... The bolded one.
 

Attachments

  • Attribute Aura.w3x
    17.4 KB · Views: 126

Lady MufflaN

New Member
Reaction score
4
Seems like it won't work.

Code:
Alone is Weak Group Copy Copy
    Events
        Time - Every 1.00 seconds of game time
    Conditions
    Actions
        Set David = David 0103 <gen>
        Set DavidFinalBondGroupFriendly = (Units in (Playable map area) matching (((Matching unit) is A Hero) Equal to True))
        Unit Group - Pick every unit in DavidFinalBondGroupFriendly and do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        ((Picked unit) has buff Brilliance Aura) Equal to True
                    Then - Actions
                        Set DavidFinalBondGroup = (Units within 400.00 of (Position of David) matching ((((Triggering unit) has buff Brilliance Aura) Equal to True) and (((Matching unit) belongs to an ally of (Owner of David)) Equal to True)))
                        Set UnitsWithinDFB = (Number of units in DavidFinalBondGroup)
                        Unit - Add Ensam är svag ability bonus (+5 All Stats) to (Picked unit)
                        Unit - Set level of Ensam är svag ability bonus (+5 All Stats) for (Picked unit) to UnitsWithinDFB
                    Else - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        ((Picked unit) has buff Brilliance Aura) Equal to False
                        (Level of Ensam är svag ability bonus (+5 All Stats) for (Picked unit)) Not equal to 0
                    Then - Actions
                        Unit - Remove Ensam är svag ability bonus (+5 All Stats) from (Picked unit)
                    Else - Actions

It seems like it won't set the level of Ensam är Svag to the right level, there are 10 friendly heroes, and the ability Ensam är Svag has 10 levels, we had the exact same problem with the last trigger that "almost" worked.
 

vypur85

Hibernate
Reaction score
803
Errr... Post the map? Is the level of the Attribute Bonus done correctly?

Edit:
Anyway, you can remove 'Set David = David 0103 <gen>'. It's not required. Because only David has the ability.
 

Lady MufflaN

New Member
Reaction score
4
Errr... Post the map? Is the level of the Attribute Bonus done correctly?

Edit:
Anyway, you can remove 'Set David = David 0103 <gen>'. It's not required. Because only David has the ability.

I use the Variable David in
Code:
Set DavidFinalBondGroup = (Units within 400.00 of (Position of David) matching ((((Triggering unit) has buff Brilliance Aura) Equal to True) and (((Matching unit) belongs to an ally of (Owner of David)) Equal to True)))

Dunno if I want to post it, I haven't added credits to the map yet and it feels I've bloodily ripped off a few things so far that I haven't given credits for.

Anyway, it don't even give bonus to the unit "David" anymore with this code.

Code:
Alone is Weak Group Copy Copy
    Events
        Time - Every 1.00 seconds of game time
    Conditions
    Actions
        Set David = David 0103 <gen>
        Set DavidFinalBondGroupFriendly = (Units in (Playable map area) matching (((Matching unit) is A Hero) Equal to True))
        Unit Group - Pick every unit in DavidFinalBondGroupFriendly and do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        ((Picked unit) has buff Brilliance Aura) Equal to True
                    Then - Actions
                        Set DavidFinalBondGroup = (Units within 400.00 of (Position of David) matching ((((Triggering unit) has buff Brilliance Aura) Equal to True) and (((Matching unit) belongs to an ally of (Owner of David)) Equal to True)))
                        Set UnitsWithinDFB = (Number of units in DavidFinalBondGroup)
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                (Level of Ensam är svag ability bonus (+5 All Stats) for (Picked unit)) Not equal to UnitsWithinDFB
                            Then - Actions
                                Unit - Add Ensam är svag ability bonus (+5 All Stats) to (Picked unit)
                                Unit - Set level of Ensam är svag ability bonus (+5 All Stats) for (Picked unit) to UnitsWithinDFB
                            Else - Actions
                    Else - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        ((Picked unit) has buff Brilliance Aura) Equal to False
                        (Level of Ensam är svag ability bonus (+5 All Stats) for (Picked unit)) Not equal to 0
                    Then - Actions
                        Unit - Remove Ensam är svag ability bonus (+5 All Stats) from (Picked unit)
                    Else - Actions
 

vypur85

Hibernate
Reaction score
803
Code:
Set DavidFinalBondGroup = (Units within 400.00 of (Position of David) matching (((([B]Triggering unit[/B]) has buff Brilliance Aura) Equal to True) and (((Matching unit) belongs to an ally of (Owner of David)) Equal to True)))

Matching Unit. :p
 

Lady MufflaN

New Member
Reaction score
4
Code:
Set DavidFinalBondGroup = (Units within 400.00 of (Position of David) matching (((([B]Triggering unit[/B]) has buff Brilliance Aura) Equal to True) and (((Matching unit) belongs to an ally of (Owner of David)) Equal to True)))

Matching Unit. :p

Righto, that fixed the part of the units not getting the aura, but it is still not increasing the more friendly heroes are around, it's still static :(
 

vypur85

Hibernate
Reaction score
803
(Responding to PM)

The bug is that if the hero with the skill, learns the skill while there are other friendly heroes close by, those stats are permanently given to the hero with the skill, and do add up on the rest of the normal stats on other heroes if the hero with the ability goes close to them.

Attached. Not sure if it's what you need. And this may not be the most efficient way to do it.

The main trigger:
Code:
Attribute Aura
    Events
        Time - Every 0.25 seconds of game time
    Conditions
    Actions
        Set TempGroup = (Units in (Playable map area) matching ((Level of Abi_YourHeroAbi for (Matching unit)) Greater than 0))
        Unit Group - Pick every unit in TempGroup and do (Actions)
            Loop - Actions
                Set TempPoint = (Position of (Picked unit))
                Set YourHero = (Picked unit)
                Set TempGroup_2 = (Units within 300.00 of TempPoint matching ((((Matching unit) has buff Buff_HeroBuff) Equal to True) and (((Matching unit) belongs to an ally of (Owner of (Picked unit))) Equal to True)))
                -------- The below condition is to make sure that the maximum possible level for the Attribute Bonus --------
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Number of units in TempGroup_2) Less than 10
                    Then - Actions
                        Set Integer = (Number of units in TempGroup_2)
                    Else - Actions
                        Set Integer = 10
                Set Level_Adjustment = (((Level of Abi_YourHeroAbi for YourHero) + 1) x Integer)
                Unit Group - Pick every unit in TempGroup_2 and do (Actions)
                    Loop - Actions
                        -------- The below condition is to make sure that only units without Attribute Bonus are added with Attribute Bonus --------
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                (Level of Abi_AttributeBonus for (Picked unit)) Equal to 0
                            Then - Actions
                                Unit - Add Abi_AttributeBonus to (Picked unit)
                            Else - Actions
                        -------- The below condition is to make sure that the Attribute Bonus is adjusted according to the number of units around the Hero --------
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                (Level of Abi_AttributeBonus for (Picked unit)) Not equal to Level_Adjustment
                            Then - Actions
                                Unit - Set level of Abi_AttributeBonus for (Picked unit) to Level_Adjustment
                            Else - Actions
                Custom script:   call RemoveLocation (udg_TempPoint)
                Custom script:   call DestroyGroup (udg_TempGroup_2)
        Custom script:   call DestroyGroup (udg_TempGroup)
        -------- ======================================================== --------
        -------- ======================================================== --------
        -------- ======================================================== --------
        -------- This is to make sure that units that do not have Brilliance Aura buff to have their Attribute Bonus removed --------
        Set TempGroup = (Units in (Playable map area) matching ((Level of Abi_AttributeBonus for (Matching unit)) Greater than 0))
        Unit Group - Pick every unit in TempGroup and do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        ((Picked unit) has buff Buff_HeroBuff) Equal to False
                    Then - Actions
                        Unit - Remove Abi_AttributeBonus from (Picked unit)
                    Else - Actions
        Custom script:   call DestroyGroup (udg_TempGroup)
 

Attachments

  • Attribute Aura.w3x
    20.3 KB · Views: 108
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