• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Trigger] How to make a....

Status
Not open for further replies.
Level 4
Joined
Nov 28, 2007
Messages
107
How can i make a tornado that runs around that map and if it touches any thing with out trees they die...does any one know?
 
Level 8
Joined
Jan 18, 2007
Messages
331
or you culd make a unit having the skin of a tornado and mak a simple trigger that makes the unit go to random points in a specific region. ofcourse add a trigger thats similar to this one

  • Event
    • - Unit- is 10 from unit(tornado)
  • Condition- any conditions
  • Action-kill unit...
this is verry simple but effective!

hope u like it=)
 
Level 4
Joined
Nov 28, 2007
Messages
107
tx guys i will try it.

can some one tell me how to make a circle that if you say learn ...... (magic name) and it takes some of your gold and youlearn the magic/spell

how do you put a tornado wander?
 
Last edited by a moderator:
Level 4
Joined
Nov 28, 2007
Messages
107
can any one tell me how to make a gate open if a hero is next to it and has to have a key item so it will open.
 
Create a Region in front of the gate you want and make this trigger:

  • Your Trigger
    • Events
      • Unit - A unit enters Region 000 <gen>
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (YourItem is owned) Equal to True
        • Then - Actions
          • Destructible - Open YourGate
        • Else - Actions
          • Do nothing
 
Level 4
Joined
Nov 28, 2007
Messages
107
tx guys you realy helped me.

can you tell me how to make it close after the unit leaves the region.
 
Last edited by a moderator:
Level 6
Joined
Nov 28, 2007
Messages
203
Yes. just w8 a min :)

EDIT 1: Damnit, u posted b4 me :(
EDIT 2: Well, i'll show u another way...
Open:
  • Open Door
    • Events
      • Unit - A unit enters (Region centered at (Position of Gate (Diagonal 1) 0000 <gen>) with size (500.00, 500.00))
    • Conditions
      • ((Triggering unit) has an item of type Key) Equal to True
    • Actions
      • Destructible - Open Gate (Diagonal 1) 0000 <gen>
Close:
  • Close Door
    • Events
      • Unit - A unit leaves (Region centered at (Position of Gate (Diagonal 1) 0000 <gen>) with size (500.00, 500.00))
    • Conditions
      • ((Triggering unit) has an item of type Key) Equal to True
    • Actions
      • Destructible - Close Gate (Diagonal 1) 0000 <gen>
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
  • Unknown
    • Events
      • Unit - A unit leaves Gate_Region
    • Conditions
    • Actions
      • Destructible - Close Your_Gate

This isn't diffrent then the previous one... just the other way around.

[Edit] Lol you guys are fast ^^

You could either use the "Art - Selectable in game", or change it to Debris,Invurable in the "Combat - Targeted As"
 
Level 4
Joined
Nov 28, 2007
Messages
107
lol good luck :D

do you guys want your nick names in my map? Cuz you helped me alot... :)
 
Last edited by a moderator:
Level 4
Joined
Nov 28, 2007
Messages
107
ok humpadumpaa i will put your nick name in the map


