Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Jump!!! (https://forums.graalonline.com/forums/showthread.php?t=8293)

LiquidIce00 07-28-2001 05:40 AM

Jump!!!
 
bored so in 10 min I made a little jump code =)
after I eat im gonna work on jumping forward and back or so..
NPC Code:

// NPC made by LiquidIce - Buzy liek always
//jumping

//jump height
this.jumpheight=16;

if (playertouchsme) {
toweapons jump;
}

if (weaponfired) {
disabledefmovement;
playersprite=23;
this.jumpcount=this.jumpheight-1;
while (this.jumpcount>(this.jumpheight-(this.jumpheight*2))) {
if (!onwall(playerx+1.5,playery-this.jumpcount/this.jumpheight)) {
playery-=this.jumpcount/this.jumpheight;
}
else {
if (this.jumpcount>=0) {
putleaps 2,playerx+1.5,playery;
this.jumpcount-=this.jumpcount*2;
}
}
this.jumpcount-=1;
sleep .1;
}
playersprite=0;
enabledefmovement;
}


BeZeRkEr 07-28-2001 10:31 AM

>_<
it'd be better if the shadow stayed and he moved.. and if he didn't go so high
the sprite sucks too >_<

konidias 07-28-2001 10:40 AM

WHY DO YOU USE SLEEP? USE TIMEOUT LIKE ANY SANE GRAAL SCRIPTER.

LiquidIce00 07-28-2001 12:17 PM

Quote:

Originally posted by BeZeRkEr
>_<
it'd be better if the shadow stayed and he moved.. and if he didn't go so high
the sprite sucks too >_<

yeah i noticed that .. I put a showimg with some shadow gif i found. ne1 can do that takes .2 seconds.. and i dunno ne good sprites..

Quote:

Originally posted by konidias
WHY DO YOU USE SLEEP? USE TIMEOUT LIKE ANY SANE GRAAL SCRIPTER.
Because this script freezes the player and he cant move until the loop is done so why use a timeout ? make it useless and add more variables for no reason.

Poogle 07-28-2001 12:41 PM

Stop spaming around

LiquidIce00 07-28-2001 01:50 PM

Quote:

Originally posted by Poogle
Stop spaming around
YOU ARE THE ONE SPAMMING IN EVERY THREAD SAYING ''STOP SPAMMING''
blah!!!!!!!


All times are GMT +2. The time now is 05:44 AM.

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