- Home /
Lerpz 3DPlatform Tutorial Cutscene2 help
I'm almost finished with the Lerpz 3DPlatform Tutorial, but my Cutscene2 isn't working. When I try to touch the spaceship I get this message:
NullReferenceException LevelStatus+LevelCompleted$13+$.MoveNext () (at Assets/Scripts/Misc/LevelStatus.js:63) ThirdPersonStatus:LevelCompleted() (at Assets/Scripts/Player/ThirdPersonStatus.js:121) HandleSpaceshipCollision:OnTriggerEnter(Collider) (at Assets/Scripts/Misc/HandleSpaceshipCollision.js:12)
Also the CutsceneCamera2 plays in the background of the game.
After some quick research I found that in my LevelStatus script on lines 63 and 64 there seems to be a problem with the coding. (It's the function to hide the player.) Here's What I have:
function LevelCompleted()
{
mainCamera.GetComponent(AudioListener).enabled = false;
levelCompletedCamera.active = true;
levelCompletedCamera.GetComponent(AudioListener).enabled = true;
playerLink.GetComponent(ThirdPersonController).SendMessage("HidePlayer");
playerLink.transform.position+=Vector3.up*500.0; // just move him 500 units
Which is exactly what they have. I triple checked this. I even copied and pasted the final code over my code. So I don't see the problem. Thanks to any help.
There's a null reference pointer on one of your scripts. It probably means something wasn't setup properly. I'd go back and check all the steps again and make sure there's no empty things in the inspector. Also take a look at the finished example to see where yours differs from theirs. Can't be more specific unless you give more details.
Answer by logging_out · Jul 19, 2010 at 04:03 PM
Ha. I've been such a fool. I forgot to change the Lerpz object name to Player. Apparently that was the problem. It works great now. :)
Your answer
Follow this Question
Related Questions
Lerpz demo won't do cut scenes 1 Answer
3d platformer cut scenes 1 and 2 not working. 2 Answers
Lerpz 3d Platform Cutscene Camera 2 issue 0 Answers
Lerpz Cut scenes 1&2 problem 1 Answer
,Particle System - Throwing Effect 1 Answer