Alice Community (http://www.alice.org/community/index.php)
-   How do I...? (http://www.alice.org/community/forumdisplay.php?f=16)
-   -   Help with Jumping onto objects and gravity (http://www.alice.org/community/showthread.php?t=7427)

 Nitrous3 10-20-2011 09:47 PM

Help with Jumping onto objects and gravity

Is it possible?
Suppose I wanted my character to jump above objectwhatever, and as he's landing, descend at a rate where he lands on objectwhatever and can move freely on it
and then once he is no longer above objectwhatever, descend back to the original ground

I'm sure you understand what I'm talking about ..or maybe not. Any help is appreciated.

 GameKid 10-20-2011 10:20 PM

Functions and If/Else statements are crucial to gravity.
Create an event, while the world is running. Then, place a low-poly dummy object at the feet of your character and vehicle the character to the object. Create a method. This is where the dummy object comes in. Select the dummy object, and create a variable to make it move down. Go to the functions tab of the dummy object and scroll down until you see "Distance above". Place that on the amount of meters to move down and select "Ground". A short briefing of what that just did:
While the world is running, dummy object (Character's vehicle) move down dummy object's distance above the ground.
If you want a platform, use an if/else statement in that, using various functions from selecting the world and selecting the dummy object:
If dummy object is above platform: Move down dummy object's distance above platform.
Else: Move down dummy object's distance above ground.
I hope this helps. :)

 Nitrous3 10-29-2011 09:48 PM

I can't seem to get the If/Then to work for your platform statement. The object successfully returns to the ground, but never to the surface of the platform which it's over

 InsertName 10-29-2011 09:50 PM

I tried to make a platformer with mutiple levels, it failed.

 sfunk 10-30-2011 05:08 AM

go this this link, I helped another member with the same problem you are having, there are multiple ways of doing it, just check out each example I put on that thread and pick the one that works for you

 GameKid 10-31-2011 01:13 AM

[QUOTE=Nitrous3;42799]I can't seem to get the If/Then to work for your platform statement. The object successfully returns to the ground, but never to the surface of the platform which it's over[/QUOTE]
Perhaps it didn't work because the statement made was that your character has to be directly above the axis.
This is quite challenging... I'll post again when I think of something.

 dakota95 11-02-2011 01:36 PM

I tryed it and the best way I could come up with was

If:"guy" within 1 meter above "box" move to "box"
move up 1 meter

else:move to ground
move up 1 meter

 All times are GMT -5. The time now is 07:06 AM.