can any one tell me how to make a vote in the start of the map so they vote for 3 numbers 15,20,25 (thouse are lvls) and when they vote the most votes win and the victory is set to who ever gets this lvl first
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
I think this should work fine (now don't I love using Integer loops :xxd: Im so happy I learnt how to use them :p).

  • Unknown
    • Events
      • Time - Elapsed game time is 5.00 seconds
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 10, do (Actions)
        • Loop - Actions
          • Dialog - Create a dialog button for Dialog[(Integer A)] labelled 15
          • Set DialogButtons[(Integer A)] = (Last created dialog Button)
      • For each (Integer A) from 11 to 20, do (Actions)
        • Loop - Actions
          • Dialog - Create a dialog button for Dialog[(Integer A)] labelled 20
          • Set DialogButtons[(Integer A)] = (Last created dialog Button)
      • For each (Integer A) from 21 to 30, do (Actions)
        • Loop - Actions
          • Dialog - Create a dialog button for Dialog[(Integer A)] labelled 25
          • Set DialogButtons[(Integer A)] = (Last created dialog Button)
      • For each (Integer A) from 1 to 10, do (Actions)
        • Loop - Actions
          • Dialog - Show Dialog[(Integer A)] for (Player((Integer A)))
  • Unknown2
    • Events
      • Dialog - A dialog button is clicked for Dialog[1]
      • Dialog - A dialog button is clicked for Dialog[2]
      • Dialog - A dialog button is clicked for Dialog[3]
      • Dialog - A dialog button is clicked for Dialog[4]
      • Dialog - A dialog button is clicked for Dialog[5]
      • Dialog - A dialog button is clicked for Dialog[6]
      • Dialog - A dialog button is clicked for Dialog[7]
      • Dialog - A dialog button is clicked for Dialog[8]
      • Dialog - A dialog button is clicked for Dialog[9]
      • Dialog - A dialog button is clicked for Dialog[10]
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 10, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Clicked dialog button) Equal to DialogButtons[(Integer A)]
            • Then - Actions
              • Set Votes[1] = (Votes[1] + 1)
            • Else - Actions
      • For each (Integer A) from 11 to 20, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Clicked dialog button) Equal to DialogButtons[(Integer A)]
            • Then - Actions
              • Set Votes[2] = (Votes[2] + 1)
            • Else - Actions
      • For each (Integer A) from 21 to 30, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Clicked dialog button) Equal to DialogButtons[(Integer A)]
            • Then - Actions
              • Set Votes[3] = (Votes[3] + 1)
            • Else - Actions
  • Unknown3
    • Events
      • Time - Elapsed game time is 20.00 seconds
    • Conditions
    • Actions
      • Trigger - Turn off Unknown2 <gen>
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • And - All (Conditions) are true
            • Conditions
              • Votes[1] Greater than Votes[2]
              • Votes[1] Greater than Votes[3]
        • Then - Actions
          • Actions
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • And - All (Conditions) are true
                • Conditions
                  • Votes[2] Greater than Votes[1]
                  • Votes[2] Greater than Votes[3]
            • Then - Actions
              • Actions
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • And - All (Conditions) are true
                    • Conditions
                      • Votes[3] Greater than Votes[1]
                      • Votes[3] Greater than Votes[2]
                • Then - Actions
                  • Actions
                • Else - Actions
(Dialog[x] = Dialog Variable , DialogButtons[x] = Dialog button Variable , Votes[x] = Integer Variable , all of them are harrayed)

By the way, this was made for 10 players.
If you want to change it just change everything to what suits you.

If you have any questions ill gladly answer BUT im going to sleep right now so ill answer if I need to, tommrow.
 
Level 6
Joined
Nov 28, 2007
Messages
203
it could take more time. right now i got a little problem ^^ searching how to solve it.
EDIT1: Damn u GhostWolf!! XD
 
Level 4
Joined
Nov 28, 2007
Messages
107
O,.,o<-----(does not know how to use values and ?Integer loops? at all)


I got about 100 questions
 
Level 6
Joined
Nov 28, 2007
Messages
203
Well.. this is my version:
  • Voting Trigger1 Prep
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Dialog - Change the title of Dialog_Vote to Level
      • Dialog - Create a dialog button for Dialog_Vote labelled Level 15
      • Set Dialog_Buttons_Vote[1] = (Last created dialog Button)
      • Dialog - Create a dialog button for Dialog_Vote labelled Level 20
      • Set Dialog_Buttons_Vote[2] = (Last created dialog Button)
      • Dialog - Create a dialog button for Dialog_Vote labelled Level 25
      • Set Dialog_Buttons_Vote[3] = (Last created dialog Button)
  • Voting Trigger2 Button1
    • Events
      • Dialog - A dialog button is clicked for Dialog_Vote
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Clicked dialog button) Equal to Dialog_Buttons_Vote[1]
        • Then - Actions
          • Set Integer_Vote[1] = (Integer_Vote[1] + 1)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Clicked dialog button) Equal to Dialog_Buttons_Vote[2]
        • Then - Actions
          • Set Integer_Vote[2] = (Integer_Vote[2] + 1)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Clicked dialog button) Equal to Dialog_Buttons_Vote[3]
        • Then - Actions
          • Set Integer_Vote[3] = (Integer_Vote[3] + 1)
        • Else - Actions
  • Voting Trigger3 Check
    • Events
      • Time - Elapsed game time is 30.00 seconds
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Integer_Vote[1] Greater than Integer_Vote[2]
          • Integer_Vote[1] Greater than Integer_Vote[3]
        • Then - Actions
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Integer_Vote[2] Greater than Integer_Vote[1]
          • Integer_Vote[2] Greater than Integer_Vote[3]
        • Then - Actions
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Integer_Vote[3] Greater than Integer_Vote[1]
          • Integer_Vote[3] Greater than Integer_Vote[2]
        • Then - Actions
        • Else - Actions
Variables used:
Dialog_Buttons_Vote (Dialog Button Array 3)
Dialog_Vote (Dialog)
Integer_Vote (Integer Array 3)
 
Level 4
Joined
Nov 28, 2007
Messages
107
... shit i got left alone o.o ... i will do this tomorrow...

