Help ! Circle spawning stops ! HELP PLEASE !!
			14 posts			 • Page 1 of 1		
	
Help ! Circle spawning stops ! HELP PLEASE !!
Hellow guys ! Gear97 again, so I had a problem: I made a spawner that spawns a circle with laser, and this circle with a laser keep spwaning circles and changing its density and controlleracc, but when I spawn another circle with laser: the oldest stop of spawn the circles, and the newest works good. 
 
And the console says: variable "color" already declared in this scope. (or something like this)
PLEASE I NEED HELP !
 
SOMEONE, PLEASE HELPS ME !
			And the console says: variable "color" already declared in this scope. (or something like this)
PLEASE I NEED HELP !
SOMEONE, PLEASE HELPS ME !
Gears are my favorite mechanism. Why do you think I have this username ? 
Make sure to spend some time to see my work http://www.algodoo.com/algobox/profile.php?id=96, just to kill sometime
PS: Gear97™ Is a trademark from me. Any unauthorized use of the term "Gear" for usernames or other naming ideas will be punished.
		Make sure to spend some time to see my work http://www.algodoo.com/algobox/profile.php?id=96, just to kill sometime
PS: Gear97™ Is a trademark from me. Any unauthorized use of the term "Gear" for usernames or other naming ideas will be punished.
- 
				

Gear97 - Posts: 146
 - Joined: Sat Jan 02, 2010 5:34 pm
 - Location: Brazil
 
Re: Help ! Circle spawning stops ! HELP PLEASE !!
I'm not getting the full story, can you give the script of the spawner and density/controllerAcc changer?
			Cave Johnson wrote:Do you know who I am? I'm the man who's gonna burn your house down! With the lemons! I'm gonna get my engineers to invent a combustible lemon that burns your house down!
- 
				

Matten - Posts: 435
 - Joined: Mon Apr 05, 2010 2:03 pm
 - Location: The Netherlands
 
Re: Help ! Circle spawning stops ! HELP PLEASE !!
OK
Spawner:
The Laser in the "spawned" ball:
			Spawner:
- Code: Select all
 (e)=>{
scene.addcircle({
pos := app.mousepos;
color := [0, 0.55, 0, 0.99];
density := 235;
radius := 0.16;
drawcake := false;
collideSet := 3;
friction := 0.0;
restitution := 1.0
});
scene.addlaserpen({
pos := [(app.mousepos(0) - 0.06), app.mousepos(1)];
size := 0.08;
color := [1, 0, 0, 0];
collideSet := 2;
onLaserHit := (e)=>{
e.geom.controlleracc = e.geom.controlleracc + 0.05;
e.geom.controlleracc >= 10.0 ? {
scene.addcircle({
pos := e.pos;
radius := 0.05;
color := [0, 0.3, 0.3, 1];
density := 70;
drawcake = false;
friction := 0.0;
restitution := 1.0
});
scene.addpen({
pos := e.pos;
color := [0, 0.3, 0.3, 1.0];
size := 0.05;
fadetime := 0.5
})
} : {};
e.geom.controlleracc >= 10.0 ? {
e.geom.controlleracc = 0.0;
e.geom.density = e.geom.density - 1.0
} : {};
e.geom.density <= 206.0 ? {
e.geom.color := [0.45, 0.45, 0.45, 1.0];
e.laser.maxrays = 0
} : {}
};
maxrays := 1
})
}
The Laser in the "spawned" ball:
- Code: Select all
 (e)=>{
e.geom.controlleracc = e.geom.controlleracc + 0.05;
e.geom.controlleracc >= 10.0 ? {
scene.addcircle({
pos := e.pos;
radius := 0.05;
color := [0, 0.3, 0.3, 1];
density := 70;
drawcake = false;
friction := 0.0;
restitution := 1.0
});
scene.addpen({
pos := e.pos;
color := [0, 0.3, 0.3, 1.0];
size := 0.05;
fadetime := 0.5
})
} : {};
e.geom.controlleracc >= 10.0 ? {
e.geom.controlleracc = 0.0;
e.geom.density = e.geom.density - 1.0
} : {};
e.geom.density <= 206.0 ? {
e.geom.color := [0.45, 0.45, 0.45, 1.0];
e.laser.maxrays = 0
} : {}
}
Gears are my favorite mechanism. Why do you think I have this username ? 
Make sure to spend some time to see my work http://www.algodoo.com/algobox/profile.php?id=96, just to kill sometime
PS: Gear97™ Is a trademark from me. Any unauthorized use of the term "Gear" for usernames or other naming ideas will be punished.
		Make sure to spend some time to see my work http://www.algodoo.com/algobox/profile.php?id=96, just to kill sometime
