x


FPS Tutorial 1-What do I drop "Explosion" onto in the inspector window for the "Missile"

Okay, I can not figure out where to drag and drop the "Explosion" prefab in the inspector window of the "Missile". From page 12. There does not seem to be any place that will allow me to place the Explosion on http://to.So... Where is the Missile explosion Variable ?

Nowwecanassigntheexplosiontothemissile: EnsuringthatMissileprefabisselected,fillintheExplosionvariablebydragging theExplosionobjectintheProjectpanelontotheMissilesExplosionvariablein theInspectorpanel. Please tell me what I am missing! Thanks

more ▼

asked Apr 16 '10 at 10:31 PM

STXKS gravatar image

STXKS
1 1 1 1

Please edit your question to make it readable

Apr 16 '10 at 10:34 PM spinaljack
(comments are locked)
10|3000 characters needed characters left

3 answers: sort voted first

i am having the exact same problem... i did the code correctly... as far as i can see but the explotion variable slot will not show up

var explosion : GameObject;

function OnCollisionEnter( collision : Collision ) { var contact : ContactPoint = collision.contacts[0];

var rotation = Quaternion.FromToRotation( Vecter3.up, contact.normal );
var instantiatedExplosion : GameObject = Instantiate(
    explosion, contact.point, rotation );

    Destroy( gameObject );

}

more ▼

answered Jan 23 '11 at 09:38 AM

vincent 2 gravatar image

vincent 2
1 2 2 2

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

the problem for me was that i had to go to component -> scripts -> projectile when i had missile prefab selected. This added a projectile script with an explosion variable that was empty. Then I was able to drag in the explosion prefab. Hopefully that helps.

more ▼

answered Jun 22 '12 at 05:45 PM

nbatothemax gravatar image

nbatothemax
0

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

I've never followed the tutorial, but I'm assuming it would be a user created variable in the script component of the Missile prefab.

more ▼

answered Apr 17 '10 at 03:46 AM

dhendrix gravatar image

dhendrix
2.2k 25 34 59

(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:

x822
x161

asked: Apr 16 '10 at 10:31 PM

Seen: 1123 times

Last Updated: Jun 22 '12 at 05:45 PM