Set Actor at Runtime?

Forums 💬 Slate Sequencer ⚙️ Support Set Actor at Runtime?

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #20146
    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

      #20152
      chopjzl
      Participant

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

        #20151
        Gavalakis
        Keymaster

          Hello,

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

          #20150
          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

            #20149
            Gavalakis
            Keymaster

              Hello again,

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

              #20148
              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 !

                #20147
                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.

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