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

OMGOMGOMG

UMBWGMG (Unidentified Human Being.)
Reaction score
28
Trigger, I need a trigger that will say who the person receiving the stuff in this trigger:

Trigger:
  • Untitled
    • Events
      • Unit - A unit begins casting an ability
    • Conditions
      • And all (Conditions) are true
        • Conditions
          • Ability being cast equal to Bite
    • Actions
      • If ( All conditions) (THen Actions) (Else actions)
        • If conditions
          • (Random Integer between 0 and 100) is less than 35
        • Then Actions
          • Hero - Make (Triggering unit) learn: Bite.
        • Else Actions
          • (NOTHING IS HERE!)
How do I set the triggering unit with 12 players that play the game?
 

RedOrb

You can change this now in User CP.
Reaction score
14
Have you tested it and it only works with 1 player?
 

OMGOMGOMG

UMBWGMG (Unidentified Human Being.)
Reaction score
28
I will test it with 1 player. But just say the werewolf uses Bite on me, and it works, at 12:00 midnight I turn into one, getting all bite and making myself faster... at nights though, and if the werewolf did that to player 2, how would I do that?
 

Amn

Member
Reaction score
18
this trigger it's already working for all players
( Unit - A unit begins casting an ability )
 

Amn

Member
Reaction score
18
I will test it with 1 player. But just say the werewolf uses Bite on me, and it works, at 12:00 midnight I turn into one, getting all bite and making myself faster... at nights though, and if the werewolf did that to player 2, how would I do that?
to refer to the spell's target use Target Unit of Ability Being Cast instead of triggering unit
 

OMGOMGOMG

UMBWGMG (Unidentified Human Being.)
Reaction score
28
OK, you may/may not know this, but how do I check if it is 12:00 in-game time?

Trying everything 2mrrw after school!
 

Amn

Member
Reaction score
18
for night i'd use this:

Conditions
Game - Time of Day Greater than 21
Game - Time of Day Less than 6
 

OMGOMGOMG

UMBWGMG (Unidentified Human Being.)
Reaction score
28
Thanks, how would I replace a model using triggers?

This is the trigger now:
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 issued order)) 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 (Player group((Matching player))) the text: You feel feverish!
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (In-game time of day) Less than 6.00
              • (In-game time of day) Greater than 21.00
            • Then - Actions
              • Hero - Learn skill for (Triggering unit): Bite
            • Else - Actions
        • Else - Actions
 

OMGOMGOMG

UMBWGMG (Unidentified Human Being.)
Reaction score
28
Bump

I made it into two triggers, so its cleaner... I think:
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>
        • Else - Actions


Second trigger:
Trigger:
  • Player turns into a werewolf
    • Events
    • Conditions
      • (In-game time of day) Less than 6.00
      • (In-game time of day) Greater than 21.00
    • Actions
      • Hero - Learn skill for (Triggering unit): Bite
 

Kayoss666

Member
Reaction score
7
Bump

I made it into two triggers, so its cleaner... I think:
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>
        • Else - Actions


Second trigger:
Trigger:
  • Player turns into a werewolf
    • Events
    • Conditions
      • (In-game time of day) Less than 6.00
      • (In-game time of day) Greater than 21.00
    • Actions
      • Hero - Learn skill for (Triggering unit): Bite

i would just put the second trigger inside a if/then/else action in the first triggers then action but replace a unit by
Trigger:
  • Unit - Replace (Target unit of ability being cast) with a werewolf using The old unit's relative life and mana


you would also have to
Trigger:
  • Actions
    • Set strength = (Strength of (Target unit of ability being cast) (Exclude bonuses))
    • Set exp = (Hero experience of (Target unit of ability being cast))
    • Unit - Replace (Entering unit) with a Blood Mage using The old unit's relative life and mana
    • Hero - Modify Strength of (Last replaced unit): Set to strength
    • Hero - Set (Last replaced unit) experience to exp, Hide level-up graphics

if you want ur attributes and experience to stay the same.
 

Kayoss666

Member
Reaction score
7
or i would do it like this:
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 Werewolf = True
    • Else - Actions


