Help with calculating leap.

Blitz3D Forums/Blitz3D Programming/Help with calculating leap.

Yue(Posted 2012) [#1]
Hello, have someone give me a hint to make a leap to calculate when the character jump if falling vacuum die, regardless of the platform on which it is.

I suck really the matemeticas couple, but I think you can take the cordinate and character while on a platform and when in the air if falls flat die, how I can do this?

Greetings.




Sake906(Posted 2012) [#2]
Haz varios "linepicks" verticales en linea distribuidos a lo largo de la distancia entre el personaje y las coordenadas de destino, antes de que salte (todos en el mismo tick, no en diferentes iteraciones del programa). No será un proceso costoso para el CPU si los picks son solo unos cuantos y cortos.

Si ninguno de los "picks" retorna entidades, esto querrá decir que hay vacío y por lo tanto el personaje caerá.

EN:

Do various linepicks/entitypicks between the current position of the character and the final coordinate where it's supposed to be after the leap. If no entities are returned on any of the picks, it means there is a chasm and thus should fall.

Shouldn't be slow if your line picks are few and their picking distances are short.

Last edited 2012


Yasha(Posted 2012) [#3]
I would have gone with invisible kill-boxes. You can set up a few around the platforms, and have a big one outside the arena to catch any glitched jumps. So you don't test the jump itself at all: stick to testing the current position of the character, as you already do for many things.


Xero(Posted 2012) [#4]
hello, you can do this through code:

If  PlayerOnThePlatform(Player)  <> 0
						
						
PositionY = EntityY(Player)
						
Else 
						
						
						
						
If EntityY(Player) <= PositionY - 50
							
Health = 0

Print  "player dies"
							
End If 
						
						
						
End If 
					


Last edited 2012

Last edited 2012