Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 05-31-2005, 05:27 AM
CaptainSkittles CaptainSkittles is offline
Default Usergroup Title
CaptainSkittles's Avatar
Join Date: May 2005
Posts: 37
CaptainSkittles is an unknown quantity at this point
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)
Reply With Quote
  #2  
Old 05-31-2005, 06:07 AM
Evil_Trunks Evil_Trunks is offline
Evil
Evil_Trunks's Avatar
Join Date: Dec 2004
Posts: 391
Evil_Trunks is on a distinguished road
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
__________________

Reply With Quote
  #3  
Old 05-31-2005, 06:53 AM
Kaimetsu Kaimetsu is offline
Script Monkey
Kaimetsu's Avatar
Join Date: May 2001
Posts: 18,222
Kaimetsu will become famous soon enough
You will most likely want to use the onwall2 function.
__________________

Last edited by Kaimetsu; 05-31-2005 at 07:11 AM..
Reply With Quote
  #4  
Old 06-02-2005, 07:50 PM
CaTigus CaTigus is offline
Scripter
Join Date: Oct 2002
Posts: 80
CaTigus is on a distinguished road
Quote:
Originally Posted by Evil_Trunks
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


Err.....0 is up, 1 is left, 2 is down, and 3 is right.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 02:48 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.