Oncollide inside the spawnscript
5 posts • Page 1 of 1
Oncollide inside the spawnscript
Simple question:
I want to spawn a circle with an oncollidescript... how to?
for example, i thought of
Thanks for reading, and more thanks for answering
PlanckBanck
I want to spawn a circle with an oncollidescript... how to?
for example, i thought of
- Code: Select all
oncollide := (e)=>{blablah}
Thanks for reading, and more thanks for answering
PlanckBanck
The world is a gas-station, where you`re allowed to smoke. -Friedrich Dürrenmatt
I forgot 2/3 of my scripting knowledge T.T
I forgot 2/3 of my scripting knowledge T.T
-
PlanckBanck - Posts: 48
- Joined: Sun Nov 22, 2009 5:35 pm
- Location: In the Bottoms of Berlin
Re: Oncollide inside the spawnscript
You have it right.
-
standardtoaster - Posts: 606
- Joined: Mon Aug 31, 2009 7:57 pm
Re: Oncollide inside the spawnscript
cool, cuz it didn`t work. anyways, thanks, I`ll just have another look at it...
PS: Standardtoaster, you rock, you are some kind of scripting guru, and instead of doing something interesting, you answer every noob`s question after a maximum of 5 minutes, thanks for that!
PS: Standardtoaster, you rock, you are some kind of scripting guru, and instead of doing something interesting, you answer every noob`s question after a maximum of 5 minutes, thanks for that!
The world is a gas-station, where you`re allowed to smoke. -Friedrich Dürrenmatt
I forgot 2/3 of my scripting knowledge T.T
I forgot 2/3 of my scripting knowledge T.T
-
PlanckBanck - Posts: 48
- Joined: Sun Nov 22, 2009 5:35 pm
- Location: In the Bottoms of Berlin
Re: Oncollide inside the spawnscript
Thank you for the compliment. I assumed that you were putting that inside of the spawning script. It should work that way. Please tell me if the following script is something along the lines of what you are trying to accomplish.
- Code: Select all
Scene.addCircle({pos := e.pos; radius := 2; onCollide := (e)=>{e.this.controllerAcc = e.this.controllerAcc + 1}})
-
standardtoaster - Posts: 606
- Joined: Mon Aug 31, 2009 7:57 pm
Re: Oncollide inside the spawnscript
it is exactly what I meant, and it worked perfectly! Thanks a very lot.
So long
PlanckBanck
So long
PlanckBanck
The world is a gas-station, where you`re allowed to smoke. -Friedrich Dürrenmatt
I forgot 2/3 of my scripting knowledge T.T
I forgot 2/3 of my scripting knowledge T.T
-
PlanckBanck - Posts: 48
- Joined: Sun Nov 22, 2009 5:35 pm
- Location: In the Bottoms of Berlin
5 posts • Page 1 of 1
Who is online
Users browsing this forum: No registered users and 6 guests