1. Find your way through the deepest dungeon in the 18th Mini Mapping Contest Poll.
    Dismiss Notice
  2. A brave new world lies beyond the seven seas. Join the 34th Modeling Contest today!
    Dismiss Notice
  3. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
Hive 3 Remoosed BETA - NOW LIVE. Go check it out at BETA Hive Workshop! Post your feedback in this new forum BETA Feedback.
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Unit movement with keyboard(GUI Trigger)

Discussion in '"Graveyard"' started by NiX_GR_, Sep 8, 2007.

  1. NiX_GR_

    NiX_GR_

    Joined:
    May 11, 2007
    Messages:
    53
    Resources:
    2
    Models:
    2
    Resources:
    2
    In this tutorial I show how to move around with keyboard with one or more units, but only with one player :)sad:).(This will need several triggers)
    First walking forward.
    • Forward On
      • Events
        • Player - Player 1 (Red) Presses the Up Arrow key
      • Conditions
      • Actions
        • Trigger - Turn on Forward <gen>
    NOTE: Make sure you uncheck the "Initially on" so the units selected don't start walking without being ordered to.
    • Forward Functions
      • Events
        • Time - Every 0.01 seconds of game time
      • Conditions
      • Actions
        • Unit Group - Pick every unit in (Units currently selected by Player 1 (Red)) and do (Actions)
          • Loop - Actions
            • Camera - Pan camera for Player 1 (Red) to (Position of (Picked unit)) over 1.00 seconds
            • Unit - Order (Picked unit) to Move To ((Position of (Picked unit)) offset by 110.00 towards (Facing of (Picked unit)) degrees)

    • Forward Off
      • Events
        • Player - Player 1 (Red) Releases the Up Arrow key
      • Conditions
      • Actions
        • Trigger - Turn off Forward <gen>
    Now the turning left triggers.
    • Left On
      • Events
        • Player - Player 1 (Red) Presses the Left Arrow key
      • Conditions
      • Actions
        • Trigger - Turn on Left Functions <gen>
    And again uncheck "Initially On" of the following trigger.
    • Left Functions
      • Events
        • Time - Every 0.01 seconds of game time
      • Conditions
      • Actions
        • Unit Group - Pick every unit in (Units currently selected by Player 1 (Red)) and do (Actions)
          • Loop - Actions
            • Unit - Make (Picked unit) face ((Facing of (Triggering unit)) + 5.00) over 0.01 seconds
    • Left Off
      • Events
        • Player - Player 1 (Red) Releases the Left Arrow key
      • Conditions
      • Actions
        • Trigger - Turn off Left Functions <gen>

    Now the turning right triggers
    • Right On
      • Events
        • Player - Player 1 (Red) Presses the Right Arrow key
      • Conditions
      • Actions
        • Trigger - Turn on Right Functions <gen>
    And again uncheck "Initially on"
    • Right Functions
      • Events
        • Time - Every 0.01 seconds of game time
      • Conditions
      • Actions
        • Unit Group - Pick every unit in (Units currently selected by Player 1 (Red)) and do (Actions)
          • Loop - Actions
            • Unit - Make (Picked unit) face ((Facing of (Triggering unit)) - 5.00) over 0.01 seconds
    • Right Off
      • Events
        • Player - Player 1 (Red) Releases the Right Arrow key
      • Conditions
      • Actions
        • Trigger - Turn off Right Functions <gen>
     
    Last edited: Oct 22, 2007
  2. Mini-Me

    Mini-Me

    Joined:
    Oct 30, 2004
    Messages:
    1,800
    Resources:
    10
    Maps:
    10
    Resources:
    10
    That's 9 leaky, not effective, and simple triggers for just one player :p. You dont need to worry about the credits as I dont think many people will find this usefull.
    If you, or anyone else, wants to see how to do the arrow movement properly, you can check blizzards map Azeroth Grand Prix. Everybody with the newest patch should have it in their maps folder. Its unprotected.
    Also tutorials require more than just someone handing out bunch of triggers.
     
  3. Wolverabid

    Wolverabid

    Joined:
    Oct 23, 2006
    Messages:
    8,302
    Resources:
    5
    Tutorials:
    5
    Resources:
    5