• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Trigger] Menu? Huh?

Status
Not open for further replies.
Level 2
Joined
May 22, 2007
Messages
12
Heya

I didn't really know where to put this but this was my best guess...

You know in some maps where there is a little menu where you can choose things. For example, in the map "Isle of Despair" after you have chosen your hero, a menu pops up where you choose your profession.

That type of menu is what I need!

I am pretty new to this whole map making thing, but I have checked almost everywhere, both forums and on WE...

But I can't seem to find it :sad:

So, anyone has any idea what I'm talking about?

I couldn't attach the map so here's a link instead
http://hiveworkshop.com/resources_new/maps/2351
 
Level 2
Joined
May 22, 2007
Messages
12
Dialogs, really? I thought Dialogs are just like a piece of text... But you are the experienced guys so...

Anyway, the reason I need this is because in the beginning of my escape map I am working on, I want the players to be able to decide if they want to move by mouse or by the keyboard.

"Massive triggering" sounded kinda hard :p, so do any of you have any other idea of something I could use instead? I had a thought that the players simply type -keyboard or -mouse or something, then the movement triggers runs.

I read through that tutorial and managed to make a dialog for it...
Now I only have one problem, how can I make the triggers run for one player and not for everybody?
 
Last edited by a moderator:
Level 2
Joined
May 22, 2007
Messages
12
Am I stupid or what?

  • Mouse
    • Events
      • Dialog - A dialog button is clicked for MyDialog
    • Conditions
      • (Clicked dialog button) Equal to DialogButton[1]
    • Actions
      • Trigger - Turn off Press Down <gen>
      • Trigger - Turn off Press Left <gen>
      • Trigger - Turn off Press Right <gen>
      • Trigger - Turn off Press Up <gen>
      • Trigger - Turn off Stop <gen>
What should it look like? or is it the Dialog trigger that I should edit?

  • Dialog
    • Events
      • Time - Elapsed game time is 1.00 seconds
    • Conditions
    • Actions
      • Dialog - Clear MyDialog
      • Dialog - Change the title of MyDialog to Mouse or Keyboard?
      • Dialog - Create a dialog button for MyDialog labelled Mouse
      • Set DialogButton[1] = (Last created dialog Button)
      • Dialog - Create a dialog button for MyDialog labelled Keyboard
      • Set DialogButton[2] = (Last created dialog Button)
      • Dialog - Show MyDialog for Player 1 (Red)
 
Level 2
Joined
May 22, 2007
Messages
12
All the players are supposed to be able to choose themselves what type of movement they want... If the first person picks mouse movement, then the triggers would run for all the players

Or am I wrong?
 
Last edited:
Level 21
Joined
Jan 5, 2005
Messages
3,515
If the first person picks mouse movement, then the triggers would run for all the players

only if you dont have a condition that checks whether the person chose mouse or keyboard. by swithing them off they wont work for anyone. what you need is a boolean varaible array from 1-12,, one for each player, which is set to true for mouse and false for keyboard (or whatever). then when that person pressed the mouse button the variable is set true. then if your press down/right/up/left triggers you have a condition checking that the variable for the player number of the triggering player is set to false. do u see what i mean?
 
Level 3
Joined
May 28, 2007
Messages
57
I thinks this would work

Untitled Trigger 004
Events
Dialog - A dialog button is clicked for whateva your dialog is called <variable>
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Clicked dialog button) Equal to Whateva mouse or keyboard) and ((Owner of (Triggering unit)) Equal to Player 1 (Red))
Then - Actions
Trigger - Turn on (whicheva trigger is for mouse or keyboard)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Clicked dialog button) Equal to Whateva mouse or keyboard but opposit to what was pressed before) and ((Owner of (Triggering unit)) Equal to Player 1 (Red))
Then - Actions
Trigger - Turn on (The other movement trigger)
Else - Actions
and so on for each player.

I think this will work i'm not to sure
 
Level 2
Joined
May 22, 2007
Messages
12
Umm, maybe I should just drop this movement thing idea... Since noone will be so dumb to choose keyboard movement anyway...

But no GST_Nemisis, I couldn't really figure out how to do that.

Final_nova: I'm not sure if that worked, tried it but I am not sure if I did it completely right :p

Edit: Rep to all who has helped me btw :)
 
Level 40
Joined
Dec 14, 2005
Messages
10,532
Detect both. Have a boolean array called UsingMouse.

Then, when a player picks one of the buttons, set UsingMouse[Player number of Triggering Player] to true or false respectively. Then, in the movement trigger (or whatever you need this for), just check if they have that type of movement turned on. If so, let them do it. Otherwise, ignore it.
 
Level 21
Joined
Jan 5, 2005
Messages
3,515
Detect both. Have a boolean array called UsingMouse.

Then, when a player picks one of the buttons, set UsingMouse[Player number of Triggering Player] to true or false respectively. Then, in the movement trigger (or whatever you need this for), just check if they have that type of movement turned on. If so, let them do it. Otherwise, ignore it.

yes this is what i mean, you cannot disable or enable the triggers such as Final_Nova described because it will enable or disbale them for everyone, instead of just the triggering player.


this is what i mean:

  • Oh Noes
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Dialog - Clear MyDialog
      • Dialog - Change the title of MyDialog to Mouse or Keyboard?
      • Dialog - Create a dialog button for MyDialog labelled Mouse
      • Set DialogButton[1] = (Last created dialog Button)
      • Dialog - Create a dialog button for MyDialog labelled Keyboard
      • Set DialogButton[2] = (Last created dialog Button)
      • Player Group - Pick every player in (All players) and do (Dialog - Show MyDialog for (Picked player))
then:

  • Oh Noes
    • Events
      • Dialog - A dialog button is clicked for MyDialog
    • Conditions
    • Actions
      • If ((Clicked dialog button) Equal to DialogButton[1]) then do (Set MouseOrKeyboard[(Player number of (Triggering player))] = True) else do (If ((Clicked dialog button) Equal to DialogButton[2]) then do (Set MouseOrKeyboard[(Player number of (Triggering player))] = False) else do (Do nothing))
the above trigger takes into account if there are more than two buttons in the dialog, you can remove the second if then else statement in the trigger and change it to set mouseorkeyboard to false.

then in every trigger with an event dictated by keyboard controls do:

  • Oh Noes
    • Events
      • Player - Player Presses the Left Arrow key
    • Conditions
      • MouseOrKeyboard[(Player number of (Triggering player))] Equal to False
    • Actions
      • Your Actions
and any event dictated by a mouse:

  • Oh Noes
    • Events
      • Unit - A unit Is issued an order targeting an object
      • Unit - A unit Is issued an order targeting a point
      • Unit - A unit Is issued an order with no target
    • Conditions
      • MouseOrKeyboard[(Player number of (Triggering player))] Equal to True
    • Actions
      • Your Actions
you will also need counter balancing commands for the mouse, which is the defualt game movement type, so if a player tries to move a unit using the mouse it will stop them from doing that.
 
Status
Not open for further replies.
Top