[HELP] I confused.... 1 thing. a and trigger

Kayoss666

Member
Reaction score
7
OK, and how to I get the
Trigger:
  • (Owner of (Target unit of ability being cast)

out of
Trigger:
  • set PlayerUnit[(Custom value of (Owner of (Target unit of ability being cast)))] = Target unit of ability being cast

okay not sure exactly what you are asking?

oh and oops it would be
Trigger:
  • set PlayerUnit[(Custom value of (Target unit of ability being cast))] = Target unit of ability being cast


you dont need the owner part
 

Kayoss666

Member
Reaction score
7
Trigger:
  • Bite
    • Events
    • Unit - A unit Begins casting an ability
    • Conditions
    • And - All (Conditions) are true
    • Conditions
    • (Ability being cast) Equal to Bite
    • (Owner of (Target unit of ability being cast)) Equal to (Matching player)
    • Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
    • (Random integer number between 0 and 100) Less than 35
    • Then - Actions
    • Trigger - Turn on Player turns into a werewolf <gen>
    • set PlayerUnit[(Custom value of (Owner of (Target unit of ability being cast)))] = Target unit of ability being cast
    • Set Werewolf[(Custom value of (Owner of (Target unit of ability being cast)))] = True
    • Set strength[(Custom value of (Owner of (Target unit of ability being cast)))] = (Strength of (Target unit of ability being cast) (Exclude bonuses))
    • Set exp[(Custom value of (Owner of (Target unit of ability being cast)))] = (Hero experience of (Target unit of ability being cast))
    • Else - Actions

yeah change this last four set to not have owner of in them. sorry posted that right before going to bed so i didn't see the mess up
 

OMGOMGOMG

UMBWGMG (Unidentified Human Being.)
Reaction score
28
Ok. now the unit variables are clear.

and also:

Trigger:
  • set PlayerUnit[(Custom value of (Target unit of ability being cast))] = Target unit of ability being cast


should be

Trigger:
  • set PlayerUnit[(Custom value of (Target unit of ability being cast))] = (Target unit of ability being cast)


Correct?
 

Kayoss666

Member
Reaction score
7
Ok. now the unit variables are clear.

and also:

Trigger:
  • set PlayerUnit[(Custom value of (Target unit of ability being cast))] = Target unit of ability being cast


should be

Trigger:
  • set PlayerUnit[(Custom value of (Target unit of ability being cast))] = (Target unit of ability being cast)


Correct?

Correct.
 

OMGOMGOMG

UMBWGMG (Unidentified Human Being.)
Reaction score
28
Ok. lets see if it works, now shall we.

... Adding a message, to see if it works.

The trigger doesn't fire up at all, trigger:
Trigger:
  • Bite
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Bite
      • (Owner of (Target unit of ability being cast)) Equal to (Matching player)
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Random integer number between 0 and 100) Less than 35
        • Then - Actions
          • Game - Display to (All players) the text: TEST
          • Trigger - Turn on Player turns into a Werewolf <gen>
          • Set PlayerUnit[(Custom value of (Target unit of ability being cast))] = (Target unit of ability being cast)
          • Set Werewolf[(Custom value of (Target unit of ability being cast))] = True
          • Set Strength[(Custom value of (Target unit of ability being cast))] = (Strength of (Target unit of ability being cast) (Exclude bonuses))
          • Set Intellagence[(Custom value of (Target unit of ability being cast))] = (Intelligence of (Target unit of ability being cast) (Exclude bonuses))
          • Set Agility[(Custom value of (Target unit of ability being cast))] = (Agility of (Target unit of ability being cast) (Exclude bonuses))
          • Set Exp[(Custom value of (Target unit of ability being cast))] = (Hero experience of (Target unit of ability being cast))
        • Else - Actions
 

Kayoss666

Member
Reaction score
7
Ok. lets see if it works, now shall we.

... Adding a message, to see if it works.

