![]() |
Player Movement Manipulation
Alright, I'm a newb scripter just learning my way around, and I want to know which commands I can use to move a player, not an NPC. The regular "move" won't work, as it only applies to npcs. The general idea of my practice script is to move a player in a random direction when he hits the up key.
I know it would start off as... if (keydown(up)) { } Basically, just what commands are available for player movement manipulation? (something pertaining to x,y I'm sure. o.o) |
playerx = value;
playery = value; you modify the player coordinates directly you want to do this in a timeout loop, your code is not correct since keydown is not an event, but a condition keydown(up) is incorrect, you want to use a number 0 through 3, each number represents a direction 0 up 1 right 2 down 3 left |
You will most likely want to use the onwall2 function.
|
Quote:
Err.....0 is up, 1 is left, 2 is down, and 3 is right. |
| All times are GMT +2. The time now is 04:55 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.