How to get the states (world location of the camera...) of a spawned champ in a 2nd pawn blue print?

Helo every one, That’s the problem I have a spawner, a big box where I spawn characters on a random location using spawn actor from class and I want to get in a pawn blueprint the about them camera, when I click on them. I already create the click system.

hello. sorry are u trying to get the camera location of the character that you spawned ?

It sounds like you just want to Possess that Pawn with your playercontroller.
there is a Possess node for that which you can pull out of a playercontroller reference

I did a pawn for the transition of camera and possess but my 1st test was spawning 2 charcaters from a game state but no i want to use an other bluprint as a spawner for spawn multiple characters frome only 1 class, before i was using “get game state” and “caste to game state” but i use a blue print and they are more than 2 and i want to be able to teak control
of a big nomber of character in 1 lvl and don’t using 100 Character blueprints. I get the informations when they spawn and i get it in a array and i want to get this array in the pawn switch for get the selected champ and teak control of the camera and possess him.( i do a transition between the 2 camera).

sounds like you want to avoid having to branch your program again for each child class.

Maybe it would be best to create a blueprint class which has all tge functionality, components and variables that all other pawns need to have, including the possession handling and camera transitions.
Then create child classes from that So they can be different but the code that does stuff to them only needs to refer to them by their parent class.

this will let them be different child classes but can be programmed against like theyre all the same parent class (just dont cast down to the child classes, cast to the parent class)

Also look at event dispatchers and blueprint interfaces as other ways to overcome this problem.

Another option is to just use enumerators to configure all pawns of the same class to initialize or be configured differently.

Thank you for your answer i try this now

link text
I can not do it, tryed many things you told me but i my lvl i too low . So for show you my problem more precisely i did a video

Thank for all

I watched your video. I have not tried inheritance myself, but that is what I am suggesting. So your SecondaryCharacter should have been created from the PrimaryCharacter class. If you created it that way then it should be both a PrimaryCharacter and a SecondaryCharacter at the same time, and you should be able to get the PrimaryCharacter variables that all PrimaryCharacters and all SecondaryCharacters (by inheritance) have.

I don’t know if you have to cast to the parent class to access the variables though.

If you created the SecondaryCharacter from the CharacterPawn class instead of from the PrimaryCharacter class then this will not work.

Thank you i have found an other way juste using the secondarycharacter i juste mouve my camera to the approximative position using the direction of the character and the distance of cam but its not realy smouth but it’s ok. I will try your solution but if i use on my game an other character this will be a problem. Thank you again and good luck for yours project.(sorry for m’y english i am writhing on my phone ans i have auto corrector in french so some times i have french Words )bye