Unity3D and Fungus Tutorial: PickUps

Anonymous
92.1K views

Open Source Your Knowledge, Become a Contributor

Technology knowledge has to be shared and made accessible for free. Join the movement.

Create Content

Receiving a Message

Let's improve the MainFlowchart, so it will listen for an incoming message.

Creating the Block

Select MainFlowchart from the Hierarchy panel and open the editing window. Add a new block called On Coin Collect and add a Debug Log command with some kind of message (for instance 'Coin collected!').

The Debug Log command will trace some information on the Console, for instance errors. We are tracing some text just to be sure that the block is executed.

Debug

Adding a MessageReceived event

With On Coin Collect selected, choose from the Execute On Event drop-down Scene > Message Received and in the Message field insert 'coin-collected'.

Receiving the Message

Save the scene and click the Play button: each time a coin is collected, the console should trace the corresponding message.

Open Source Your Knowledge: become a Contributor and help others learn. Create New Content