Can't use any abilities

keattikorn

New member
Here is the situation.

I am developing a multiplayer platformer game where the players compete to collect rewards on the designed maze/platform.
A player can fall down to the deep bottom and die (from UCL die ability setting, if the character is falling from a very high point).
There is a timer to count down for the gameplay session, after the timeout, everyone in the scene will be transferred to another level (scene).

The problem is when a character falls down and dies on the deep ground, coincidently, the time is up and the level is transferred to another level. The characters are reused and spawn in the specified locations. Everything else is working correctly except that the previously dead character cannot run (change speed), jump, and fall to die.
Is there any suggestion to have a look?
 
This sounds like your character isn't alive. Are you using PUN? Did you respawn your character?
 
I can ensure that the character is Alive because I display debug info on the screen (using OnGUI) for UltimateCharacterLocomotion.Alive, the result is true. I use UCC + PUNAddOn. The character is never respawned/instantiated again since the game enters the first level. I cached (DontDestroyOnLoad) the characters (both local and others) to keep it alive at all times. When the game needs to load and advance the level (with PhotonNetwork.LoadLevel), I guess I need to do something to initialise the character again to enable the abilities since it is NOT newly instantiated.
 
I reposition the character using
Code:
var ucl = character.GetComponent<UltimateCharacterLocomotion>();
ucl.SetPositionAndRotation(spawnPosition,spawnRotation);
 
If the character is alive then I'm not sure what is going on. If you place a breakpoint within UltimateCharacterLocomotion.CanStartAbility you should be able to debug what is preventing the ability from starting.
 
The problem has been solved! Thank you for your help.
The problem is about the cameras/local looksource switching.

Scene overview camera <---switching---> Player Camera (CameraController class)

When the game has to switch to the Scene overview camera, a character does need a looksource so I attached one locally to the character for this (temporary) switching purpose. Also, the character onscreen's UIs need to be taken into account because they are tightly strict to CameraController on a UCC character.
 
Top