• 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.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

Hero Movement help

Status
Not open for further replies.
Level 5
Joined
Sep 30, 2010
Messages
106
can anyone explain how to make trigger that makes hero move by keys/arrows? I found a tutorial map that has trigger like that but it not copies properly and it's made badly, so can someone EXPLAIN ho to do that please? :P

thanks for attention :goblin_good_job:
 
Okey, if you want this to work MUI, will you have to spam triggers for this function.

Firstly, you've to create a trigger that starts when the map is initializing that sets unit variables for your wished units/heroes.
  • Set MovingUnit[1]= <YourUnit0001>
  • Set MovingUnit[2]= <YourUnit0002>
  • Set MovingUnit[3]= <YourUnit0003>
  • Set MovingUnit[4]= <YourUnit0004>
Then will you've to make these triggers for each player that is suposed to have the movement system.

  • NorthPress1
    • Events
      • Player - Player 1 (Red) Presses the Up Arrow key
    • Conditions
    • Actions
      • Trigger - Turn on NorthLoop1 <gen>
  • NorthRelease1
    • Events
      • Player - Player 1 (Red) Releases the Up Arrow key
    • Conditions
    • Actions
      • Trigger - Turn off NorthLoop1 <gen>
  • NorthLoop1
    • Events
      • Time - Elapsed game time is 0.30 seconds
    • Conditions
    • Actions
      • -------- Point Variable --------
      • Set TempUnitLoc[1] = (Position of MovingUnit[1])
      • Unit - Move MovingUnit[1] instantly to (TempUnitLoc[1] offset by 100.00 towards (Facing of MovingUnit[1]) degrees)
      • Custom script: call RemoveLocation(udg_TempUnitLoc[1])
Note! Perhaps you'll have to add some time for the event to avoid lagg.



(Notice that these three triggers above are made for player 1)

I havn't tested these triggers yet, since my World Editor doesn't allow me to save my maps no longer somehow.
 
Last edited:
Status
Not open for further replies.
Back
Top