uhhh nothign happened when i used yours humpadumpaa....
 
Last edited by a moderator:
Level 29
Joined
Jul 29, 2007
Messages
5,174
And it wouldn't since humpadumpa never told the WE to actualy SHOW the buttons to the players.

I will explain the basics of integer loops.

A Integer[A/B] loop just tells the game to run that certain loop (and the actions inside it) from x-x.

For example if you will put from 1-10 it will run 10 times, if you put it from 5-20, it will run 15 times, the starting number doesn't really matters UNLESS you are using it for variable harrays like I did.

You could make my trigger with setting it like this:

Set DialogButtons[1] = last clicked button
Set DialogButtons[2] = last clicked button
Set DialogButtons[3] = last clicked button
Set DialogButtons[4] = last clicked button
Set DialogButtons[5] = last clicked button
Etc. for 30 buttons.
But that wouldn't be really fun now would it ?

So instead of that I used the loop for our own good :)

When you make a loop assign a variable harray to be Variable[Integer[A]] its like saying -
When Integar[A] runs 1 - it will be Variable[1] , when the loop gets to 2 it will be Variable[2].
So when I assigned the first buttons (the ones that worth 15) to a loop from 1-10 (will run 10 times) and then DialogButtons[Integer[A]] , It would set 10 harrays which will be DialogButtons[1] , DialogButtons[2] Etc. untill it will get to last loop DialogButtons[10].

I hope this helped, if you need more explaining ill be happy to explain :)
 
Last edited:
Level 6
Joined
Nov 28, 2007
Messages
203
And it wouldn't since humpadumpa never told the WE to actualy SHOW the buttons to the players.

ah-- oops :p here's the new one:
  • Voting Trigger1 Prep
    • Events
      • Time - Elapsed game time is 0.50 seconds
    • Conditions
    • Actions
      • Dialog - Change the title of Dialog_Vote to Level
      • Dialog - Create a dialog button for Dialog_Vote labelled Level 15
      • Set Dialog_Buttons_Vote[1] = (Last created dialog Button)
      • Dialog - Create a dialog button for Dialog_Vote labelled Level 20
      • Set Dialog_Buttons_Vote[2] = (Last created dialog Button)
      • Dialog - Create a dialog button for Dialog_Vote labelled Level 25
      • Set Dialog_Buttons_Vote[3] = (Last created dialog Button)
      • Player Group - Pick every player in (All players) and do (Dialog - Show Dialog_Vote for (Picked player))
 
Level 4
Joined
Nov 28, 2007
Messages
107
so guys how do i make that vote to matter for the victory??

for now my game never ends i want to make it if player gets lvl w/e they vote he wins.
 
Level 6
Joined
Nov 28, 2007
Messages
203
hmm.. what do u mean? I don't understand, i'm kinda tired >.<

EDIT: aha.. I understand now :)
i know how to do it, yes. i'll send u the triggers soon
 
Level 4
Joined
Nov 28, 2007
Messages
107
well how to set victory to if player gets lvl 15 he wins the game.

and how do i make if they vote at the start of the game that the lvl set to 20
then the first person at lvl 20 wins.
 
Level 6
Joined
Nov 28, 2007
Messages
203
Here:
  • Voting Trigger3 Check
    • Events
      • Time - Elapsed game time is 30.00 seconds
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Integer_Vote[1] Greater than Integer_Vote[2]
          • Integer_Vote[1] Greater than Integer_Vote[3]
        • Then - Actions
          • Set Win_Level = 15
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Integer_Vote[2] Greater than Integer_Vote[1]
          • Integer_Vote[2] Greater than Integer_Vote[3]
        • Then - Actions
          • Set Win_Level = 20
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Integer_Vote[3] Greater than Integer_Vote[1]
          • Integer_Vote[3] Greater than Integer_Vote[2]
        • Then - Actions
          • Set Win_Level = 25
        • Else - Actions
  • Win
    • Events
      • Unit - A unit Gains a level
    • Conditions
      • (Level of (Triggering unit)) Equal to Win_Level
    • Actions
      • Game - Victory (Owner of (Triggering unit)) (Show dialogs, Show scores)
New variable: Win_Level (Integer)
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
  • Unknown
    • Events
      • Unit - A unit Gains a level
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • And - All (Conditions) are true
            • Conditions
              • Voted_Number[1] Equal to True
              • (Level of (Triggering unit)) Equal to 15
        • Then - Actions
          • Game - Victory (Owner of (Triggering unit)) (Show dialogs, Show scores)
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • And - All (Conditions) are true
                • Conditions
                  • Voted_Number[2] Equal to True
                  • (Level of (Triggering unit)) Equal to 20
            • Then - Actions
              • Game - Victory (Owner of (Triggering unit)) (Show dialogs, Show scores)
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • And - All (Conditions) are true
                    • Conditions
                      • Voted_Number[3] Equal to True
                      • (Level of (Triggering unit)) Equal to 25
                • Then - Actions
                  • Game - Victory (Owner of (Triggering unit)) (Show dialogs, Show scores)
                • Else - Actions

