so in basic i created a small event + cs script to
close door < check door state > open door
image linkso it works for the player via Ork Framework
but my NPC will interact via Script
link to API EventInteraction i jest don't know how to use it
so how i start event Named OpenClose via script
thanks ahead
If you've set up an Event Interaction component, you can start the event through the StartEvent function, e.g.:
interaction.StartEvent(null);
Instead of null, you can also pass a game object that's used as the Starting Object actor in the event.
To start a global event, you can use this code:
ORK.GlobalEvents.CallGlobalEvent(index, null);
index is the ID/index of the global event in the editor list, null again can be replaced by a game object used as the Starting Object actor.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!