The trigger doesn't fire up at all, trigger:
Trigger:
  • Bite
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Bite
      • (Owner of (Target unit of ability being cast)) Equal to (Matching player)
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Random integer number between 0 and 100) Less than 35
        • Then - Actions
          • Game - Display to (All players) the text: TEST
          • Trigger - Turn on Player turns into a Werewolf <gen>
          • Set PlayerUnit[(Custom value of (Target unit of ability being cast))] = (Target unit of ability being cast)
          • Set Werewolf[(Custom value of (Target unit of ability being cast))] = True
          • Set Strength[(Custom value of (Target unit of ability being cast))] = (Strength of (Target unit of ability being cast) (Exclude bonuses))
          • Set Intellagence[(Custom value of (Target unit of ability being cast))] = (Intelligence of (Target unit of ability being cast) (Exclude bonuses))
          • Set Agility[(Custom value of (Target unit of ability being cast))] = (Agility of (Target unit of ability being cast) (Exclude bonuses))
          • Set Exp[(Custom value of (Target unit of ability being cast))] = (Hero experience of (Target unit of ability being cast))
        • Else - Actions

Try changing the condition:
Trigger:
  • (Owner of (Target unit of ability being cast)) Equal to (Matching player)

to
Trigger:
  • ((Target unit of ability being cast) is A Hero) Equal to True


but only if the units that the players control are set to being heroes.

oh and it just hit me that the units stats might change before the time to change to a wolf so instead of the attribute variables being in this trigger it needs to be in the one that actually changes the unit. like so:

Trigger:
  • Turn into a werewolf
    • Events
      • Game - The in-game time of day becomes Equal to 12.00
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 8, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Werewolf[(Integer A)] Equal to True
            • Then - Actions
              • Set Strength[(Integer A)] = (Strength of (PlayerUnit[(Integer A)]) (Exclude bonuses))
              • Set Intelligence[(Integer A)] = (Intelligence of (PlayerUnit[(Integer A)]) (Exclude bonuses))
              • Set Agility[(Integer A)] = (Agility of (PlayerUnit[(Integer A)]) (Exclude bonuses))
              • Set Exp[(Integer A)] = (Hero experience of (PlayerUnit[(Integer A)]))
              • Unit - Replace (PlayerUnit[(Integer A)]) with a Werewolf using The old unit's relative life and mana
              • Hero - Modify Strength of (Last replaced unit): Set to strength[(Integer A)]
              • Hero - Modify Intelligence of (Last replaced unit): Set to Intelligence[(Integer A)]
              • Hero - Modify Agility of (Last replaced unit): Set to Agility[(Integer A)]
              • Hero - Set (Last replaced unit) experience to exp[(Integer A)], Hide level-up graphics
              • Hero - Learn skill for (Last replaced unit): Bite
              • set WereUnit[(Integer A)] = Last created unit
            • Else - Actions
 

OMGOMGOMG

UMBWGMG (Unidentified Human Being.)
Reaction score
28
I see.

It should look like:
Trigger:
  • Bite
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Bite
      • ((Target unit of ability being cast) is A Hero) Equal to True
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Random integer number between 0 and 100) Less than 35
        • Then - Actions
          • Game - Display to (All players) the text: TEST
          • Trigger - Turn on Player turns into a Werewolf <gen>
          • Set PlayerUnit[(Custom value of (Target unit of ability being cast))] = (Target unit of ability being cast)
          • Set Werewolf[(Custom value of (Target unit of ability being cast))] = True
        • Else - Actions


It fires up, but the
Trigger:
  • Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (Random integer number between 0 and 100) Less than 35
      • Then - Actions
        • Game - Display to (All players) the text: TEST
        • Trigger - Turn on Player turns into a Werewolf <gen>
        • Set PlayerUnit[(Custom value of (Target unit of ability being cast))] = (Target unit of ability being


Part doesn't work.

Maybe if I take out the Conditions part of it, it will work... worth a try :)?

O wait... nevermind, its got a 35% chance of working, so my guess, keep trying and trying and trying untill I get it... :D

So the second trigger Doesn't fire up at all.

