Hello guys i wanted to know how i can add to an object the ability to move vertically?
Please, if possible, attach a small example because after several attempts and hours lost unnecessarily I could not conclude anything.
I use the HTML5 platform so I can not use the path because it is too complex.
Same thing for physical strength because every time unlocking objects move without control and I can not handle it.
Basically you should use force on X axis, but the object have psysic behaviour, youâll have to check froce equivalent with physic.
The simplest is that you provide a simple example in gedevelop of what you have, and tell wich object you want to move. Many parameters have to be known if some objects use physic behaviour.
Maybe Iâve always been badly disagreeable because what I need is an object that goes back and forth a ladder that rises up and down (low high) not an object that just goes down.
But now I try with this code but I think there is still a lot left to complete the steps.
Sorry for the possible cross-posting error is not my intention to violate the rules of the forum but I have not been able to solve the problem then to avoid further problems I attach a video and a screen with the codes so letâs solve it once and for all .
The movement that has to do the platform is to go from side to side and always return in the same direction.
Check out the âBasic platformerâ example, or the âWeb Platformerâ template, they use a system to move the platforms horizontally: There is an object called âGoLeftâ, and another called âGoRightâ, you add a force to the right on the platform until it collides with the âGoLeftâ and change the direction of movement to the left, and so⌠check the example code
Now you just have to copy these events, but with a âGoUpâ and âGoDownâ sprites placed over and under the platform, and add forces to move up and down depending on the object collided.
EDIT: Oh, I can see you are doing it already, sorry , the problem is that you are adding forces in the X axis, instead the Y axis, the signs are OK I think. Remember that you have to set the force damping = 1, so the platform keeps moving even if it isnât colliding with an arrow