How do I start a custom script using a schematic run by a global machine? And how do I start a global machine using a custom script? Thanks!
  • You can start custom scripts from schematics using the function nodes, e.g. Call Function.

    You can start a global machine from script like this:
    Maki.GlobalMachines.Get(id).Call(machineObject, startingObject, starter);
    id is the ID/index of the global machine (int).
    machineObject and startingObject are game objects, used as the machine/starting objects of the schematic.
    starter is an optional instance of an IExecutionStarter to receive notification when the machine finished, you can just pass null.

    E.g. to start a global machine using the player as game objects:
    Maki.GlobalMachines.Get(id).Call(Maki.Game.Player.GameObject, Maki.Game.Player.GameObject, null);
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Sign In or Register to comment.