This will work with my previous trigger if you add in the actions "Set - Voted_Number[x] Equal to true", at the 15 Voted_Number[1] Etc.


[Offtopic]
humpadumpa changed his picture ! (now why the hell would I notice that ? :confused:)

[Edit] Ok humpa's trigger better.
 
Level 6
Joined
Nov 28, 2007
Messages
203
And it wouldn't since humpadumpa never told the WE to actualy SHOW the buttons to the players.

I will explain the basics of integer loops.

A Integer[A/B] loop just tells the game to run that certain loop (and the actions inside it) from x-x.

For example if you will put from 1-10 it will run 10 times, if you put it from 5-20, it will run 15 times, the starting number doesn't really matters UNLESS you are using it for variable harrays like I did.

You could make my trigger with setting it like this:

Set DialogButtons[1] = last clicked button
Set DialogButtons[2] = last clicked button
Set DialogButtons[3] = last clicked button
Set DialogButtons[4] = last clicked button
Set DialogButtons[5] = last clicked button
Etc. for 30 buttons.
But that wouldn't be really fun now would it ?

So instead of that I used the loop for our own good :)

When you make a loop assign a variable harray to be Variable[Integer[A]] its like saying -
When Integar[A] runs 1 - it will be Variable[1] , when the loop gets to 2 it will be Variable[2].
So when I assigned the first buttons (the ones that worth 15) to a loop from 1-10 (will run 10 times) and then DialogButtons[Integer[A]] , It would set 10 harrays which will be DialogButtons[1] , DialogButtons[2] Etc. untill it will get to last loop DialogButtons[10].

I hope this helped, if you need more explaining ill be happy to explain :)

yep.. Got it now :D
 
Level 6
Joined
Nov 28, 2007
Messages
203
This trigger doesn't always work.. if some of the votes will be voted by the same number, the trigger won't work.
any1 got an idea how to make it work? :p

  • Voting Trigger3 Check
    • Events
      • Time - Elapsed game time is 30.00 seconds
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Integer_Vote[1] Greater than Integer_Vote[2]
          • Integer_Vote[1] Greater than Integer_Vote[3]
        • Then - Actions
          • Set Win_Level = 15
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Integer_Vote[2] Greater than Integer_Vote[1]
          • Integer_Vote[2] Greater than Integer_Vote[3]
        • Then - Actions
          • Set Win_Level = 20
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Integer_Vote[3] Greater than Integer_Vote[1]
          • Integer_Vote[3] Greater than Integer_Vote[2]
        • Then - Actions
          • Set Win_Level = 25
        • Else - Actions
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
  • Unknown
    • Events
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Or - Any (Conditions) are true
            • Conditions
              • And - All (Conditions) are true
                • Conditions
                  • Integer_Vote[1] Equal to Integer_Vote[2]
                  • Integer_Vote[1] Equal to Integer_Vote[3]
              • And - All (Conditions) are true
                • Conditions
                  • Integer_Vote[2] Equal to Integer_Vote[1]
                  • Integer_Vote[2] Equal to Integer_Vote[3]
              • And - All (Conditions) are true
                • Conditions
                  • Integer_Vote[3] Equal to Integer_Vote[1]
                  • Integer_Vote[3] Equal to Integer_Vote[2]
        • Then - Actions
          • -------- Either restart pole --------
          • -------- Or maybe do a random one of the three --------
        • Else - Actions
 
Level 4
Joined
Nov 28, 2007
Messages
107
yo guys how can i make a trigetr with 3 buttons that say sand, mist, leaf
and if you press them your hero will apear there after you pick him/her?
 
Level 4
Joined
Nov 28, 2007
Messages
107
  • Unknown
    • Then - Actions
      • -------- Either restart pole --------
      • -------- Or maybe do a random one of the three --------
    • Else - Actions


-------- Either restart pole --------
-------- Or maybe do a random one of the three -------- ??? how to do the random???
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
  • Set Integer = (Random integer number between 1 and 3)
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • Integer Equal to 1
    • Then - Actions
    • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Integer Equal to 2
        • Then - Actions
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Integer Equal to 3
            • Then - Actions
            • Else - Actions
 
Status
Not open for further replies.
Top