This is a demonstrator mod for how to script various part behaviors. I created this mod a while ago to learn how to move 3D models with code and felt I should share it with the community so other modders (and normal players) can see how it works.
There are five moving blocks contained in the mod, each with different behaviors.
Moving Block 1: A moving block with three rotation axis and three input controllers.
Moving Block 2: A moving block with three translation axis and three input controllers.
Moving Block 3: A moving block with three scale axis and three input controllers.
Moving Block 4: A moving block with three rotation axis, three translation axis, three scale axis, and nine input controllers.
Moving Block 5: A moving block with two models and a button to toggle between them.
The code for these is pretty simple and slightly outdated compared to newer SWL-120 parts; if anyone has any questions relating to the code, feel free to ask in the comments.
I would also like to credit MOPCKOEDNISHE for helping me add more than one input controller to a part, and MVC for some help with scripting.
@vonhubert Good luck!
@PlaneFlightX Hi! I do in theory know how it works, looked briefly through some tutorials. And thus i totally know that the part i wanted is easily possible, it should be pretty similar just to your block usnig 2 movement and 1 rotation axis, with movement axis values dependent on rotation angle) Unfortunately simply had no time to try and do it myself, last years happen to be not too easy(
@vonhubert One thing my newer SWL-120 mod parts have, especially the new cockpit screens, is various sub-models that move independently within the same mod part. I do this using a foreach loop to access different models and move them (you can also access sub-models of the sub-models by nesting loops, and so on). If you would like more information let me know.
@vonhubert It uses nine input controllers, one for each axis. If you look at the code you can see how it is possible to manipulate the block any way you like, and changing it to just have one translation axis, for example, is pretty easy. And yes, input controllers support FT.
Curious. It seems like Moving Block 4 is exactly what i wanted to make myself insted of a simple piston from the game, to use it for slotted fowler flaps. Does it take FunkyTrees as an input? Eager to take a look!
i dont really understand
??
@SWL120NEED You should be able to run this plane. I will tag you on an unlisted with more information soon.
sorry if its asking for a lot but i really really cant find anything even near as detailed as this, i litteraly havent flown any simpleplanes aircraft besides the swl10 for the past week
i dont even own the mobile or vr one only the pc version
i have a 3090 im on full pc @planeflightx
@SWL120NEED What are your device specs?
hey, @planeflightx i have been searching for a modern aircraft airliner cockpit for simpleplanes and i cant find any of them, could i have an early acess one even if it doesent have the cabin interior? i really dont mind unless it has the cockpit, even if itys not FULLY functional
@lalalalalion Thanks!
I like your funny words, magic man.
Great job. I really needed this. I really like it.!!
Noice
neat
Upvoot