scripting to spawn a spawning object
3 posts • Page 1 of 1
scripting to spawn a spawning object
im still using the origional phun, and i hav been trying to think of a way of applying a specific oncollide script to an object. I want the object that is spawned to hav its own oncollide script that will spawn a third object when it collides with something. is this even possible? and if it is, could someone plz give the basic script for this. much appreciated
- monkeymasha
- Posts: 2
- Joined: Fri Jan 21, 2011 6:34 pm
Re: scripting to spawn a spawning object
Sure, just add onCollide := (e) => {your script} in spawning object.
More than that, RaRaMalum use once a great script for "life" game, where he give same on collide to child from parent:
More than that, RaRaMalum use once a great script for "life" game, where he give same on collide to child from parent:
- Code: Select all
(e) => {
scene.addCircle({
...
onCollide := e.this.onCollide;
...
})
Dream of Algodoo as game development engine...
-
Kilinich - [Best bug reporter 2010]
- Posts: 2098
- Joined: Mon Aug 31, 2009 8:27 pm
- Location: South Russia
Re: scripting to spawn a spawning object
thank you, i just didn't know how to imput the script. and thanks for recommending RaRaMalum, that is exactly what i was trying to do. cheers again.
- monkeymasha
- Posts: 2
- Joined: Fri Jan 21, 2011 6:34 pm
3 posts • Page 1 of 1
Return to Phun Edition in general
Who is online
Users browsing this forum: No registered users and 1 guest