Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

PowerQuest

A Nifty 2D Adventure Toolkit for Unity · By Powerhoof

Setting new Player

A topic by AlexTzanop created Oct 03, 2021 Views: 151 Replies: 2
Viewing posts 1 to 2

Hey, there!

I'm trying to change the player character in a room,  without changing the character order in the Powerquest Editor.

I've managed to do it, by simply adding a public reference to a character in the PowerQuest script, but I can't seem to be able to move the character.

After some investigation, I've found that the m_instance value for that character is Null, even though the SetInstance function is called and it does change the m_instance to a correct value upon the character spawn. 

I'm kind of lost so any ideas/recommendations are more than welcome :)

(1 edit)

E.SetPlayer(C.YourNewPlayer); should do it (where YourNewPlayer is your character name)

Worked like a charm, thanks!!