x


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

more ▼

asked Jan 01, 2012 at 04:33 PM

EthanCookTV gravatar image

EthanCookTV
1 9 6 6

(comments are locked)
10|3000 characters needed characters left

2 answers: sort voted first

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

more ▼

answered Jan 01, 2012 at 06:37 PM

Jace gravatar image

Jace
156 3 4 6

(comments are locked)
10|3000 characters needed characters left

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.

more ▼

answered Jan 01, 2012 at 06:45 PM

tomekkie2 gravatar image

tomekkie2
986 82 71 102

(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x1132
x139
x85
x69
x25

asked: Jan 01, 2012 at 04:33 PM

Seen: 1889 times

Last Updated: Jan 01, 2012 at 06:45 PM