Switching possession between the pawns.
I need your help with possessing pawns in my game.
I have two pawns in my game:
I've added the possession code in my gamemode class, where I use TObjectIterator to iterate over my PaperCharacters I have - there are and there will be only two of them in my game.
However, I don' t know how to write logic for my possession behaviour. I was wondering whether I could add some boolean setters and getters in my playercontroller class, but I can' t understand how to overwrite the playercontroller in my player class (derives from APaperCharacter class) for example.
I also wondered I could use somekind of PaperCharacter counter. Everytime when there are 2 PaperCharacters, the other character will be controlled and when there' s 1 PaperCharacter, the player character will be controlled. However, it might use too much resource when it would have to count PaperCharacters every frame.
I've trying to understand this logic for 1 day already. Don' t know what to do.. Thanks in advance!
asked Jul 26 '16 at 11:32 AM in C++ Programming
Follow this question
Once you sign in you will be able to subscribe for any updates here