Page 1 of 1

Detect jump?

Posted: Fri May 28, 2004 7:58 pm
by Elgan
hello im trying to detect if someone presses jump


im failing though:(

any ideas?

Code: Select all


plane_jump:
	local.player=parm.other
	//local.t=0
	//while(local.t==1)
	//{


//iprintln "keep"
		if(local.player.stufftext==("+moveup"))
		{
			iprintln "bail out"
			//local.t=1

		}
	//wait .1
	//}
end

try

Posted: Fri May 28, 2004 11:48 pm
by tltrude
Don't know if it will work, but try this.

if(local.player.stufftext == "moveup")

Although, I'm pretty sure you should be looking for something to do with the players "legstate", or "leg_state".

Posted: Fri May 28, 2004 11:57 pm
by Elgan
it doesnt work:(, for now ill use use+fire to bail out:)

the question still remains though;)

bombs

Posted: Sat May 29, 2004 12:14 am
by tltrude
This line is for setting bomb triggers in objective games.

while ( (Isalive local.player) && (local.player cansee self level.bombusefov level.bomb_use_distance) && (local.player.useheld == 1) )

It makes sure the player is looking at the trigger and that he is holding the use key down (there is a 6 second counter with the stopwatch in the while loop). The counter resets to 0 if the player dies, looks away, or lets go of the use key before the bomb is set. That is in the global/obj_dm.scr script, btw.