Cast simple question (cast not needed) "turntable showcas"

Hey, Its a basic question but i hope finding a simple and effective way to do so, its related to reference and casting (if i understand correctly).

I want to cast an input action such as pressing a button from my player bp to another bp (character like NPC here). This is needed to pause a timeline currently running on the NPC via my player_bp

this way i can have a method to build reaction on npc when player press a button

The npc is not an IA yet just a basic character blueprint.

(More Context : i m showing a character animation in a sort of turntable render and i just want to be able to press a button while in play mode to stop the rotation from the timeline on the “NPC” bp)

So:

  • there is a player BP that handles the IAs
  • there is an NPC standing on a turntable
  • the NPC plays a Timeline
  • the player hits an IA and the NPC’s Timeline pauses

Did I get it right?


Could you explain a couple of things:

  • how is the scene set up?
  • is there more than 1 NPC?
  • is there more than 1 turntable?
  • if so, how do we choose which NPC to communicate with?
  • are we spawning the NPC(s) dynamically or they’re placed in the level?
1 Like

Thx for the help btw
Yes u did understand everything and this is just one turntable for one “NPC” with one animation rotating that i want to pause, thats it

What i want after that is just change the animation the npc is running by pressing a button and thats it i will then be able to stop or change the animation and rotation of the complete actor whenever i want

So we start like this:

The player on the left, and the NPC on the turntable? Or do you spawn them somehow?

1 Like

i dont spawn anything its already put here, no spawn only one skeletal mesh with multiple animation

just my player character that can move etc and the skeletal mesh i want to show where i can change animation and rotation of it

its to showcase animation,cloth simulation,physic and posedriver and the model i made

here is where i m at

  • in the NPC:

  • in the player:

  • in the scene:


No need to cast. Think of casting as of a method of identifying who you’re talking to. When you cast, you ask “are you the type of actor that I want”.

1 Like

This will not work:

image

You’re playing the timeline 60 times per second. One is enough. To play the timeline automatically:

image

Now it always plays. Or use the custom event to start / stop - as in the previous post. Or simply:

1 Like

Im gonna test it right now im figuring out what u did lol but i did understand i think i confirm u this in few minute

Judging by this:

c8230e464922af87069ab2c11f4879a80c5a97a1_2_557x500

You do. You have the Game Mode spawn the player at player start?

What is this

A function? the event ? how u get that nod in the player character ?µ

NVM im dumb lol

i got it

1 Like

yeah but there is no model if u mean spawning the model its just like a camera i posses but if using a player start is considered spawn yes i do

How do u get the boolean on the custon event ?

NVM i found it lol

1 Like

lord im so sry i didnt do those thing for a long time i knew this before

Serves you well for not spending 24/7 with the engine ;p

1 Like

I think i understand why u talked about spawn but i dont know how to not spawn my playercharacter(camera),

I think i did what u asked for but it doesnt find the npc bp

Blueprint Runtime Error: “Accessed None trying to read property BP_ShowNPC”. Node: Control Timeline Graph: EventGraph Function: Execute Ubergraph BP Player Spectate Blueprint: BP_PlayerSpectate

Drag the player to the level. Remove the player start.

Blueprint Runtime Error: “Accessed None trying to read property BP_ShowNPC”. Node: Control Timeline Graph: EventGraph Function: Execute Ubergraph BP Player Spectate Blueprint: BP_PlayerSpectate

You never set the reference because your player spawns dynamically.

1 Like

Thats what i did but it spawn me where my camera is and i dont see an option to change that even when i see the usual option for play mode

Im checking in advanced play mode parameter