• 🏆 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!

Keyboardmovement

This bundle is marked as useful / simple. Simplicity is bliss, low effort and/or may contain minor bugs.
Move the unit with arrowkeys. Now also playable with 12 people =D
Contents

Keyboardmovement (Map)

Reviews
15:52, 8th Oct 2009 TriggerHappy187: I really don't like the way you use waits and enabling/disabling the trigger. Just use a timer. This also leaks a lot of locations, so I will mark this as rejected until updated.

Moderator

M

Moderator

15:52, 8th Oct 2009
TriggerHappy187:

I really don't like the way you use waits and enabling/disabling the trigger. Just use a timer.

This also leaks a lot of locations, so I will mark this as rejected until updated.
 
Level 4
Joined
Oct 4, 2005
Messages
4
desagree
dont think that it is much usefull, as long just one player can use it.
If u want to use in a campaing, well thats diferent, but u cant use it on a meele game ( never ), u cant use it on map tests and etc
but i find this intersting at all, ur ss seems realy good, it shows everything u want to people see in ur sistem, and etc
Gz for the good and well made sistem, but not so usefull at all
 
Div_S, well as I said I will make it be able to be used by lot of players. I just first need to think of a good way how to. I can make 12 of these triggers but I don't think it will be a good idea. :?

It would actually help if you gave an idea of how to make this system being playable with 12 people then saying it is useless because it can't. :D

About it being used in melee map...as soon as you add 1 extra trigger the map becomes non-melee, so you’re right, it can't be used in melee. :p
 
Level 1
Joined
Dec 19, 2005
Messages
3
Just add all the players to the event thing to make it multiplayer, however, key lag on battle.net makes this quite useless for multiplayer maps. (Key lag makes everyone but host have a few seconds delay on the move trigger) Also, this system would mainly be used for maps that don't want to use normal movement system, so the fact that it makes the unit walk instead of instant move makes this even more useless. Oh, and it leaks.
 
I did it! Finally I've made this system be playable with 12 people! :D

Just add all the players to the event thing to make it multiplayer

It's not THAT easy. I’ve used Loop action so it works for all players. :)

I have no infinite triggers so the game would not really lag, and if you want to make units fly instead of walk then that’s cool by me, but move is better then rapid teleportation because it causes less lag and it shows moving animation. :wink:
 
Level 4
Joined
Oct 4, 2005
Messages
4
Well, i think that is better u create 12 triggers just like this than just give this kbmoviment to one player...
If u think that if u do that it is going to be "ugly", its ur decision... :wink:
 
Level 5
Joined
Nov 15, 2005
Messages
172
Very nice work, way better than Azeroth Grand Prix system... It takes like 2-3 secs for the unit to move after arrow keys, this one responds instantly.. its awesome. 4/5, i might even make a new game because of this trigger :wink: . Most people would think that 19 triggers is alot. But for a movement system... wow thats tiny :D .

1 thing, i dont know if you designed it only to move one unit, but even when you select another unit, it still moves the peasant.


::EDIT::
If you did designed it to move one unit, i give it a 5/5 for a game that you only have one unit in.
 
Yeah it was meant to always move the peasant. (In this game) In other games you may update it.

For example, when peasant reaches a region you are able to move a different unit by just modifying the Variables.

I can make work with multiple units at the same time but normally in game it will be a bit messed up if you move like 20 units at the same time.

I think that people normally use it for 1 unit (At a time) in games.
 
Level 5
Joined
Nov 15, 2005
Messages
172
Hey, its me again... I get what you mean, and im going to try and alter the trigger to make it availible for the unit(s) that you are selecting... Ill let you know if i find anything out.
 
Level 5
Joined
Nov 15, 2005
Messages
172
Ok, it was pretty easy to make it go for any unit that you select... took me like 5 mins lol... :lol:

well... heres the trigger HOWEVER: im still working on making it work for 12 players... sorry lol


