2 questions at the very least

(CubeFan973) #1

OK, I suck at games, but I’m getting into it for fun. However, I’ve got a newb question, and a possibly-rather-complicated one.

NEWB: How do you make the engine able to play IPOs from a certain position? i.e. you make a cube jump up and down, and want it to jump up and down to get the level finished–but that’s like 80.00 grid units away.

POSSIBLY COMPLICATED: You know those platform games where one can jump onto magically floating platforms or clouds or something, and it moves down from your weight? (“Super Mario Bros.” comes to mind as an example.) How do you do that in the engine?

(Pooba) #2

Ok, teh first is easy. Use an empty to move your cube, and animate the jumping animation on the cube, not an empty. Parent the cube to the empty. Then, when the empty collides with the end of hte level it sends a message to the cube that tells the cube to play your animation (with an ipo acuator).

For the second one you could use an ipo that just makes the cloud or whatever go down a bit. Use a flipper ipo acuator and use a collision sensor on the cloud so whenever your character is coliding with the cloud it activates that flipper ipo.


(saluk) #3

Using ipo for jumping isn’t recomended. You can configure the ipo from the ipo editor to not take into account any axis except for vertical, just delete the curves for the offending axis. But this will only let you get to a certain height, and doesn’t work well for dynamic objects. Another option would be to parent it to the empty as pooba said, and make the empty dynamic. But this wont let you jump to higher platforms because the empty is still on the floor.

Most people accomplish jumping with force, but this doesn’t scale well on different computers. I.E. some people will be able to jump high enough to beat the level, but those who are blessed with fast enough computers will not. And those with slower computers will have rediculously good jumping ability! But anyway, to do it this way:

*add a collision sensor to your cube
*for MA: put in the material name that the floor has (if it doesnt have a material, add one
*connect that to an and controller
*add a keyboard sensor, set it to the jump key
*connect this sensor to the same “and” controller the collision sensor is attached to
*connect the “and” controller to a motion actuator
*give the motion actuator an appropriate force along the vertical axis. You usually have to make it fairly big, because this force is only applied on one frame.

(Pooba) #4

He’s not talking about acually jumping, but when the character gets to the end it plays a little jumping for joy animation then goes to the next level.


(CubeFan973) #5

Actually, I’m talking about how you jump as an action in a level. The thought of those dances that some games have at the end of the level never came to my mind.