Unity3D and Fungus Tutorial: PickUps
Anonymous
88.8K views
Sending a Message
Adding a SendMessage Command to the Flowchart
Select the PickUpCoin prefab inside the project and open its Flowchart.
Modyfing the prefab inside the Project panel has the side effect of modyfing all the connected element in the scene.
Add a Flow > Send Message command and move it just before Destroy.
If the command is placed after Destroy, it won't be executed as the Flowchart will be destroyed before.
From the Message Target menu, select All Flowcharts (so the command can be 'listened' from external _Flowchart_s) and, in the Message field, insert 'coin-collected'.
Pay attention: the message text is case sensitive!
All our coin object in the scene should now have the Send Message.
Create your playground on Tech.io
This playground was created on Tech.io, our hands-on, knowledge-sharing platform for developers.