mtasa-blue icon indicating copy to clipboard operation
mtasa-blue copied to clipboard

Add ropes

Open PlatinMTA opened this issue 4 years ago • 5 comments

Is your feature request related to a problem? Please describe. In the vanilla game there is a rope system already implemented. It is used with magnets on the cranes and with a Leviathan on one mission: https://youtu.be/hl48M4Asiqo?t=45

It should be possible to add this functionality into MTA, and it should be faster than the lua alternatives you can create.

Describe the solution you'd like Add a function to create a rope.

Describe alternatives you've considered None. I am not sure how difficult would be to implement this, I am not even sure if it's possible.

Additional context

  • https://youtu.be/RaZIaInVrN4?t=68
  • https://youtu.be/hl48M4Asiqo?t=45
  • https://bugs.mtasa.com/view.php?id=6591

PlatinMTA avatar Dec 26 '21 21:12 PlatinMTA

I was working on this at some point. https://www.youtube.com/watch?v=mbAYMzY_eI4

I have working code with 8 streamed ropes and some functions. Never submitted PR because I wasn't sure if anyone would actually need it. Also, I didn't have tested how does it would behave with multiple players.

The 8 streamed ropes limit could be lifted by reallocating ropes array.

lopezloo avatar Dec 27 '21 03:12 lopezloo

I've also done something similar, https://www.youtube.com/watch?v=pS7ATKOmg9A https://www.youtube.com/watch?v=WCyjRVE2w5M A trick you can use is using a sandbag attach to the vehicle and make it transparent, in this case, you will get spring physics

gta191977649 avatar Dec 27 '21 05:12 gta191977649

I've also done something similar, https://www.youtube.com/watch?v=pS7ATKOmg9A https://www.youtube.com/watch?v=WCyjRVE2w5M A trick you can use is using a sandbag attach to the vehicle and make it transparent, in this case, you will get spring physics

Using a punchingbag (1985) is really clever it would never have occured to me.

PlatinMTA avatar Dec 27 '21 07:12 PlatinMTA

I made Lua implementation (based on this article): https://youtu.be/vXTj-YIlMKc. Rope physics alone already works better than SA one but entity attachement isn't quite working properly. It doesn't interact with world the same way SA rope would. Needs some tweaking.

lopezloo avatar Jan 16 '22 05:01 lopezloo

It's possible to create SA rope by creating object with ID 1382. It spawns with functional rope and magnet which can pick up vehicle. But you can't really manipulate it as MTA lack functionality.

It's possible via this PR: https://github.com/multitheftauto/mtasa-blue/pull/1868 I didn't even know until now. @TheNormalnij

Personally I would disable all SA rope related stuff (so it will be possible to create this object but it won't create rope with magnet). It's unfinished in current state as you can't manipulate it and there is 8 ropes limit.

lopezloo avatar May 25 '22 09:05 lopezloo