"Falling State" Logic and other bugs.

This is a side-view platform game.

My character jumps onto a box. The box has the property of terrain, which sets a boolean “Falling?” to false.
I walk off the side of the box. The box collision of the character is touching the box side-to-side instead of bottom-to-top for the instant that is falls past the box. Because this boolean still is saying “Falling?: False,” when I land on the monster below who’s logic says:

[Sensor: Character property Falling? : True
(controller: and)
[Radar (pointing up at a narrow angle) detects player

End Object

The monster does not die. Therefore, I cannot jump up and smash the monster when the character is close to the boxes.

If I change the box’s property from ‘terrain’ to ‘floating cube’ or something, – and then my brain stops.

Please help!

i like to use a separate collision sensor under my character’s bounding box(2x2x6 cylinder). its just another cylinder but .1 unit smaller radius and .1 unit tall. i place it directly under the player box and make it a child. give it a collision sensor brick and attach it to the python module the character is running. i call it ‘ground_sens’ and in the python module: ground_sensor = self.sensors[‘ground_sens’]. this way you don’t have to worry about your character thinking it is still on the ground when it obviously isn’t(you’ll have other problems like he’ll be able to jump as long as he’s touch a wall as well as what you already described).

Turn the monster’s radar upside down, and you have a sensor which detects floors directly underneath you!

Depends on how you want the game logic on touching a monster.

Typically it is that way:

A) touching the monster kills you
B) touching the top of the monster kills the monster

You can separate these both situations by two different objects. One for A) surrounds the monster and the one for B) covers the top of the monster.

Thanks for all your replies. I ended up just putting a little radar on the monster. When you walk over it, it kills it if small enough, but if it’s big enough, it tends to work. The problem still exists though – when I walk off a floating block, I do not automatically ‘start falling’ even though my character is floating along the -z axis. There’s a property I set to debug that should be triggered as ‘falling’ yet it doesn’t – even if I have drifted away and float through the air downward away from the floating terrain box, which, when standing on it, sets ‘falling’ to false, which in turn sets it to a controllable ‘walking’ state. This is one I’d really like to figure out, but I think that it might be permanent for now that unless you ‘Jump’ off the side, you’re not technically falling. In this case, if you fall (but not fall like the game logic understands) into an enemy, you’ll ‘take damage’ or whatever.

Some more bugs: :mad:= Really grr ones.

1–I scale everything up in a scene because of something or another, I end up having to rotate, move invisible objects that are used for mesh replacement in crazy ways in order for the mesh taking its place to be oriented properly.

:mad:2–One night, I have a bird that goes up and down. You are below it, you get crushed, you stand on top of it, it lifts you. I loaded up the blend file today, and all of a sudden it’s not interacting with my character – I just fall through the bird.

:mad:3–This one is related to the previous bug somehow. There is the radar that points down from the bird. When I stand under the bird and am close enough for the radar to detect, it kills me, like it should. However, then ‘sometimes’ when I am standing under the bird, even when it’s flown up on the z axis and is far enough away from me, a (what I assume to be a copy) of the radar, or the radar itself, flies by, or on, to me, the character, which is, in that instant, not close enough to the bird (normally) to be affected. So I just stand there and boom, I’m dead.

Post your blend file. It will tell us volumes more about what is going on in your game than you could explain in any number of posts.

About your bugs:

  1. Apply scales after changing them. Get in the habit of hitting ctrl-A after scaling an object in Object mode. It should become second nature, like hitting ctrl-S to Save & Save Often.

  2. Sometimes, not very often, but sometimes, an object will simply stop working for no good reason, and send you into WTF Land. When this happens, try duplicating the object, and delete the original (renaming the duplicate to match the original if needed). This has always fixed things for me. If that doesn’t fix it, than it is probably a genuine error/bug.

  3. This could be any number of things. Again, post your blend file.

TIP: It seems platformers have been trending hard lately. Try looking back through the last few pages of posts on the Support and Discussion forum. There have been a lot of people with a lot of issues concerning platformer construction, and a lot of good answers as well.

Yeah I’ve been to WTFland a few times today. Here is one error that seems to be a straight up bug with the program, and that is –

I was having trouble with my armature/ mesh colliding into one another. I deleted the whole level, all the logic, started over with just an armature and a mesh. I tried every combo of physics, parented this to that, etc.

FINALLY! IT WORKS! They aren’t colliding into one another! I press play, I am jumping! Everything works fine! – And then I decide to move the armature/mesh child-parent away from the origin-- and went straight to WTFland. Immediately after moving it from the origin, it starts shooting around like a bee. I try to reload the file, but I’ve already saved over it working perfectly, after moving it and adding a camera. So I set it back to the origin – but now every time I start, it just starts bouncing straight up and down. I move it away from the origin again, it flies across the screen. Smashes face.

Hate to reply quickly again, but the ‘armature as no collision, with the model as collision set up’ works fine if geometry is set EXACTLY to the origin. So, if you are making your level, it needs to be built from the origin out.