On Destination Reached - How to make a similar Event

Luan 3 years ago updated by Lazlo Bonin (Lead Developer) 3 years ago 1

How would I make something similar to the On Destination Reached event? How does it work?

I looked up the test event (https://gist.github.com/lazlo-bonin/ee2dd7f48e7562e65c383fb10f9c49f)

but it didn't really help me, where do i make the loop to check the conditions? How do i know which functions to override? How can i make the event without outputs? Is it possible to get the source code of this unit alone? Any help is greatly appreciated! As a exemple, lets just suppose i want to make the same exact event but for my custom character locomotion.

Bolt Version:
Unity Version:
Scripting Backend:
.NET Version (API Compatibility Level):

I watched the video, even tho superunits are a good way to make these things, I really want to make them by code, I went into the git provided on the video (https://github.com/RealityStop/Bolt.Addons.Community) and found the On Variable Change node, looking at it i felt so confused, i don't know why these functions are declared, and since there is no documentation of anything on the code side of bolt, im completely lost. In the video the guys says he and people from discord are still trying to figure out events on bolt 1.4, what are the resources they use?

Satisfaction mark by Luan 3 years ago

Hi Luan!

Creating custom units through C# is a complicated process, so I would advise simply using a super unit. Super units can contain events like Update, so you can simply check a condition at every frame and trigger a control output if it is true - voilà, custom event! This is basically all that On Destination Reach does.

Have a look at this video for more explanation between the different ways of extending Bolt: