Delayed Killers
9 posts • Page 1 of 1
Delayed Killers
I noticed that killers only activate their onCollide event when they meet immortal objects. Is there a way to go around that? I wanted it about so:
We have a square. It is not a killer. The square hits -lets say- a circle. The square executes it's onCollide, destroys the circle and then itself.
We have a square. It is not a killer. The square hits -lets say- a circle. The square executes it's onCollide, destroys the circle and then itself.
I am currently only using Phun 5.28 and not Algodoo. I would annoy the people on the Phun Forum and not here, but the Forum refused new registrations when I looked the last time.
- Papriko
- Posts: 29
- Joined: Tue Nov 17, 2009 8:43 pm
Re: Delayed Killers
well of course! their killers therefore they kill it before the oncollide reaction hope this helps it is not a bug, because the simulator checks for killer and immortal before oncollide settings if im correct.
HYDRO THYMER!
- link145632
- Posts: 26
- Joined: Thu Sep 24, 2009 12:24 am
- Location: Catching waves on the internet
Re: Delayed Killers
Papriko wrote:I noticed that killers only activate their onCollide event when they meet immortal objects. Is there a way to go around that? I wanted it about so:
We have a square. It is not a killer. The square hits -lets say- a circle. The square executes it's onCollide, destroys the circle and then itself.
First - you can add copy of killer object and set it's onCollide to do you needs and kill himself.
Or you can script something like this:
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: Delayed Killers
I think that density = 0 is for my usage good enough.
I have a second question: For the thing I plan the "delayed killer" needs to know the other's density and area. e.other.density is clear, but can I also use e.other.area or something like that?
EDIT: I mean 2 questions: does Phun/Algodoo know pi or do I have to use a hand-typed value like 3.14?
I have a second question: For the thing I plan the "delayed killer" needs to know the other's density and area. e.other.density is clear, but can I also use e.other.area or something like that?
EDIT: I mean 2 questions: does Phun/Algodoo know pi or do I have to use a hand-typed value like 3.14?
I am currently only using Phun 5.28 and not Algodoo. I would annoy the people on the Phun Forum and not here, but the Forum refused new registrations when I looked the last time.
- Papriko
- Posts: 29
- Joined: Tue Nov 17, 2009 8:43 pm
Re: Delayed Killers
AFAIK you cannot read area of a complex object, and only radius of a circle useing the New Method.
math.pi gives pi
math.pi gives pi
-
Versieon - Posts: 375
- Joined: Tue Sep 01, 2009 4:45 pm
Re: Delayed Killers
Thanks for the answers, you all. Now a last question and this thread is (probably, not sure ) finished.
When I can't find out the area of boxes and polygons, am I at least able to get it's weight? With weight and density I could also get the area.
When I can't find out the area of boxes and polygons, am I at least able to get it's weight? With weight and density I could also get the area.
I am currently only using Phun 5.28 and not Algodoo. I would annoy the people on the Phun Forum and not here, but the Forum refused new registrations when I looked the last time.
- Papriko
- Posts: 29
- Joined: Tue Nov 17, 2009 8:43 pm
Re: Delayed Killers
Papriko wrote:I have a second question: For the thing I plan the "delayed killer" needs to know the other's density and area. e.other.density is clear, but can I also use e.other.area or something like that?
No way to read "area" but you can measure area by yourself and put it into some unused property like controllerAcc and then read.
EDIT: I mean 2 questions: does Phun/Algodoo know pi or do I have to use a hand-typed value like 3.14?
Yes. math.pi
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: Delayed Killers
When I can get neither the area nor the weight to calculate the area by my own, I will probably also not need Pi. My idea could still work, but is much uglier, because the relation is absolutely wrong...
Well, I just want to say now thanks to you all for the good answers. Bye folks, I'll come again when I have another problem
Well, I just want to say now thanks to you all for the good answers. Bye folks, I'll come again when I have another problem
I am currently only using Phun 5.28 and not Algodoo. I would annoy the people on the Phun Forum and not here, but the Forum refused new registrations when I looked the last time.
- Papriko
- Posts: 29
- Joined: Tue Nov 17, 2009 8:43 pm
9 posts • Page 1 of 1
Who is online
Users browsing this forum: No registered users and 4 guests