How to use invoke and How can I use Bolt to make a method?

Fox Kin 4 years ago updated 4 years ago 7

not understanding this unit …………for help

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

Hi Fox Kin,

This method is not Bolt related and won't actually work with Bolt events (it expects a C# method name).

If you want to create methods, you can use super units: http://support.ludiq.io/topics/154-super-units/

Are you using this unit because you want a 2 second delay? Can the On Timer Elapsed event do what you want?

Oh so that's why my InvokeRepeating event doesn't work. Is there an easy way to make an event that repeat every 2 seconds?


My suggestion would be to use a state graph for this. 

Right click on the start state and add a self-transition. Change this transition event to On Timer Elapsed. Add your repeating code in On Enter State of the start state. Screenshots:

If you then want to use this inside a flow graph and decide when to start/stop the repetition, you can always use a state unit in which to put the above state graph. For example, here it would only repeat while the mouse is over the object:


Note: I do realize that for a simple delay, creating a state graph is way too much trouble. I will add a Delay node soon, probably when I get around to the tweening integration.

Thanks so much! This is what I really need!!

Thanks so much! Yeah, that would be very convenient.