Trigger:
  • Player turns into a Werewolf
    • Events
      • Game - The in-game time of day becomes Equal to 18.00
    • Conditions
    • Actions
      • Game - Display to (All players) the text: TEST
      • For each (Integer A) from 1 to 11, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Werewolf[(Integer A)] Equal to True
            • Then - Actions
              • Game - Display to (All players) the text: TEST
              • Set Strength[(Custom value of PlayerUnit[(Integer A)])] = (Strength of PlayerUnit[(Integer A)] (Exclude bonuses))
              • Set Intellagence[(Custom value of PlayerUnit[(Integer A)])] = (Intelligence of WereUnit[(Integer A)] (Exclude bonuses))
              • Set Agility[(Custom value of PlayerUnit[(Integer A)])] = (Agility of WereUnit[(Integer A)] (Exclude bonuses))
              • Set Exp[(Custom value of PlayerUnit[(Integer A)])] = (Hero experience of WereUnit[(Integer A)])
              • Unit - Replace PlayerUnit[(Integer A)] with a Srge. Big Wolf using The old unit's relative life and mana
              • Hero - Modify Strength of (Last replaced unit): Set to Strength[(Custom value of PlayerUnit[(Integer A)])]
              • Hero - Modify Agility of (Last replaced unit): Set to Agility[(Custom value of PlayerUnit[(Integer A)])]
              • Hero - Modify Intelligence of (Last replaced unit): Set to Intellagence[(Custom value of PlayerUnit[(Integer A)])]
              • Hero - Learn skill for (Last replaced unit): Bite
              • Set WereUnit[(Integer A)] = (Last created unit)
            • Else - Actions


That's trigger 2
 

Kayoss666

Member
Reaction score
7
ok lets do this by brute force then.
Change:
Trigger:
  • Bite
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Bite
      • ((Target unit of ability being cast) is A Hero) Equal to True
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Random integer number between 0 and 100) Less than 35
        • Then - Actions
          • Game - Display to (All players) the text: TEST
          • Trigger - Turn on Player turns into a Werewolf <gen>
          • Set PlayerUnit[(Custom value of (Target unit of ability being cast))] = (Target unit of ability being cast)
          • Set Werewolf[(Custom value of (Target unit of ability being cast))] = True
        • Else - Actions
to:
Trigger:
  • Bite
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Bite
      • ((Target unit of ability being cast) is A Hero) Equal to True
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Random integer number between 0 and 100) Less than 35
        • Then - Actions
          • Game - Display to (All players) the text: TEST
          • Trigger - Turn on Player turns into a Werewolf <gen>
          • Set Count = Count + 1
          • Set PlayerUnit[Count] = (Target unit of ability being cast)
          • Set Werewolf[Count] = True
        • Else - Actions

Trigger:
  • Player turns into a Werewolf
    • Events
    • Game - The in-game time of day becomes Equal to 18.00
    • Conditions
    • Actions
    • Game - Display to (All players) the text: TEST
    • For each (Integer A) from 1 to 11, do (Actions)
    • Loop - Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
    • Werewolf[(Integer A)] Equal to True
    • Then - Actions
    • Game - Display to (All players) the text: TEST
    • Set Strength[(Integer A)] = (Strength of PlayerUnit[(Integer A)] (Exclude bonuses))
    • Set Intellagence[(Integer A)] = (Intelligence of PlayerUnit[(Integer A)] (Exclude bonuses))
    • Set Agility[(Integer A)])] = (Agility of PlayerUnit[(Integer A)] (Exclude bonuses))
    • Set Exp[(Integer A)] = (Hero experience of PlayerUnit[(Integer A)])
    • Unit - Replace PlayerUnit[(Integer A)] with a Srge. Big Wolf using The old unit's relative life and mana
    • Hero - Modify Strength of (Last replaced unit): Set to Strength[(Integer A)]
    • Hero - Modify Agility of (Last replaced unit): Set to Agility[(Integer A)]
    • Hero - Modify Intelligence of (Last replaced unit): Set to Intellagence[(Integer A)]
    • Hero - Learn skill for (Last replaced unit): Bite
    • Set WereUnit[(Integer A)] = (Last created unit)
    • Else - Actions
 

OMGOMGOMG

UMBWGMG (Unidentified Human Being.)
Reaction score
28
What is the Count variable?

So Count variable is a integer, correct?

It worked :).

time for the third trigger to do its thing.

OK, it goes but the unit isn't changing.

