need help. just a simple problem
5 posts • Page 1 of 1
need help. just a simple problem
can someone give me the script to make an object delete itself when it is left clicked on?
also, please tell me where to put the script (onCollide, Friction, ect... and yes I know its none of those...).
also, please tell me where to put the script (onCollide, Friction, ect... and yes I know its none of those...).
- crytek
- Posts: 355
- Joined: Mon Aug 31, 2009 9:55 pm
Re: need help. just a simple problem
There are quite a few ways to go about this, my favorite (To my knowledge the easiest)
Is to make a oncollide script that spawns a small ball on app.mousepos and then have a hinge trigger to mouse clicks. I'll elaborate later with a tutorial like thing but i don't have the time Atm. If any one else whats to teach him feel free.
Is to make a oncollide script that spawns a small ball on app.mousepos and then have a hinge trigger to mouse clicks. I'll elaborate later with a tutorial like thing but i don't have the time Atm. If any one else whats to teach him feel free.
-

Mystery - Posts: 2802
- Joined: Thu Sep 03, 2009 1:16 pm
- Location: Southern Australia
Re: need help. just a simple problem
Arrg no one else posted.
Well for starters you need one of these
Copy and paste this into you scene, it will make a laser that is activated with left mouse clicks
Place a box near in front of it.
Every time you click something a small Kamikaze Circle (Kills its self and what ever it touches) will spawn on you mouse.
Well for starters you need one of these
- Code: Select all
Scene.addLaserPen {
geom := 0;
relPoint := [-4.444837, -2.4123414];
velocity := +inf;
fadeDist := 0.1;
maxRays := 1;
cutter := false;
opaqueBorders := true;
showLaserBodyAttrib := true;
size := 0.1;
collideSet := 127;
collideWater := true;
color := [1.0, 1.0, 1.0, 2.0];
onLaserHit := (e)=>{Scene.addcircle({pos := app.mousepos; Color := [0,0,0,1]; radius := 0.001 ; density = +inf; oncollide := (e)=>{e.this.density = 0; e.other.density = 0} })};
entityID := 15;
zDepth := 4.0;
rotation := 1.5707978;
activationButton := "mouse_left" }
Copy and paste this into you scene, it will make a laser that is activated with left mouse clicks
Place a box near in front of it.
Every time you click something a small Kamikaze Circle (Kills its self and what ever it touches) will spawn on you mouse.
-

Mystery - Posts: 2802
- Joined: Thu Sep 03, 2009 1:16 pm
- Location: Southern Australia
Re: need help. just a simple problem
thanks! one more thing. can you make it so the circles delete them self rapidly so they wont stay there?
- crytek
- Posts: 355
- Joined: Mon Aug 31, 2009 9:55 pm
Re: need help. just a simple problem
I'll work on. Dynamic Property's have always confused me. Algodoo defiantly was not meant to have them. They are very annoying to work with. I spent a bit less then a hour today trying to get it work for you, had it working great then out all the codes (Even the back ups) stopped working :S
-

Mystery - Posts: 2802
- Joined: Thu Sep 03, 2009 1:16 pm
- Location: Southern Australia
5 posts • Page 1 of 1
Who is online
Users browsing this forum: No registered users and 3 guests



