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);
    If you're enjoying my products, updates and support, please consider supporting me on!
Sign In or Register to comment.