Trigger:
Trigger:
  • Player reverts back to normal
    • Events
      • Game - The in-game time of day becomes Equal to 6.00
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 11, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Werewolf[(Integer A)] Equal to True
            • Then - Actions
              • Game - Display to (All players) the text: TEST
              • Set Strength[(Integer A)] = (Strength of PlayerUnit[(Integer A)] (Exclude bonuses))
              • Set Intellagence[(Integer A)] = (Intelligence of PlayerUnit[(Integer A)] (Exclude bonuses))
              • Set Agility[(Integer A)] = (Agility of PlayerUnit[(Integer A)] (Exclude bonuses))
              • Set Exp[(Integer A)] = (Hero experience of PlayerUnit[(Integer A)])
              • Unit - Replace WereUnit[(Integer A)] with a (Unit-type of PlayerUnit[(Integer A)]) using The old unit's relative life and mana
              • Hero - Modify Strength of (Last replaced unit): Set to Strength[(Integer A)]
              • Hero - Modify Agility of (Last replaced unit): Set to Agility[(Integer A)]
              • Hero - Modify Intelligence of (Last replaced unit): Set to Intellagence[(Integer A)]
            • Else - Actions


Trying everything tomorrow
 

Kayoss666

Member
Reaction score
7
What is the Count variable?

So Count variable is a integer, correct?

It worked :).

time for the third trigger to do its thing.

OK, it goes but the unit isn't changing.

Trigger:
Trigger:
  • Player reverts back to normal
    • Events
      • Game - The in-game time of day becomes Equal to 6.00
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 11, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Werewolf[(Integer A)] Equal to True
            • Then - Actions
              • Game - Display to (All players) the text: TEST
              • Set Strength[(Integer A)] = (Strength of PlayerUnit[(Integer A)] (Exclude bonuses))
              • Set Intellagence[(Integer A)] = (Intelligence of PlayerUnit[(Integer A)] (Exclude bonuses))
              • Set Agility[(Integer A)] = (Agility of PlayerUnit[(Integer A)] (Exclude bonuses))
              • Set Exp[(Integer A)] = (Hero experience of PlayerUnit[(Integer A)])
              • Unit - Replace WereUnit[(Integer A)] with a (Unit-type of PlayerUnit[(Integer A)]) using The old unit's relative life and mana
              • Hero - Modify Strength of (Last replaced unit): Set to Strength[(Integer A)]
              • Hero - Modify Agility of (Last replaced unit): Set to Agility[(Integer A)]
              • Hero - Modify Intelligence of (Last replaced unit): Set to Intellagence[(Integer A)]
            • Else - Actions


Trying everything tomorrow

First: in this Set Strength[(Integer A)] = (Strength of PlayerUnit[(Integer A)] (Exclude bonuses))
Set Intellagence[(Integer A)] = (Intelligence of PlayerUnit[(Integer A)] (Exclude bonuses))
Set Agility[(Integer A)] = (Agility of PlayerUnit[(Integer A)] (Exclude bonuses))
Set Exp[(Integer A)] = (Hero experience of PlayerUnit[(Integer A)])
the PlayerUnit[(Integer A)] should be WereUnit[(Integer A)].
and you forget experience at the end.

lol: wow i didn't even notice but the problem lies in the setting of wereunit it should be:
Trigger:
  • Set WereUnit[(Integer A)] = (Last replaced unit)
 

OMGOMGOMG

UMBWGMG (Unidentified Human Being.)
Reaction score
28
Heh I had that, but deleted it to try it out. it didn't work with wereunit in it.

and didn't notice the exp at the end, I was up at 0100 last night
 

Kayoss666

Member
Reaction score
7
Heh I had that, but deleted it to try it out. it didn't work with wereunit in it.

and didn't notic the exp at the end, I was up at 0100 last night

yeah cuz wereunit needs to be set to last replaced unit and the whole thing should work. and i was up til like 3 last nighy
 

OMGOMGOMG

UMBWGMG (Unidentified Human Being.)
Reaction score
28
Ok what about this part of trigger:
Trigger:
  • Unit - Replace WereUnit[(Integer A)] with a (Unit-type of playerUnit[(Integer A)]) using The old unit's relative life and mana


Do I replace WereUnit with player unit and playerunit with wereunit?
 

OMGOMGOMG

UMBWGMG (Unidentified Human Being.)
Reaction score
28
They aren't changing back.... my bad typo.

I never set PlayerUnit, so Warcraft 3 doesn't know what Variable PlayerUnit is.
 

Kayoss666

