Joint extension help please

adytt

  • Posts: 50
Hello I need to code a behaviour for 2 platforms that are connected by a rope and 2 pulleys  something similar to the ones found in Super Mario games  just like in the picture attached.  so that when the actor jumps on one platform  it will go down and the other will go up.
I have downloaded and installed the Joint extension, yet there is no info of how to use blocks, as the examples on stencylForge such as Joint Sandbox no longer works.
I believe I should use the pulley  joint type block and such, yet if someone already coded something similar and would like to share some info please help.
Looking forward to get some info.
Kind regards!

adytt

  • Posts: 50
I have figured out how to create the puley joint by using this block of code attached bellow  and it seems to work.

When jumping on a platform it will go down while the other will go up.
However I need some help to make the platforms stop once they reach the maximum or minimum travel distance up or down as for now they move above the limits defined.
I believe this needs to be coded  in an "always event" yet I don't now if there are specific blocks build in this extension that can be used.

« Last Edit: March 17, 2021, 10:52:27 am by adytt »

adytt

  • Posts: 50
I managed to make it work by adding some invisble actors at the top and bottom edges that colides with the platforms, so that the platforms won't cross the maximum and minimum spots.