Trigger:
  • Replace Unit
    • Events
      • Game - The in-game time of day becomes Equal to 12.00
    • Conditions
      • Werewolf Equal to True
    • Actions
      • Set strength = (Strength of (Target unit of ability being cast) (Exclude bonuses))
      • Set exp = (Hero experience of (Target unit of ability being cast))
      • Unit - Replace (Entering unit) with a Blood Mage using The old unit's relative life and mana
      • Hero - Modify Strength of (Last replaced unit): Set to strength
      • Hero - Set (Last replaced unit) experience to exp, Hide level-up graphics
      • Hero - Learn skill for (Last replaced unit): Bite
 

OMGOMGOMG

UMBWGMG (Unidentified Human Being.)
Reaction score
28
How would I revert the Werewolf back to human form? IF there is more than one hero just say there is a Girl hero, and a Boy hero, and there is 4 people playing and the boy hero of player 1 gets bit.
 

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


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
              • 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[(Custom value of PlayerUnit[(Integer A)])]
              • Hero - Set (Last replaced unit) experience to exp[(Custom value of PlayerUnit[(Integer A)])], Hide level-up graphics
              • Hero - Learn skill for (Last replaced unit): Bite
              • set WereUnit[(Integer A)] = Last created unit
            • Else - Actions


Trigger:
  • Transform Back
    • Events
      • Game - The in-game time of day becomes Equal to 6.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[(Custom value of (PlayerUnit[(Integer A)]))] = (Strength of (WereUnit[(Integer A)]) (Exclude bonuses))
              • Set exp[(Custom value of (PlayerUnit[(Integer A)]))] = (Hero experience of (WereUnit[(Integer A)]))
              • Unit - Replace (WereUnit[(Integer A)]) with a PlayerUnit[(Integer A)] 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 - Set (Last replaced unit) experience to exp[(Custom value of PlayerUnit[(Integer A)])], Hide level-up graphics
              • Hero - Learn skill for (Last replaced unit): Bite
            • Else - Actions



set each player a custom value 1 to 8.
player1 male: custom value 1
player1 female: custom value 2
player2 male: custom value 3
player2 female: custom value 4
...
 

Kayoss666

Member
Reaction score
7
Whats the PlayerUnit and Werewolf variables?

werewolf is a boolean array the size of the amount of player units those if like you said for players with 2 units each it will be an array of 8.
and playerunit is a unit type array the same length as werewolf that remembers what type of unit changed into a werewolf. so that you can change back to it.
 

OMGOMGOMG

UMBWGMG (Unidentified Human Being.)
Reaction score
28
ok, what about wereunit?

And what I meant was:

if there were 2 units and 4 players were to pick 1 unit each

It wasn't your fault, its mine for not explaining it right

EDIT------------------------------------------------------------------------------------------
Yes, I understand what Wereunit is.
OK would I do

Trigger:
  • For each (Integer A) from 1 to 11, do (Actions)


If I wanted 11 players, each controlling 1 person and 6 characters you can choose from (so 3 female and 3 male heroes to choose from) would it be what I wrote up there?

Trigger:
  • For each (Integer A) from 1 to 11, do (Actions)


If you don't wanna look up in the post xD

Trying everything out tomorrow, not first thing in the morning (After breakfast though)
 

Kayoss666

Member
Reaction score
7
ok, what about wereunit?

And what I meant was:

if there were 2 units and 4 players were to pick 1 unit each

It wasn't your fault, its mine for not explaining it right

EDIT------------------------------------------------------------------------------------------
Yes, I understand what Wereunit is.
OK would I do

Trigger:
  • For each (Integer A) from 1 to 11, do (Actions)


If I wanted 11 players, each controlling 1 person and 6 characters you can choose from (so 3 female and 3 male heroes to choose from) would it be what I wrote up there?

Trigger:
  • For each (Integer A) from 1 to 11, do (Actions)


If you don't wanna look up in the post xD

Trying everything out tomorrow, not first thing in the morning (After breakfast though)

yes it would just be changing the last trigger i said and changing the loop to
Trigger:
  • For each (Integer A) from 1 to 11, do (Actions)
playerunit would keep up with the character each player was.
 

OMGOMGOMG

UMBWGMG (Unidentified Human Being.)
Reaction score
28
Ooohhh nvm I read

Whats the PlayerUnit and Werewolf variables?
werewolf is a boolean array the size of the amount of player units those if like you said for players with 2 units each it will be an array of 8.
and playerunit is a unit type array the same length as werewolf that remembers what type of unit changed into a werewolf. so that you can change back to it.

I read that wrong xD

Again.

Is PlayerUnit a Unit-type or just a unit variable and still how do I get

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
 
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