PS: Gear97™ Is a trademark from me. Any unauthorized use of the term "Gear" for usernames or other naming ideas will be punished.
- 
				

Gear97 - Posts: 146
 - Joined: Sat Jan 02, 2010 5:34 pm
 - Location: Brazil
 
Re: Help ! Circle spawning stops ! HELP PLEASE !!
I can't find something wrong. All the color scripts are good and there's nothing wrong with the circle spawning. I think it's something with the laser.
			Cave Johnson wrote:Do you know who I am? I'm the man who's gonna burn your house down! With the lemons! I'm gonna get my engineers to invent a combustible lemon that burns your house down!
- 
				

Matten - Posts: 435
 - Joined: Mon Apr 05, 2010 2:03 pm
 - Location: The Netherlands
 
Re: Help ! Circle spawning stops ! HELP PLEASE !!
HMM..  
. 
OK I will try to do something about this.
BUT I ALSO DONT HAVE IDEAS !
			OK I will try to do something about this.
BUT I ALSO DONT HAVE IDEAS !
Gears are my favorite mechanism. Why do you think I have this username ? 
Make sure to spend some time to see my work http://www.algodoo.com/algobox/profile.php?id=96, just to kill sometime
PS: Gear97™ Is a trademark from me. Any unauthorized use of the term "Gear" for usernames or other naming ideas will be punished.
		Make sure to spend some time to see my work http://www.algodoo.com/algobox/profile.php?id=96, just to kill sometime
PS: Gear97™ Is a trademark from me. Any unauthorized use of the term "Gear" for usernames or other naming ideas will be punished.
- 
				

Gear97 - Posts: 146
 - Joined: Sat Jan 02, 2010 5:34 pm
 - Location: Brazil
 
Re: Help ! Circle spawning stops ! HELP PLEASE !!
Maybe you have to make the whole spawner again and then try if it works fine. Maybe it's just a wrong equal sign or something. And if you make it again you it maybe works.
			Cave Johnson wrote:Do you know who I am? I'm the man who's gonna burn your house down! With the lemons! I'm gonna get my engineers to invent a combustible lemon that burns your house down!
- 
				

Matten - Posts: 435
 - Joined: Mon Apr 05, 2010 2:03 pm
 - Location: The Netherlands
 
Re: Help ! Circle spawning stops ! HELP PLEASE !!
Can you upload the scene and I'll fix it for you name it "help123".
Rideg signing out to sleep
			
		Rideg signing out to sleep
- 
				

Rideg - Posts: 948
 - Joined: Tue Dec 15, 2009 5:17 pm
 - Location: Östersund, Sweden
 
Re: Help ! Circle spawning stops ! HELP PLEASE !!
Gears are my favorite mechanism. Why do you think I have this username ? 
Make sure to spend some time to see my work http://www.algodoo.com/algobox/profile.php?id=96, just to kill sometime
PS: Gear97™ Is a trademark from me. Any unauthorized use of the term "Gear" for usernames or other naming ideas will be punished.
		Make sure to spend some time to see my work http://www.algodoo.com/algobox/profile.php?id=96, just to kill sometime
PS: Gear97™ Is a trademark from me. Any unauthorized use of the term "Gear" for usernames or other naming ideas will be punished.
- 
				

