Spawning object that dissapear
			7 posts			 • Page 1 of 1		
	
Spawning object that dissapear
hello, I just wanted to quickly ask if anyone can help me out in a script that would spawn an object that dissapears after a second or so. I am working on some thrusters, I already have some that I like and that work well, but they use water and the water is too large for my liking. I am looking for a square that is 1by1 /72 of a meter where as a water particle is 4by4 /72. I have a very simple thruster that spawns water on lazer hit.
Some other qualities of the particle that I require is no friction and a very low weight.
			
		Some other qualities of the particle that I require is no friction and a very low weight.
- ArmoredDice
 - Posts: 3
 - Joined: Sat Jun 19, 2010 5:35 pm
 
Re: Spawning object that dissapear
Do you want to spawn an objevt that collides with something cuz then I can make something for you
Are you using Algodoo or Phun?
			
		Are you using Algodoo or Phun?
- 
				

Rideg - Posts: 948
 - Joined: Tue Dec 15, 2009 5:17 pm
 - Location: Östersund, Sweden
 
Re: Spawning object that dissapear
- ArmoredDice
 - Posts: 3
 - Joined: Sat Jun 19, 2010 5:35 pm
 
Re: Spawning object that dissapear
well does it collide Immediatly after it spawns?
			
		- 
				

Rideg - Posts: 948
 - Joined: Tue Dec 15, 2009 5:17 pm
 - Location: Östersund, Sweden
 
Re: Spawning object that dissapear
- Code: Select all
 (e)=>{
Scene.addCircle({
color := [0.0, 0.0, 0.0, 0.99];
controllerAcc := sim.time + 1;
onHitByLaser := (e)=>{
e.geom.density = {sim.time >= controllerAcc ? {0.0} : {2.0}};
e.laser.onHitByLaser = (e)=>{}
};
collideSet := 64;
geomID := 1;
pos := e.pos;
radius := 0.25
});
Scene.addLaserPen({
geom := 1;
relPoint := [0.0, 0.0];
size := 0.025;
maxRays := 1;
collideSet := 127;
rotation := -3.1415927
})
}
- 
				

Rideg - Posts: 948
 - Joined: Tue Dec 15, 2009 5:17 pm
 - Location: Östersund, Sweden
 
Re: Spawning object that dissapear
Thank you 
Just one more question, where do I paste it too? So far I only been using very very basic Thyme scripting.
			
		Just one more question, where do I paste it too? So far I only been using very very basic Thyme scripting.
- ArmoredDice
 - Posts: 3
 - Joined: Sat Jun 19, 2010 5:35 pm
 
Re: Spawning object that dissapear
Well If you're triggering this by making a laser hit a box then paste it in the box's onHitByLaser 
			
		- 
				

Rideg - Posts: 948
 - Joined: Tue Dec 15, 2009 5:17 pm
 - Location: Östersund, Sweden
 
			7 posts			 • Page 1 of 1		
	Who is online
Users browsing this forum: No registered users and 2 guests




