Profile image

Moveable Blocks

53.4k PlaneFlightX  20 days ago
163 downloads
Version 1.0 Part

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.

  • Log in to leave a comment
  • Profile image
    53.4k PlaneFlightX

    @vonhubert Good luck!

    +1 9 days ago
  • Profile image
    13.9k vonhubert

    @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(

    +1 9 days ago
  • Profile image
    53.4k PlaneFlightX

    @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.

    11 days ago
  • Profile image
    53.4k PlaneFlightX

    @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.

    12 days ago
  • Profile image
    13.9k vonhubert

    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!

    12 days ago
  • Profile image

    i dont really understand

    17 days ago
  • Profile image

    ??

    17 days ago
  • Profile image
    53.4k PlaneFlightX

    @SWL120NEED You should be able to run this plane. I will tag you on an unlisted with more information soon.

    17 days ago
  • Profile image

    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

    17 days ago
  • Profile image

    i dont even own the mobile or vr one only the pc version

    17 days ago
  • Profile image

    i have a 3090 im on full pc @planeflightx

    17 days ago
  • Profile image
    53.4k PlaneFlightX

    @SWL120NEED What are your device specs?

    17 days ago
  • Profile image

    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

    18 days ago
  • Profile image
    53.4k PlaneFlightX

    @lalalalalion Thanks!

    +2 18 days ago
  • Profile image
    42.4k Graingy

    I like your funny words, magic man.

    +4 19 days ago
  • Profile image
    2,957 lalalalalion

    Great job. I really needed this. I really like it.!!

    +2 19 days ago
  • Profile image
    15.0k BSKPlays2009

    Noice

    +1 19 days ago
  • Profile image
    31.4k IFVuser

    neat

    +2 19 days ago
  • Profile image

    Upvoot

    +3 20 days ago