Unit Setup
Events
Player - Player 1 (Red) Selects a unit
Conditions
Actions
Set MovingUnit[1] = (Triggering unit)
Set MovingUnit[2] = No unit
Set MovingUnit[3] = No unit
Set MovingUnit[4] = No unit
Set MovingUnit[5] = No unit
Set MovingUnit[6] = No unit
Set MovingUnit[7] = No unit
Set MovingUnit[8] = No unit
Set MovingUnit[9] = No unit
Set MovingUnit[10] = No unit
Set MovingUnit[11] = No unit
Set MovingUnit[12] = No unit




::::::::EDIT::::::::

ok, ive made it for 12 players :D . But on the downside... it takes 12 triggers, one for each player. Each trigger looks almost like the trigger above but altered. Observe:


FOR PLAYER 1 ( RED )

Unit Setup
Events
Player - Player 1 (Red) Selects a unit
Conditions
Actions
Set MovingUnit[1] = (Triggering unit)


FOR PLAYER 2 BLUE

Unit Setup Copy2
Events
Player - Player 2 (Blue) Selects a unit
Conditions
Actions
Set MovingUnit[2] = (Triggering unit)


FOR PLAYER 3 TEAL

Unit Setup Copy 3
Events
Player - Player 3 (Teal) Selects a unit
Conditions
Actions
Set MovingUnit[3] = (Triggering unit)




You get the point... you set the variables to match the players and so on.... Well its pretty easy to do. I havent fully tested it yet, tho. I need to test it online to see if the Triggers work for ALL players... Ill get back to you soon after i do that.
 
Level 5
Joined
Nov 15, 2005
Messages
172
I know i might have left like 50 comments for this .. but i found out another way to alter that trigger ... Look... it locks the camera to the unit now :D .

FOR PLAYER 1 RED

Unit Setup

Events
Player - Player 1 (Red) Selects a unit

Conditions

Actions

Set MovingUnit[1] = (Triggering unit)

Camera - Lock camera target for (Triggering player) to (Triggering unit), offset by (0.00, 0.00) using Default rotation

* Bows * thank you, thank you :lol: lol...

Well, im still going to make this trigger more sweet...


::::::::EDIT:::::::::
Wow... i think that the trigger i made allowed you to move any unit that you selected :D . So i added in a condition... it needs to be modified to each played due to the event... Ex. ( if the Trigger event is for blue, then the condition needs to be for blue )

FOR PLAYER 1 RED


Unit Setup
Events
Player - Player 1 (Red) Selects a unit
Conditions
(Owner of (Triggering unit)) Equal to Player 1 (Red)
Actions
Set MovingUnit[1] = (Triggering unit)
Camera - Lock camera target for (Triggering player) to (Triggering unit), offset by (0.00, 0.00) using Default rotation
 
Level 5
Joined
Nov 15, 2005
Messages
172
O.O i found a bug in my trigger...! im trying to fix it... please dont use it yet...

::EDIT::
Ok, nvermind, i just set something wrong... its fine, as is
 
Ok I have updated it. Now only the unit that is selected will move. The camera follows the selected unit. When unit dies or is deselected the camera will stop following him and Arrow keys will not do anything until you select another unit. :D

BrownSnow, I have used quite a different method from yours, I used 3 triggers (1 for select, 1 for deselect and 1 for death). Though you gave me quite a good idea. :wink:
 
Level 8
Joined
Nov 20, 2005
Messages
372
FOR PLAYER 1 ( RED )

Unit Setup
Events
Player - Player 1 (Red) Selects a unit
Conditions
Actions
Set MovingUnit[1] = (Triggering unit)


FOR PLAYER 2 BLUE

Unit Setup Copy2
Events
Player - Player 2 (Blue) Selects a unit
Conditions
Actions
Set MovingUnit[2] = (Triggering unit)

Damn make it easier


FOR ALL PLAYERS

Unit Setup
Events
Player - Player 1 (Red) Selects a unit
Player - Player 2 (Blue) Selects a unit
etc
Conditions
Actions
Set MovingUnit[(Player Number Of(Triggering Player))] = (Triggering unit)


:wink:
 
Level 5
Joined
Aug 16, 2007
Messages
149
quite good, but seems a bit strange when gryphons move: they jerk. I think has to do with not moving far enough ahead and the gryphons catch up before another order has been given. all in all quite good: I'll give it 7/10

