RigsOfRods / rigs-of-rods

Main development repository for Rigs of Rods soft-body physics simulator
https://www.rigsofrods.org
GNU General Public License v3.0
1.01k stars 175 forks source link

Basic support for plugin scripts. #2840

Closed ohlidalp closed 2 years ago

ohlidalp commented 2 years ago

This feature branch gives you the ability to run AngelScript scripts on launch and have them running continuously until the game shutdown, in both menu and simulation (both single and multiplayer). The game interface is the same which terrain scripts use, with new extension: global object input which lets you retrieve configured controls and current input states.

There is an example script 'demo_script.as' in the "resources/scripts" directory (or 'resources/scripts.zip' package when installed). You can run it by 2 ways:

Showcase of the example script: image image image

This is probably the least-nonsense feature I coded so far.

ohlidalp commented 2 years ago

@tritonas00 Very nice! You may want to add the new -runscript option in -help also

Good idea, done.