- Home /
Infinite Runner Tutorial - Destroyer Problem
Hi,
I am working through Mike Geig's "Lets Make a Game: Infinite Runner" tutorial
Really good session... well done Mike!
I am having a problem getting the destroyers to work properly. I have recapped the tutorial but cant find where i'm going wrong.
Inspector Settings for Quad/Destroyer
Script for Quad/Destroyer
I don't get errors, my game just stops every time the first platform hits the rear destroyer... it doesn't seam to destroy anything.
Thanks,
Is your console view, is the "Error Pause" option selected? I want to know if your game is pausing due to an error or the Debug.Break();
Hi $$anonymous$$ike,
Thanks for getting back to me.
'Error Pause' is not selected in console view. The game seams to stop as the first gameObject touches either destroyer. The platforms don't get destroyed allowing the game to carry on. I can see this in the scene view which shows the final position/state of the gameObjects as the break was initiated. The first platform is just touching the rear destroyer when the stop occurs.
Answer by Mike-Geig · Feb 03, 2014 at 02:23 PM
Your problem is the semi-colon ";" after the IF statement line. IF Statements don't have semi-colons.
Answer by Linkzero · Jan 31, 2014 at 06:48 PM
Are you sure that your platforms doesn't have the "Player" tag? If that's the case, then when they collide with the destroyer the "Debug.break();" would make the game stop.
I've just checked the inspector again, no tag assigned there. Which is the same in the image i posted.
thanks for the suggestion @Linkzero
and the platforms don't have tags either. All assets apart from the player are untagged at this point.
Your code is ok, I already did that example and we have the same code, so the error must be somewhere else, maybe in your SpawnScript. Since you only did 1/3 of the tutorial, I would recommend you to start over again, it would be fast if you skip the dialogues that you already know and only focus in code and GameObject components.
Your answer
Follow this Question
Related Questions
I have a problem with the infinite runner tut by mike geig 1 Answer
Spawning objects in infinite scroller game 0 Answers
Infinite runner world creation 2 Answers
Please share ideas for obstacle management 0 Answers
Programming Movement Momentum 0 Answers