sonic game moving platform
Posted:
Fri Aug 22, 2008 11:58 pm
by tlah
In the original sonic the hedgehog games, there was a platform that you jumped on and it was moving from left to right. I got it to move, but when sonic stands on it, he doesn't move with it. how can i get him to move along with it?
Re: sonic game moving platform
Posted:
Sat Aug 23, 2008 1:07 am
by makslane
Try this:
When the player collides with the platform, make the platform his parent.
On collision finish, remove the parent.
Re: sonic game moving platform
Posted:
Sat Aug 23, 2008 2:36 pm
by tlah
It works, but when sonic is on it, he moves slower the platform, so if he is just standing there, he falls off. Help!
Re: sonic game moving platform
Posted:
Sat Aug 23, 2008 2:44 pm
by Kalladdolf
could you upload the .ged file + data please?
(if possible)
Re: sonic game moving platform
Posted:
Sat Aug 23, 2008 4:02 pm
by Thanx
Add to the collision event, instead of parenting, add a script editor code:
sonic.xvelocity = platform.xvelocity;
Instead of "sonic" in the code, use the name of the actor that represents sonic, instead of "platform" use the name of the actor that has the moving platform.
If your moving is x = x + 5; though, then you'll have to change it to xvelocity = 5; and make a Key up event for those keys that you use for controling, and say: xvelocity = 0;
This requires a little more work, but it should work that way for sure.
Re: sonic game moving platform
Posted:
Sat Aug 23, 2008 6:20 pm
by tlah
thanx, thanx. (I crack myself up
) Ill let u know if I need further help