ID:142119
 
Code:
mob
var
jump_height=3
jumping
in_air
Move(NewLoc)
var/direction=get_dir(src,NewLoc)
.=..()
if(in_air)
if(!jumping)
if(!in_air)
if(direction&NORTH)
jumping=TRUE
in_air=TRUE
do
sleep(3)
while(step(src,direction)&&--jump_height)

jump_height=3
jumping=FALSE

else
var/turf/below=get_step(src,SOUTH)
if(below && below.Enter(src))
in_air=TRUE

if(in_air)
do
sleep(3)
while(step(src,SOUTH))
in_air=FALSE


Problem description:
It goes up normally, no jump.


unless u changed it, it should work - if u updated byond then it stopped working, report in bug reports instead...

Anyways...im sure someone else here will be able to help you.
Obviously, the code doesn't work because you (or someone else) changed it and broke it.

Consider the logical flow here. The only place that sets <code>in_air</code> to true is inside an <code>if(in_air) ...</code> block. Thus there's no way for <code>in_air</code> to change from false to true.
In response to Hobnob
Hobnob wrote:
Obviously, the code doesn't work because you (or someone else) changed it and broke it.

Consider the logical flow here. The only place that sets <code>in_air</code> to true is inside an <code>if(in_air) ...</code> block. Thus there's no way for <code>in_air</code> to change from false to true.
It hasnt changed.
It's been on a DVD for months.
In response to DemonSpree
Then I might suggest it never worked while on DVD, unless there is something else using in_air that you didn't show us. Hobnob has pointed out a logical error, in_air is never set to true, because code to set it to true lives inside a if (in_air) block.

In a good 99%+ cases, problem exists between keyboard and chair. It's not a slur on you, we all do it.
In response to Stephen001
Stephen001 wrote:
Then I might suggest it never worked while on DVD, unless there is something else using in_air that you didn't show us. Hobnob has pointed out a logical error, in_air is never set to true, because code to set it to true lives inside a if (in_air) block.

In a good 99%+ cases, problem exists between keyboard and chair. It's not a slur on you, we all do it.
So should I have in_air set to TRUE always?
DemonSpree wrote:
>       if(in_air)
> if(!jumping)
> if(!in_air)

EDIT: If you saw it, oops.

Initial Reaction: "What? If you've established that you are in the air, why would you ask if you aren't?
In response to Hiro the Dragon King
So... what should I do? :S
In response to DemonSpree
I doubt it, what are you trying to achieve?
In response to Stephen001
Stephen001 wrote:
I doubt it, what are you trying to achieve?
Back when it worked - you'd go up as many times as your jump_height var, then go back down. (Jumping, aka Gravity)