![]() |
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. |
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. :) |
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
|
I tried to make a platformer with mutiple levels, it failed.
|
[url]http://alice.org/community/showthread.php?t=6897[/url]
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 |
[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. |
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. |
Copyright ©2021, Carnegie Mellon University
Alice 2.x © 1999-2012, Alice 3.x © 2008-2012, Carnegie Mellon University. All rights reserved.