Spawner spawnig ob. w. script
			6 posts			 • Page 1 of 1		
	
Spawner spawnig ob. w. script
How to spawn ob. w. script in onCollide? 
^This dont work...
			
		- Code: Select all
- (e)=>{
 scene.addcircle({ pos = e.pos; radius := 0.02002001; density := 20.5; color := [0.0, 0.0, 0.0, 1.0]; collideset := 1; restitution := 0.5; heterocollide := true; drawBorder := true; drawcirclecace := false; attraction := 0; onCollide = (e)=>{ scene.addpen({ pos = e.pos; color := [1.0, 1.0, 0.0, 1.0]; size := 0.02002001; fadeTime := 0.0 }) }} })
^This dont work...
- Jackyy
- Posts: 3
- Joined: Sat Oct 31, 2009 12:58 pm
Re: Spawner spawnig ob. w. script
Won't work it needs ti be oncollide := (e)=>{BLA} you missed the colon and i saw some other little errors
			
		- 
				 
 niffirg1
- Posts: 376
- Joined: Mon Aug 31, 2009 10:31 pm
- Location: The Great American South!
Re: Spawner spawnig ob. w. script
niffirg1 wrote:i saw some other little errors
Jackyy wrote:Still bad
Of course it still doesn't work until you corrected the other little errors. it's nothing special but you need a } bracket somewhere. i don't know if there are more errors but be sure you correctly typed in every single character

- 
				 
 KarateBrot
- Posts: 825
- Joined: Mon Aug 31, 2009 7:32 pm
- Location: Germany
Re: Spawner spawnig ob. w. script
- Code: Select all
- (e)=>{Scene.addCircle({pos := e.pos; radius := 0.02002001; density := 20.5; color := [0,0,0,1]; collideSet := 1; restitution := 0.5; heteroCollide := true; drawBorder := true; drawCake := false; attraction := 0; onCollide := (e)=>{scene.addPen({pos := e.pos; color := [1, 1 ,0, 0]; size := 0.02002001; fadeTime := 0})}})}
Fixed the errors for you. BTW it's drawCake not drawCircleCace.

- 
				 
 standardtoaster
- Posts: 606
- Joined: Mon Aug 31, 2009 7:57 pm
			6 posts			 • Page 1 of 1		
	Who is online
Users browsing this forum: No registered users and 6 guests


 
  

