Need some help

Stylin Stalin

  • Posts: 8
Hey there, Stencyl Forums. I've been working on my final project for school (Game Programming) in Stencyl, and I've hit some serious snags in my player behavior. Specifically, jumping is going wrong, and I'm not sure why. When I press the jump button, the player just kinda goes up forever, despite the downward force coding, and when i press the jump button again, the flash player just crashes. Also, I'm having trouble getting the bullet to detect which way the player is facing when it spawns.

TL;DR: Game doesn't do what it's supposed to. Wat do?

dtrungle

  • Posts: 1938
You should post your code blocks. Are you using pre-made behaviors?

Vigilence

  • Posts: 62
Does the scene have gravity?

Yodigi7

  • Posts: 16
Yes, the actor must have gravity to be able to stay on the screen. It is a very quick and easy fix.
~Tony :)

Stylin Stalin

  • Posts: 8
Sorry for late reply, haven't been on in a while. But yes, when the actor is created, gravity is enabled.

EDIT: Fixed it by adding gravity to the scene along with the actor, but i still have the problem that it crashes if I press the jump button again in the air.

« Last Edit: May 13, 2013, 08:23:05 am by Stylin Stalin »

dtrungle

  • Posts: 1938
Instead of do after 0.02 and repeat, try do every 0.02 without the repeat and stick in a cancel when you want the timer to stop.