View Full Version : trouble with jumping
TheAngryAlterEgo
09-19-2006, 05:34 PM
I'm working on recreating the first level of Super Mario Bros. for class, but I'm having a problem with him jumping on enemies. I can get him to jump on them, but when he lands the enemy doesn't perform the method for dying. In this case, [enemy] is a parameter being used as a Mushroom
Here's what I have coded:
If {both[Mario] is above [enemy]} and {[Mario] is within [.1 meters] of [enemy]}
{[enemy] move down [5 meters]}
Else
{Do Nothing}
Does anyone know what's wrong with this code or the right code to use to make the enemy sink into the ground when it is jumped on?
Try changing the "above [enemy]" to "above [enemy subpart]". Alice does not consider object1 to be above object2 once it passes below object 2's highest subpart (I believe). So it's possible that both of your cases will never be true. You need to play around with the values to find what works best. You'll probably also want to change the "within .1 meters" to something a little larger to get this to work.
beachbum111111
10-25-2010, 01:49 PM
even though they say alice isn't complicated it really is...
Dameria
10-25-2010, 02:20 PM
even though they say alice isn't complicated it really is...
Trust me though, this is nothing compared to the written programming languages like C#, try making a game using that.
Akira101
10-25-2010, 02:53 PM
Trust me though, this is nothing compared to the written programming languages like C#, try making a game using that.
Damn, C++ for me is complicated enough, I can't do much with it, random number generator, prime numbers, and a couple other things is what i can do with C++ from a book, but probably gonna learn LUA Scripting instead since I would like to try it and i play garry's mod alot and the game is practically revolving around lua scripting so its a good since i can test and use it for in-game stuff to make it more fun.