x


How to make other objects target an instantiated object?

Is there a way to make a player object respawn after death and not be called a clone, or is that just the way it's handled in the engine?

What I need to do is, once the player object is respawned/ instantiated, have enemies set the object to its target and also the camera to its target, and I don't know how to make that work right. Not even in Java, which is what I'm using. :(

more ▼

asked Mar 01 '12 at 08:27 AM

KidRoleplay gravatar image

KidRoleplay
1 1 2 2

Yeah, I'm pretty sure you're not using Java.

In any case, this is a good reason why you shouldn't use GameObject.Find("name") to identify objects- you should just be passing references around by script.

Mar 01 '12 at 08:44 AM syclamoth

This might help.

Mar 01 '12 at 09:12 AM asafsitner
(comments are locked)
10|3000 characters needed characters left

0 answers: sort voted first

Maybe you do not want to destroy your object in the first place, only deactivate (and not render)? On respawn you re-activate it again and all the references should still work.

more ▼

answered Mar 01 '12 at 09:12 AM

senad gravatar image

senad
641 3 5

(comments are locked)
10|3000 characters needed characters left
Be the first one to answer this question
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:

x3001
x243
x184
x24
x16

asked: Mar 01 '12 at 08:27 AM

Seen: 582 times

Last Updated: Mar 01 '12 at 09:12 AM