Player Script Jump?

Topics regarding Scripting with Reality Factory
Post Reply
User avatar
Vertex
Posts: 108
Joined: Fri May 22, 2015 1:01 am
Location: Colombia
Contact:

Player Script Jump?

Post by Vertex » Thu Jul 09, 2015 7:22 pm

Hello, it failed to set a script for my player skip to precionar the space key. The idea is to do it as the default player, the trecla is preciona this jump and although it has the key pressed, the jump occurs again when I release the space key and pressed again.

Any suggestions, I've been using ForceUp, but not if this is the most recommended, using IskeyDown (...)

I advise?
http://www.iris3dgames.com Reality Factory Spanish :wink:

User avatar
Vertex
Posts: 108
Joined: Fri May 22, 2015 1:01 am
Location: Colombia
Contact:

Re: Player Script Jump?

Post by Vertex » Thu Jul 09, 2015 10:59 pm

Ok, no problem. :D

Code: Select all

	// Pawn Jump.
		if((Jugador.IsKeyDown(Camara.Input.Key.ESPACIO)=true) and (Camara.Config.Jugador.SALTA=false))
		{
			
			if (Camara.Config.Jugador.SALTA = false)
			{
				
				Jugador.ForceUp(50);
			}
			
			Camara.Config.Jugador.SALTA = true;
		}
		
		
		if((Jugador.IsKeyDown(Camara.Input.Key.ESPACIO)=false) and (Camara.Config.Jugador.SALTA=true))
		{
			Camara.Config.Jugador.SALTA = false;
		}
http://www.iris3dgames.com Reality Factory Spanish :wink:

Post Reply