x


script dosnt creat object where i want it to

it is supposed to creat an object at "dp" but its not working any help.

var monster:Transform;

static var total:float =0; var savedtime =0; function Update () { var seconds: int = Time.time; var oddeven = (seconds% 2);

    if(oddeven){
        make(seconds);
    }
}

function make(seconds){ if(seconds !=savedtime) { if(total <=4){ var bullit = Instantiate(monster, GameObject.Find("dp").transform.position* Time.deltaTime, Quaternion.identity) ; total +=1; savedtime = seconds; } } }

more ▼

asked Jan 10 '11 at 01:59 AM

zeuo gravatar image

zeuo
373 52 71 83

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

1 answer: sort oldest

If you want to instantiate the object at the sameplace, just use GameObject.Find("dp").transform.position, take out the * Time.deltaTime

more ▼

answered Jan 10 '11 at 02:33 AM

Mike 3 gravatar image

Mike 3
30.5k 10 65 253

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

x3340
x1095
x801
x441
x141

asked: Jan 10 '11 at 01:59 AM

Seen: 426 times

Last Updated: Jan 10 '11 at 01:59 AM