Set Actor at Runtime?

Slate Forums Support Set Actor at Runtime?

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #2196
    chopjzl
    Participant

    Hello!

    I want to know can we set the gameobject of actor track at runtime. For example, a different character or an actor instantiated at runtime

    #2197
    chopjzl
    Participant

    Nevermind, I found “SetGroupActorOfName()” in cutscene script. I think this is the method I should use.

    #2198
    Gavalakis
    Keymaster

    Hello,

    Yes, this is the correct method to use for that 🙂

    Join us on Discord: https://discord.gg/97q2Rjh

    #2199
    chopjzl
    Participant

    Hi!

    I have another question.

    Does every cutscene need a camera track? How about those happens when player is in control.

    For example. When player is walking along the street, there are stories happen at the roadside. The player controls the camera like in the normal gameplay

    #2200
    Gavalakis
    Keymaster

    Hello again,

    Not at all. You can simply delete the Camera Track if you want to 🙂

    Join us on Discord: https://discord.gg/97q2Rjh

    #2662
    rmagn
    Participant

    hi,

    sorry for bringing this up, but i cant seem to understand on how to use SetGroupActorOfName().
    i set the actor as empty in the slate editor, and set the actor group name as X.
    but idk when and where from i should call SetGroupActorOfName() on runtime..
    do i have to put a script on the actor prefab?
    can you guide me with this?

    Thanks !

    #2672
    Gavalakis
    Keymaster

    Hello,

    SetGroupActorOfName() can be called from within any script you make. You just need a reference of the cutscene object so that you are able to call for example cutscene.SetGroupActorOfName("MyGroupName", newActorGameobject).
    You also need to write a name manually for the group that you want to affect by selecting the group and change its name in its inspector panel.

    Join us on Discord: https://discord.gg/97q2Rjh

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.