Member
Reaction score
7
have you changed:
Trigger:
  • Set WereUnit[(Integer A)] = (Last created unit)

with
Trigger:
  • Set WereUnit[(Integer A)] = (Last replaced unit)


in the turn to a wolf trigger
 

OMGOMGOMG

UMBWGMG (Unidentified Human Being.)
Reaction score
28
I never set PlayerUnit, so Warcraft 3 doesn't know what Variable PlayerUnit is.

and No.

The PlayerUnit thing isn't the problem.
3rd trigger
Trigger:
  • Player reverts back to normal
    • Events
      • Game - The in-game time of day becomes Equal to 6.00
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 11, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Werewolf[(Integer A)] Equal to True
            • Then - Actions
              • Game - Display to (All players) the text: TEST
              • Set Strength[(Integer A)] = (Strength of PlayerUnit[(Integer A)] (Exclude bonuses))
              • Set Intellagence[(Integer A)] = (Intelligence of PlayerUnit[(Integer A)] (Exclude bonuses))
              • Set Agility[(Integer A)] = (Agility of PlayerUnit[(Integer A)] (Exclude bonuses))
              • Set Exp[(Integer A)] = (Hero experience of PlayerUnit[(Integer A)])
              • Unit - Replace WereUnit[(Integer A)] with a (Unit-type of PlayerUnit[(Integer A)]) using The old unit's relative life and mana
              • Hero - Modify Strength of (Last replaced unit): Set to Strength[(Integer A)]
              • Hero - Modify Agility of (Last replaced unit): Set to Agility[(Integer A)]
              • Hero - Modify Intelligence of (Last replaced unit): Set to Intellagence[(Integer A)]
              • Hero - Set (Last replaced unit) experience to Exp[(Integer A)], Hide level-up graphics
              • Set WereUnit[(Integer A)] = (Last replaced unit)
              • Set PlayerUnit[(Integer A)] = (Last created unit)
            • Else - Actions

2nd trigger
Trigger:
  • Player turns into a Werewolf
    • Events
      • Game - The in-game time of day becomes Greater than or equal to 18.00
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 11, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Werewolf[(Integer A)] Equal to True
            • Then - Actions
              • Game - Display to (All players) the text: TEST
              • Set Strength[(Integer A)] = (Strength of PlayerUnit[(Integer A)] (Exclude bonuses))
              • Set Intellagence[(Integer A)] = (Intelligence of PlayerUnit[(Integer A)] (Exclude bonuses))
              • Set Agility[(Integer A)] = (Agility of PlayerUnit[(Integer A)] (Exclude bonuses))
              • Set Exp[(Integer A)] = (Hero experience of PlayerUnit[(Integer A)])
              • Unit - Replace PlayerUnit[(Integer A)] with a Srge. Big Wolf using The old unit's relative life and mana
              • Hero - Modify Strength of (Last replaced unit): Set to Strength[(Integer A)]
              • Hero - Modify Agility of (Last replaced unit): Set to Agility[(Integer A)]
              • Hero - Modify Intelligence of (Last replaced unit): Set to Intellagence[(Integer A)]
              • Hero - Set (Last replaced unit) experience to Exp[(Integer A)], Hide level-up graphics
              • Hero - Learn skill for (Last replaced unit): Bite
              • Set WereUnit[(Integer A)] = (Last created unit)
              • Set PlayerUnit[(Integer A)] = (Last replaced unit)
            • Else - Actions

1st trigger
Trigger:
  • Bite
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Bite
      • ((Target unit of ability being cast) is A Hero) Equal to True
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Random integer number between 0 and 100) Less than 35
        • Then - Actions
          • Game - Display to (All players) the text: TEST
          • Trigger - Turn on Player turns into a Werewolf <gen>
          • Set Count = (Count + 1)
          • Set PlayerUnit[Count] = (Target unit of ability being cast)
          • Set Werewolf[Count] = True
        • Else - Actions
 

Kayoss666

Member
Reaction score
7
They aren't changing back.... my bad typo.

I never set PlayerUnit, so Warcraft 3 doesn't know what Variable PlayerUnit is.

PlayerUnit should be set in the first trigger of bite by:

Trigger:
  • set PlayerUnit[count] = (Target unit of ability being cast)
 
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