To handle the Collision, you will need to use the “Collision” event node and setting the “Target” to be your train collider for example (or Self, if the flowScript is already on the same gameobject as the train collider).
As for setting the maxSpeed float field on your code script, you can simply drag and drop the gameobject that contains your script. Doing so will open up a menu with possible things you can do with that object (get/set fields, get/set properties, execution methods and so on). Selecting Set Max Speed (will be categorized under your script’s name in that menu), will create a node.
Once you have both nodes in the graph (event and set field node), it is a matter of connecting the nodes and assigning the node parameters
If you have any further questions, please let me know.
Thanks.
Join us on Discord: https://discord.gg/97q2Rjh
Login
Register
By registering on this website you agree to our Privacy Policy.