Gear97 - Posts: 146
 - Joined: Sat Jan 02, 2010 5:34 pm
 - Location: Brazil
 
Re: Help ! Circle spawning stops ! HELP PLEASE !!
Hmmm...
I really don't understand why he doesn't work. He just stops with changing the controllerAcc, but the laser script is still the same. I really don't understand...
			I really don't understand why he doesn't work. He just stops with changing the controllerAcc, but the laser script is still the same. I really don't understand...
Cave Johnson wrote:Do you know who I am? I'm the man who's gonna burn your house down! With the lemons! I'm gonna get my engineers to invent a combustible lemon that burns your house down!
- 
				

Matten - Posts: 435
 - Joined: Mon Apr 05, 2010 2:03 pm
 - Location: The Netherlands
 
Re: Help ! Circle spawning stops ! HELP PLEASE !!
 Here's your solution 
			
		- 
				

Rideg - Posts: 948
 - Joined: Tue Dec 15, 2009 5:17 pm
 - Location: Östersund, Sweden
 
Re: Help ! Circle spawning stops ! HELP PLEASE !!
Gears are my favorite mechanism. Why do you think I have this username ? 
Make sure to spend some time to see my work http://www.algodoo.com/algobox/profile.php?id=96, just to kill sometime
PS: Gear97™ Is a trademark from me. Any unauthorized use of the term "Gear" for usernames or other naming ideas will be punished.
		Make sure to spend some time to see my work http://www.algodoo.com/algobox/profile.php?id=96, just to kill sometime
PS: Gear97™ Is a trademark from me. Any unauthorized use of the term "Gear" for usernames or other naming ideas will be punished.
- 
				

Gear97 - Posts: 146
 - Joined: Sat Jan 02, 2010 5:34 pm
 - Location: Brazil
 
Re: Help ! Circle spawning stops ! HELP PLEASE !!
You're welcome. Can I ask what you are making? Or will I find out myself when/if you upload it?
			
		- 
				

Rideg - Posts: 948
 - Joined: Tue Dec 15, 2009 5:17 pm
 - Location: Östersund, Sweden
 
Re: Help ! Circle spawning stops ! HELP PLEASE !!
You need to wait !!! MUAHAHAHAHAHHAHA !!!!
			Gears are my favorite mechanism. Why do you think I have this username ? 
Make sure to spend some time to see my work http://www.algodoo.com/algobox/profile.php?id=96, just to kill sometime
PS: Gear97™ Is a trademark from me. Any unauthorized use of the term "Gear" for usernames or other naming ideas will be punished.
		Make sure to spend some time to see my work http://www.algodoo.com/algobox/profile.php?id=96, just to kill sometime
PS: Gear97™ Is a trademark from me. Any unauthorized use of the term "Gear" for usernames or other naming ideas will be punished.
- 
				

Gear97 - Posts: 146
 - Joined: Sat Jan 02, 2010 5:34 pm
 - Location: Brazil
 
Re: Help ! Circle spawning stops ! HELP PLEASE !!
Rideg ! Here is what made with that circle spawner:
viewtopic.php?f=18&t=2376
			viewtopic.php?f=18&t=2376
Gears are my favorite mechanism. Why do you think I have this username ? 
Make sure to spend some time to see my work http://www.algodoo.com/algobox/profile.php?id=96, just to kill sometime
PS: Gear97™ Is a trademark from me. Any unauthorized use of the term "Gear" for usernames or other naming ideas will be punished.
		Make sure to spend some time to see my work http://www.algodoo.com/algobox/profile.php?id=96, just to kill sometime
PS: Gear97™ Is a trademark from me. Any unauthorized use of the term "Gear" for usernames or other naming ideas will be punished.
- 
				

Gear97 - Posts: 146
 - Joined: Sat Jan 02, 2010 5:34 pm
 - Location: Brazil
 
			14 posts			 • Page 1 of 1		
	Who is online
Users browsing this forum: No registered users and 3 guests


			
			

