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

Triggers

Status
Not open for further replies.
Level 4
Joined
Jun 11, 2005
Messages
73
I need a trigger that will write three things on the screen and i will be able to choose one of them(click on them)
and another trigger that will do what will happen if i choose one of them.

And also a trigger that will slow or speed up a unit (sometimes) not every 3 secound (for example)
but every 3 secounds or every 5 secounds,or6,
and the 3 or 5 or 6 secounds do not have to happen

in shortly slow unit in random time of game

Can you help me at least with one of them?
 
Level 3
Joined
Jul 6, 2005
Messages
51
1st, we will need to create a few variables!
We need 1 "Dialog" and as many "Dialog Button" you want options!

Mine will be:
DIalog = DialogBOX
Button 1 = Option1
Button 2 = Option2
Button 3 = Option3

The 1st trigger will create a dialogbox on your screen!




Code:
dialogbox
    Events
        Time - Elapsed game time is 5.00 seconds
    Conditions
    Actions
        Dialog - Change the title of DialogBOX to Options!
        Dialog - Create a dialog button for DialogBOX labelled Button 1
        Set Option1 = (Last created dialog Button)
        Dialog - Create a dialog button for DialogBOX labelled Button 2
        Set Option2 = (Last created dialog Button)
        Dialog - Create a dialog button for DialogBOX labelled Button 3
        Set Option3 = (Last created dialog Button)
        Dialog - Show DialogBOX for Player 1 (Red)

The second trigger is when you have clicked one button!

Code:
Button clicked
    Events
        Dialog - A dialog button is clicked for DialogBOX
    Conditions
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Clicked dialog button) Equal to Option1
            Then - Actions
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Clicked dialog button) Equal to Option2
            Then - Actions
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Clicked dialog button) Equal to Option3
            Then - Actions
            Else - Actions

I'v used the if/then/else trigger so that you can use all the options in one trigger! =)
 
Status
Not open for further replies.
Top