Help with Buffs!

N2o)

Retired.
Reaction score
51
I have a triggered ability that relies on "Has Specific Buff". It was working fine 2 versions ago but for some reason now it doesn't. I have checked most of my code and i'm sure its ok, the only thing i see differently is that my buff icon doesn't appear. here are my triggers which concern it but i don't think they affect it.
Code:
Random Rocks
    Events
        Time - Every (Random real number between 3.50 and 6.00) seconds of game time
    Conditions
    Actions
        Custom script:   local location udg_point
        Custom script:   local location udg_position
        Unit Group - Pick every unit in Heroes and do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        ((Picked unit) has buff Random Rocks ) Equal to True
                    Then - Actions
                        Set Position = (Position of (Picked unit))
                        Set Point = (Position offset by (Random real number between 100.00 and 600.00) towards (Random angle) degrees)
                        Unit - Create 1 Random Rock for (Owner of (Picked unit)) at Point facing Default building facing degrees
                        Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
                        Custom script:   call RemoveLocation (udg_Point)
                        Custom script:   call RemoveLocation (udg_Position)
                    Else - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        ((Picked unit) has buff Random Dirt ) Equal to True
                    Then - Actions
                        Set Position = (Position of (Picked unit))
                        Set Point = (Position offset by (Random real number between 100.00 and 600.00) towards (Random angle) degrees)
                        Environment - Change terrain type at Point to Lordaeron Summer - Dirt using variation -1 in an area of size 1 and shape Circle
                        Wait 2.00 seconds
                        Environment - Change terrain type at Point to Icecrown Glacier - Ice using variation -1 in an area of size 1 and shape Circle
                        Custom script:   call RemoveLocation (udg_Point)
                        Custom script:   call RemoveLocation (udg_Position)
                    Else - Actions
Code:
Items
    Events
        Unit - A unit Sells an item (from shop)
    Conditions
    Actions
            If - Conditions
                (Item-type of (Sold Item)) Equal to Random Rocks
            Then - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        Ability[(Player number of (Owner of (Buying unit)))] Not equal to 3
                    Then - Actions
                        Set Ability[(Player number of (Owner of (Buying unit)))] = 3
                        Item - Remove (Sold Item)
                        Unit - Add Magic Random Rocks  to (Buying unit)
                    Else - Actions
                        Item - Remove (Sold Item)
                        Player - Add 1 to (Owner of (Buying unit)) Current gold
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Item-type of (Sold Item)) Equal to Random Dirt
            Then - Actions
                Item - Remove (Sold Item)
                Unit - Add Random Dirt  to (Buying unit)
            Else - Actions
I have tried copying and pasting from the working version and i have checked my abilities and my "Targets Allowed". I also tried a different buff but still no joy. I hope i explained clearly and thanks in advance. :eek:
 

Nigerianrulz

suga suga how'd you get so fly?
Reaction score
198
the only thing i could think of is that u might have accidently removed somethin from it otherwise i dont no :confused:
 
I

i-SCREAM

Guest
On your trigger Items, Shouldn't...
Code:
Ability[(Player number of (Owner of (Buying unit)))] Not equal to 3
...be (Owner of (Selling unit)) and all the others that say buying unit.
 
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