Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Player Walk Faster (https://forums.graalonline.com/forums/showthread.php?t=8344)

Poogle 07-29-2001 01:54 AM

Player Walk Faster
 
How do you make people walk faster? is it like:
if (keydown(UP KEY)) {
playery playerx-1;
}
if (keydown(DOWN KEY)) {
playery playerx+1;
}
if (keydown(LEFT KEY)) {
playery playery-1;
}
if (keydown(RIGHT KEY)) {
playery playery+1;
}

freddyfox 07-29-2001 02:06 AM

Re: Player Walk Faster
 
Quote:

Originally posted by Poogle
How do you make people walk faster? is it like:
if (keydown(UP KEY)) {
playery playerx-1;
}
if (keydown(DOWN KEY)) {
playery playerx+1;
}
if (keydown(LEFT KEY)) {
playery playery-1;
}
if (keydown(RIGHT KEY)) {
playery playery+1;
}

That would make them walk through walls.

omni-m00gle 07-29-2001 02:36 AM

try adding some onwall..
(is too lazy to type it up:()

KJS 07-29-2001 02:48 AM

basically do this

NPC Code:
if(created && !isweapon)
toweapons run faster;
if(playerenters&&isweapon)
timeout=0.05
if(timeout){
if(!onwall(playerx,playery)&&!onwall(playerx+3,pla yery)&&!onwall(playerx,playery+3)&&!onwall(playerx +3,playery+3)){
if(keydown(0)){playery-=0.5}
if(keydown(1)){playerx-=0.5}
if(keydown(2)){playery+=0.5}
if(keydown(3)){playerx+=0.5}
}
timeout=0.05;
}



humm well I just made that... dunno if it works... (you might also want to add something were like it checks if they fired the weapon or not...)
(there also might be small glitches in the onwall but it is close enough)

LiquidIce00 07-29-2001 03:22 AM

no KJS ur onwall would be totally messed up ..
do onwall with array but since poogle you are dumb and I dont like you I wont give you the code cuz I had made a 100% perfect onwall one.

Poogle 07-29-2001 03:53 AM

These dont work offline do they?


All times are GMT +2. The time now is 04:15 AM.

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