Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
(1 edit)

First part, create the Command:

  1. Create a GameObject, rename it as "Target".
  2. Add the GameFlow component.
  3. Add an On Demand program.
  4. Add a Hello World action to the program.
  5. Add a Command block below the On Demand program.
  6. Drag the On Demand into the Program field of the Command.
  7. Rename the Command as "Say Hello".

Second part, using the Command:

  1. Create another GameObject.
  2. Add the GameFlow component.
  3. Add an On Start program.
  4. Add a Send Command action.
  5. Drag the GameObject named Target into the Target field of the Send Command action.
  6. Set "Say Hello" as Command Id.

This is a simple example just to clarify the usage, but Commands are normally used in situations where you need to execute a Program and you can't have the reference to that Program in anticipation like sending a "Die" Command to any GameObject that collides with a trigger. In those cases you would use Send Command with the <Other> parameter as Target, like this: