Movement

  • Thread starter Thread starter ?L?L?
  • Start date Start date
?

?L?L?

Guest
Looking for trigger that allows player to control unit with arrow keys instead of mouse.
 
It is not very difficult to make, but a bit of work.


Create 4 variables called up, down, left and right and create the following triggers (+ the similar triggers for left, right, down, upleft, upright, etc...)


press up trigger

player - player 1 presses the up arrow key

set up=1
trigger - run go up (ignoring conditions)
trigger - run go upRight (ignoring conditions)
trigger - run go upLeft (ignoring conditions)

-----

release up trigger

player - player 1 releases the up arrow key

if right equal to 1 then do trigger - run go right (ignoring conditions) else do nothing
if left equal to 1 then do trigger - run go left (ignoring conditions) else do nothing
set up=0

-----

go up trigger

events: (empty)
conditions: (empty)
actions: if up equal to 1 then do unit - order Knight 0000 to Move To Position of Knight 0000 offset by 10000.00 towards 90.00 degrees else do nothing

-----

stop trigger

time - every 0.01 seconds of game time
conditions: down equal to 0
left equal to 0
right equal to 0
up equal to 0

actions: unit - order knight 0000 to Stop


Good luck. :)
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Ghan Ghan:
    Real users can't really disable Javascript anymore these days.
  • Ghan Ghan:
    The internet is broken without it.
  • Ghan Ghan:
    Bot readable, not human usable.
  • The Helper The Helper:
    got it
  • The Helper The Helper:
    Happy Thursday!
  • The Helper The Helper:
    Check out the new Featured Content feature we apparently got with the forum software upgrade! https://www.thehelper.net/featured/
  • The Helper The Helper:
    Also on the bottom right side bar we now have a Trending Content Box!
    +1
  • The Helper The Helper:
    Not on the Headline News page just on the Forums page can we get that Featured and Trending on the home page?
  • Ghan Ghan:
    Since the home page is technically a forum, it now shows on all forum views. Still in the sidebar.
    +1
  • The Helper The Helper:
    Happy Friday! Hope everyone has a fantastic day and an even better weekend!
  • The Helper The Helper:
    Happy Sunday!
  • The Helper The Helper:
    I lovc that I can post webp and X links now! :)
  • The Helper The Helper:
    Happy Thursday!
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    we were down for a minute - think a log file or something got too big
    +1
  • Ghan Ghan:
    The alerts say it was down for a while unfortunately.
  • Ghan Ghan:
    Didn't know what was going on while I was at work.
  • Ghan Ghan:
    Disk filled up with logs. Fixed now.
    +1
  • The Helper The Helper:
    not a problem at all thanks for getting us back up
  • The Helper The Helper:
    I think the bots are finding a way to get through the anubis
  • The Helper The Helper:
    Happy Wednesday Everyone! Hope everyone has a Fantastic Day!
    +1
  • The Helper The Helper:
    Yeah, stats are showing big bot influx like 12k page views.
  • Wizard Wizard:
    :wave:
    +1
  • Ghan Ghan:
    TH changed his avatar again. 6 more weeks of summer.
    +3
  • Wizard Wizard:
    lol
    +1

The Helper Discord

Members online

No members online now.

Affiliates

Hive Workshop NUON Dome World Editor Tutorials
Back
Top