- Home /
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; } } }
Answer by Mike 3 · Jan 10, 2011 at 02:33 AM
If you want to instantiate the object at the sameplace, just use GameObject.Find("dp").transform.position, take out the * Time.deltaTime
Your answer
Follow this Question
Related Questions
Create object inside a game 1 Answer
Can't destroy a script. 1 Answer
I need help with a companion!!! 2 Answers
End game then an Object is close to another object? 0 Answers
Place object in place of ghost. 0 Answers