Hi again,
As previously mentioned, I'm using scripts in my game, which means I use a lot of custom messages. It will be really helpful if those worked like Unity events, where you can pickup a method name from a list (i.e. all available argument-less methods), and as a second step that the field went red or similar when the method is no longer there.
That said, I can give it a try myself (at least the first part) if you accept contributions, not sure about that.
Thanks again!
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
The best way to integrate custom scripts is to hook into custom events. See the Manual's "Custom events" chapter for more.
If you want to go down the message-validation route, this could be attempted with a custom Action.
I see, I can use that for some situations, but not everything? For example, interactions for a hotspot, like an inventory interaction. For those I'll need to add a
Button
to theinvButtons
property, and hook it in some way, I assume?In any case, looks like having it in the UI will be a bit more clean just for the wiring.
Adding a custom action will probably not work in those cases either.
Additional events can be added if necessary.
However, OnHotspotInteract is still triggered in the event of using an item on a Hotspot with no defined interaction. If unhandled, the Button parameter will be empty - so a null-check can be used to handle this scenario.