- Home /
Create a game objective.
Hello everyone, I have a question. I am completely finished creating a simple FPS game in Unity. I have a small issue, I don't know how to add a game objective. All I want to do is start at point "A" and get to point "B" and it's over. Does anyone know how I can do this?
Thanks, Ethan
Answer by Jace · Jan 01, 2012 at 06:37 PM
Hi Ethan,
If I understand you correctly, you want the ability to detect when the game character reaches a finish point within the game. If that's the case, then you'll need to add an incentive to entice your game player to the finish point. Either through visual cues, a mini map or perhaps something that needs to be collected.
Either way, once your character collides with that object (which could also be an area within the scene) you'll be able to detect the objective is complete.
http://unity3d.com/support/documentation/ScriptReference/Collider.OnCollisionEnter.html
Not sure this is what you meant, but hope it helps (even if it prompts you to elaborate your question :-).
Cheers
Jace
Answer by tomekkie2 · Jan 01, 2012 at 06:45 PM
You can also check the transform.position of the object on Update(). Just set the condition; when the position fits the required range, the game is over.
Your answer
Follow this Question
Related Questions
Create a game objective. 0 Answers
Create a game objective. 2 Answers
First Person Controller vs. Character (Penelope Tutorial) 2 Answers
Dual Joysticks in First Person Controller 1 Answer
Objective Pointer 0 Answers