Hello
How do I call a function in an event?
I created an event that describes the name of the function I want to call in Call Function, and loaded that event in Object.
This method didn't work, so please give me some advice.
Sincerely

image
image
  • You don't have an actor set up - your Call Function node image shows that there's a blank actor selected.

    Add an actor in the Event Settings node, it should be the game object that has your script attached. E.g. if it's on the same game object as the event, use the Object actor and enable Event Object.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • Thank you for your reply.
    To add an actor, should I set it in the Set Player node of the attached screen?
    What is an actor's Object?
    Sorry to trouble you, but please tell me
    Sincerely
    image
  • In your Event Settings you can add "Object" Actors. Make a New Actor in the Event Settings and set it to be the Object you have your script attached to. You then can set it as the Target Object of your function in the drop down menu.
  • Does adding "Object" Actors match the red line in the image?
    Nothing can be selected from this list.
    Where should I set the selected Actor on the ork framework screen?
    Also, do I need to add a player for each scene in order to use Ork?
    For example, is it necessary to set to call again after a scene that does not operate the player?
    If you have a tutorial to help you better understand players and actors, please let me know.
    This may be a question due to lack of understanding of Unity, but thank you.
    Sincerely
    image
  • As said, select the Event Settings node, that's where you can set up actors for the event. Once there's an actor added, you can select something in the Actor popup in your Set Player node.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • Sorry for the late reply.
    I finally understood from the explanation.
    I set the event like the attached screen.

    image

    image

    Another thing I would like to confirm is how to call this Event within the Scene.
    I set this Event to Object as attached, but it doesn't seem to start.
    Would you please tell me if there is an easy way?

    image
  • It will depend on the Start Type of your event interaction. You currently have it set to autostart so it should start automatically in the scene provided you have Ork initialized.

    Other options are in that list that allow you to start based on interacting with the object, entering a trigger, or you can even tie a variable to if the event will fire or not. Have you done the tutorial series? It definitely helps with all of the questions you have had.
  • Autostart events start when the scene is loaded - it might be that the player controls are blocked at that time, so enabling In Blocked Controls would ignore that.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Sign In or Register to comment.