PDA

View Full Version : Jump!!!


LiquidIce00
07-28-2001, 05:40 AM
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 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
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..

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
Originally posted by Poogle
Stop spaming around

YOU ARE THE ONE SPAMMING IN EVERY THREAD SAYING ''STOP SPAMMING''
blah!!!!!!!