Hero pick and random trigger confliction

NJJ

Cool Member
Reaction score
0
So, when i pick a hero using the pick ability it'll also run the random.trig same with clicking random, it'll also run the pick.trig. I just cant spot the problem, ty in advance.

Code:
Pick
    Events
        Unit - A unit Begins casting an ability
    Conditions
        (Ability being cast) Equal to Pick 
    Actions
        Set pick = (Ability being cast)
        Player - Set (Owner of (Casting unit)) Current lumber to 4
        Camera - Reset camera for (Owner of (Triggering unit)) to standard game-view over 0.00 seconds
        Camera - Set the camera bounds for (Owner of (Triggering unit)) to ABIL1 <gen>
        -------- ----------------- --------
        If ((Unit-type of (Triggering unit)) Equal to |c0066ff66Lady Death|r) then do (Unit - Create 1 |c0066ff66Lady Death|r for (Owner of (Triggering unit)) at (Center of ABIL1 <gen>) facing Default building facing degrees) else do (Do nothing)
        If ((Unit-type of (Triggering unit)) Equal to |c00cc0000Warrior|r) then do (Unit - Create 1 |c00cc0000Warrior|r for (Owner of (Triggering unit)) at (Center of ABIL1 <gen>) facing Default building facing degrees) else do (Do nothing)
        If ((Unit-type of (Triggering unit)) Equal to |c00cc0000Death Knight|r) then do (Unit - Create 1 |c00cc0000Death Knight|r for (Owner of (Triggering unit)) at (Center of ABIL1 <gen>) facing Default building facing degrees) else do (Do nothing)
        If ((Unit-type of (Triggering unit)) Equal to |c0066ff66Bladedancer|r) then do (Unit - Create 1 |c0066ff66Bladedancer|r for (Owner of (Triggering unit)) at (Center of ABIL1 <gen>) facing Default building facing degrees) else do (Do nothing)
        If ((Unit-type of (Triggering unit)) Equal to |c00cc0000Berserker|r) then do (Unit - Create 1 |c00cc0000Berserker|r for (Owner of (Triggering unit)) at (Center of ABIL1 <gen>) facing Default building facing degrees) else do (Do nothing)
        If ((Unit-type of (Triggering unit)) Equal to |c006666ffWitch|r) then do (Unit - Create 1 |c006666ffWitch|r for (Owner of (Triggering unit)) at (Center of ABIL1 <gen>) facing Default building facing degrees) else do (Do nothing)
        -------- ----------------- --------
        Set Hero[(Player number of (Owner of (Triggering unit)))] = (Last created unit)
        Set playerunits[(Player number of (Owner of (Triggering unit)))] = (Last created unit)
        Game - Display to (All players) the text: ((Name of (Owner of (Triggering unit))) + ( has chosen  + ((Name of (Triggering unit)) +  to be his hero.)))
        Selection - Select Active Skills 0025 <gen> for (Owner of (Triggering unit))
        Camera - Pan camera for (Owner of (Triggering unit)) to (Position of (Triggering unit)) over 0.00 seconds
        Unit - Change ownership of (Triggering unit) to Neutral Passive and Change color
        Hero - Modify unspent skill points of (Last created unit): Subtract 1 points
Code:
Random
    Events
        Unit - A unit Begins casting an ability
    Conditions
        (Ability being cast) Equal to Random 
    Actions
        Set Random = (Ability being cast)
        Player - Set (Owner of (Casting unit)) Current lumber to 4
        Camera - Reset camera for (Owner of (Triggering unit)) to standard game-view over 0.00 seconds
        Camera - Set the camera bounds for (Owner of (Triggering unit)) to ABIL1 <gen>
        -------- ----------------- --------
        Unit - Create 1 RandomHero[(Random integer number between 1 and NUMCOUNT)] for (Owner of (Casting unit)) at (Center of ABIL1 <gen>) facing Default building facing degrees
        -------- ----------------- --------
        Set Hero[(Player number of (Owner of (Triggering unit)))] = (Last created unit)
        Set playerunits[(Player number of (Owner of (Triggering unit)))] = (Last created unit)
        Game - Display to (All players) the text: ((Name of (Owner of (Triggering unit))) + ( has randomed  + (Name of (Last created unit))))
        Selection - Select Active Skills 0025 <gen> for (Owner of (Triggering unit))
        Camera - Pan camera for (Owner of (Triggering unit)) to (Position of (Triggering unit)) over 0.00 seconds
        Hero - Modify unspent skill points of (Last created unit): Subtract 1 points
        Unit - Change ownership of (Triggering unit) to Neutral Passive and Change color
Code:
Variables
    Events
        Map initialization
    Conditions
    Actions
        Set RandomHero[1] = |c00cc0000Death Knight|r
        Set RandomHero[2] = |c00cc0000Warrior|r
        Set RandomHero[3] = |c0066ff66Bladedancer|r
        Set RandomHero[4] = |c00cc0000Berserker|r
        Set RandomHero[5] = |c006666ffWitch|r
        Set RandomHero[6] = |c0066ff66Lady Death|r
        -------- Extra for RandomHeroPick --------
        Set NUMCOUNT = 6
        For each (Integer A) from 1 to NUMCOUNT, do (Actions)
            Loop - Actions
                Set NUMBERS[(Integer A)] = (Integer A)
        For each (Integer A) from 1 to 6, do (Actions)
            Loop - Actions
                Set NUMTEMP = (Random integer number between 1 and NUMCOUNT)
                Set UniqueNUM[(Integer A)] = NUMBERS[NUMTEMP]
                Set NUMBERS[NUMTEMP] = NUMBERS[NUMCOUNT]
                Set NUMCOUNT = (NUMCOUNT - 1)
 

Ryushi

"I will stand, or I will fall. I will not sit."
Reaction score
59
Sounds like you used the same base ability for both custom abilities. Abilities based off of the same ability will have the same Order ID, and will conflict with each other. You will need two separate base abilities.
 
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