n00b Collision Question

OK, I’ve tried the GE before, but, I’m just getting into it again. I’m trying to make a simple (ish) little game (sidescroller) where a cube moves sideways. I’m trying to make a jump key. I’m applying force upwards (with pressing of “W,”), but, he just bounces alot when he comes back down. Is there any way to stop this near-infinite bouncing? I like the way he comes up, and down, just not the bouncing at the end.

I know this is a stupid question, sorry, but I kinda can’t find any way to make it work.

-Kato

add a material to the ground

Wow, er, thanks. That was simple enough.

Is there anything in MaterialButtons that can be changed to go along with this, or, is that it?

-Kato

Clicking the DYN button next to the HSL and RBG buttons gives you some options for a game engine texture.

Ah, thanks.

Okay–I think I’m starting to get the hang of all this, maybe. I know how to make it so when the property health = 0 then I die, but, how do I make it so that this property decreases each time I hit something?

-Kato

Have a “collision” Sensor attached to a “And” then to a “property” actuator, and change “assign” to “add”, then have the property’s name beside “prop:” and -1 beside value.

Hopefull you will be able to figure out the collision sensor yourself :slight_smile: it’s really not that hard.

Thanks a lot! Is there any way to display this property during the game, so I can, er, see it? I want to be sure it’s working and, of course, every game needs a health meter. :slight_smile:

-Kato

For debugging purposes, you can click on the little D next to the property and Turn on Show Debug properties in the Game menu.

This may help you to make the health meter

Thanks, I think that’s working now.

I have a bit of a physics problem again. Occasionally, actually on all the tests I do, after running into the test enemy for a while–my character gets misaligned on the Y-axis and since there will be no control for it, there’s no way to get him back.

I tried to make two planes–pretty thick ones–to block him, but, that didn’t really work. OK, it didn’t work at all.

Is there any sort of solution?

-Kato

Set a Constraint actuator to an Always sensor. Then set the Constraint to LocY, then max=0 and min=0.