- Home /
 
               Question by 
               thenachotech1113 · Jun 02, 2012 at 12:59 AM · 
                collisiondestroybulletgun  
              
 
              bullet desent seem to apear (javascript)
hey, i messed arround with a bullet distroying code i had and ruined it I dont know why, it is supposed to:
- on a certain amount of time destroy it self. 
- distroy it self when it colides. 
.
 \#pragma strict
 
 var lifeTime = 100;    
 
 function Awake(){
     Destroy (gameObject, lifeTime*Time.deltaTime);
 }
 
 function OnCollisionEnter(collision : Collision){
     Destroy (gameObject);
 }
i tried moving its spawn point far from everything and it did not work either, so if some one could tell me what i did wrong, or could improve plz tell me.
               Comment
              
 
               
              sorry for how i had to format it, but it wouldnt work anny other way
Why are you multiplying by Time.deltaTime? It looks like it should destroy itself. Did you try a known delay like 3 seconds as a test to see if it dies at expiration? Should work in Awake, but you might try from within Start.
sorry i accidentaly changed a variable so it disapiered the moment it got created. lol but thank you annyway
Your answer
 
 
              koobas.hobune.stream
koobas.hobune.stream 
                       
                
                       
			     
			 
                