by the way the trigger for selection should go like this:

EVENTS
Player - Player 1 (Red) Selects a unit
Player - Player 2 (Blue) Selects a unit
Player - Player 3 (Teal) Selects a unit
Player - Player 4 (Purple) Selects a unit
Player - Player 5 (Yellow) Selects a unit
Player - Player 6 (Orange) Selects a unit
Player - Player 7 (Green) Selects a unit
Player - Player 8 (Pink) Selects a unit
Player - Player 9 (Gray) Selects a unit
Player - Player 10 (Light Blue) Selects a unit
Player - Player 11 (Dark Green) Selects a unit
Player - Player 12 (Brown) Selects a unit

CONDITIONS

ACTIONS
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Number of units in (Units currently selected by (Triggering player))) Equal to 1
Then - Actions
Unit Group - Pick every unit in (Units currently selected by (Triggering player)) and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
And - All (Conditions) are true
Conditions
((Picked unit) is dead) Equal to False
((Picked unit) is A structure) Equal to False
(Owner of (Picked unit)) Equal to (Triggering player)
Then - Actions
Set MovingUnit[(Player number of (Triggering player)] = No unit
Set MovingUnit[(Player number of (Triggering player)] = (Picked unit)
Camera - Lock camera target for (Triggering player) to (Picked unit), offset by (0.00, 0.00) using Default rotation
Else - Actions
Set MovingUnit[(Player number of (Triggering player)] = No unit
Else - Actions
Set MovingUnit[(Player number of (Triggering player)] = No unit

I think you'll find this works better than anything BrownSnow said to do.
 
Level 8
Joined
Jun 1, 2008
Messages
341
Ok so I have this map where u control one hero and i want to have him move by arrow keys, i used this system problem is.. That I have the camera locked to my unit and it is at a low angle. So Whats wrong.. Well basically this system moves in set directions, like 60 Degrees, 180 etc.. I need it to move in the direction the unit is facing when I click the up arrow key, then i need the left and right keys to make him look left and right. The back arrow key should make him automatically turn round.. Can anyone help with this? any idea how i can adapt this system to do that or maybe recommend another system.
 
Level 1
Joined
Sep 7, 2009
Messages
2
Hey I am having trouble getting this to work I went over your triggers and didn't notice anything (I am rusty though) pretty much when I select a nit nothing happens I move the arrow keys and it just moves the map I attempted to alter the triggers and it didn't help. Am I doing something wrong help please
 
Level 10
Joined
Nov 28, 2008
Messages
655
Niice!

Works a lot better than I thought it would.

Still kinda ehh, and bleh for high intensity arena maps and such, but that is the mechanics of the movement itself, so you won't really get around that. Very good system though, good job.
 
Level 13
Joined
May 10, 2009
Messages
868
This contains a lot of leaks and others bad things. o_O
  • Movement Trigger
    • Events
    • Conditions
    • Actions
      • -------- Up Right 45 --------
      • For each (Integer A) from 1 to 12, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • And - All (Conditions) are true
                • Conditions
                  • ZZ_UP_Active[(Integer A)] Equal to True
                  • ZZ_RIGHT_Active[(Integer A)] Equal to True
            • Then - Actions
              • Unit - Order MovingUnit[(Integer A)] to Move To ((Position of MovingUnit[(Integer A)]) offset by ((Current movement speed of MovingUnit[(Integer A)]) + 100.00) towards 45.00 degrees)
              • Wait 1.00 seconds
              • Trigger - Run (This trigger) (checking conditions)
              • Skip remaining actions
            • Else - Actions
              • -------- Up Left 135 --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • And - All (Conditions) are true
                    • Conditions
                      • ZZ_UP_Active[(Integer A)] Equal to True
                      • ZZ_LEFT_Active[(Integer A)] Equal to True
                • Then - Actions
                  • Unit - Order MovingUnit[(Integer A)] to Move To ((Position of MovingUnit[(Integer A)]) offset by ((Current movement speed of MovingUnit[(Integer A)]) + 100.00) towards 135.00 degrees)
                  • Wait 1.00 seconds
                  • Trigger - Run (This trigger) (checking conditions)
                  • Skip remaining actions
                • Else - Actions
                  • -------- Down Right 315 --------
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • And - All (Conditions) are true
                        • Conditions
                          • ZZ_DOWN_Active[(Integer A)] Equal to True
                          • ZZ_RIGHT_Active[(Integer A)] Equal to True
                    • Then - Actions
                      • Unit - Order MovingUnit[(Integer A)] to Move To ((Position of MovingUnit[(Integer A)]) offset by ((Current movement speed of MovingUnit[(Integer A)]) + 100.00) towards 315.00 degrees)
                      • Wait 1.00 seconds
                      • Trigger - Run (This trigger) (checking conditions)
                      • Skip remaining actions
                    • Else - Actions
                      • -------- Down Left 225 --------
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • And - All (Conditions) are true
                            • Conditions
                              • ZZ_DOWN_Active[(Integer A)] Equal to True
                              • ZZ_LEFT_Active[(Integer A)] Equal to True
                        • Then - Actions
                          • Unit - Order MovingUnit[(Integer A)] to Move To ((Position of MovingUnit[(Integer A)]) offset by ((Current movement speed of MovingUnit[(Integer A)]) + 100.00) towards 225.00 degrees)
                          • Wait 1.00 seconds
                          • Trigger - Run (This trigger) (checking conditions)
                          • Skip remaining actions
                        • Else - Actions
                          • -------- Down 270 --------
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • ZZ_DOWN_Active[(Integer A)] Equal to True
                            • Then - Actions
                              • Unit - Order MovingUnit[(Integer A)] to Move To ((Position of MovingUnit[(Integer A)]) offset by ((Current movement speed of MovingUnit[(Integer A)]) + 100.00) towards 270.00 degrees)
                              • Wait 1.00 seconds
                              • Trigger - Run (This trigger) (checking conditions)
                              • Skip remaining actions
                            • Else - Actions
                              • -------- Left 180 --------
                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                • If - Conditions
                                  • ZZ_LEFT_Active[(Integer A)] Equal to True
                                • Then - Actions
                                  • Unit - Order MovingUnit[(Integer A)] to Move To ((Position of MovingUnit[(Integer A)]) offset by ((Current movement speed of MovingUnit[(Integer A)]) + 100.00) towards 180.00 degrees)
                                  • Wait 1.00 seconds
                                  • Trigger - Run (This trigger) (checking conditions)
                                  • Skip remaining actions
                                • Else - Actions
                                  • -------- Up 90 --------
                                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    • If - Conditions
                                      • ZZ_UP_Active[(Integer A)] Equal to True
                                    • Then - Actions
                                      • Unit - Order MovingUnit[(Integer A)] to Move To ((Position of MovingUnit[(Integer A)]) offset by ((Current movement speed of MovingUnit[(Integer A)]) + 100.00) towards 90.00 degrees)
                                      • Wait 1.00 seconds
                                      • Trigger - Run (This trigger) (checking conditions)
                                      • Skip remaining actions
                                    • Else - Actions
                                      • -------- Right 0 --------
                                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                        • If - Conditions
                                          • ZZ_RIGHT_Active[(Integer A)] Equal to True
                                        • Then - Actions
                                          • Unit - Order MovingUnit[(Integer A)] to Move To ((Position of MovingUnit[(Integer A)]) offset by ((Current movement speed of MovingUnit[(Integer A)]) + 100.00) towards 0.00 degrees)
                                          • Wait 1.00 seconds
                                          • Trigger - Run (This trigger) (checking conditions)
                                          • Skip remaining actions
                                        • Else - Actions
                                          • Do nothing
It uses 'Do nothing' too!
I will show for you what the function "do nothing" Do:
JASS:
function DoNothing takes nothing returns nothing
endfunction
 
Level 3
Joined
Sep 9, 2009
Messages
37
How to make it work?

:confused:Could some1 plz tell me, how i shal make this work? Some of u say something about triggers, but i dont know how to mae this work at all... plz tell me, cuz i'm making a 1. person shooting game.:grin:
 
Top