questions about script and object collide.
2 posts • Page 1 of 1
questions about script and object collide.
hello everybody,my english is not good enough,so I'll try my best to explain my question.
Question A :I want to make a oncollide condition that is when object A collide with object B but effect to object C. For example,object A collide with B,then C was removed.
Question B :I made some wonderful machines,but I found a problem that is,if one object affected by the excessive power ,it may directly across other object.I try increase density but it still happened.is there any way avoid it happens?
Question C : How to make a oncollide condition only react to a specify collide level?
and Ps. Phun is really a perfact game but without aerodynamic model,and ropes, jet engine or airscrew without script.
Question A :I want to make a oncollide condition that is when object A collide with object B but effect to object C. For example,object A collide with B,then C was removed.
Question B :I made some wonderful machines,but I found a problem that is,if one object affected by the excessive power ,it may directly across other object.I try increase density but it still happened.is there any way avoid it happens?
Question C : How to make a oncollide condition only react to a specify collide level?
and Ps. Phun is really a perfact game but without aerodynamic model,and ropes, jet engine or airscrew without script.
- epsilon
- Posts: 9
- Joined: Tue Dec 14, 2010 4:05 pm
Re: questions about script and object collide.
for A: you could :
first set a variable like "scene.my.VAR1" or something with typing it into the console (f11) and give it the value = 2 -> "scene.my.var1=2"
then set one of your objects A or B at "onCollide" to :
after this you give the density value of object C the following script:
density "{scene.my.var1}"
so if anything collides with the object with the onCollide - script , the object with the density - script will be deleted ( algodoo deletes an object that has a density value = 0 )
dont write any " " i wrote
but this happens if ANYTHING with the same collisionset hits the object so i dont know maybe it wont help you
first set a variable like "scene.my.VAR1" or something with typing it into the console (f11) and give it the value = 2 -> "scene.my.var1=2"
then set one of your objects A or B at "onCollide" to :
- Code: Select all
(e)=>{
scene.my.var1 := 0
}
after this you give the density value of object C the following script:
density "{scene.my.var1}"
so if anything collides with the object with the onCollide - script , the object with the density - script will be deleted ( algodoo deletes an object that has a density value = 0 )
dont write any " " i wrote
but this happens if ANYTHING with the same collisionset hits the object so i dont know maybe it wont help you
yup yup
yuuuuuuup
yupyupyupyupyupyupyupyupyyyuuuup
hm... signatures...
yuuuuuuup
yupyupyupyupyupyupyupyupyyyuuuup
hm... signatures...
- hiltropper
- Posts: 85
- Joined: Mon Dec 20, 2010 12:02 pm
- Location: Germany
2 posts • Page 1 of 1
Who is online
Users browsing this forum: No registered users and 6 guests



