is it possible?

About advanced scenes, and the Thyme scripting language used in Algodoo.

is it possible?

Postby jessebax129 » Sun Jul 11, 2010 11:23 pm

hi i want to make a sort of ''gun'' that spawns balls that it will shoot away, than: how can i make the balls to destroy 1 piece of the wall (like killer = true) and THEN destroy itself (ball suicide)? howe can i make it and is it possible?
jessebax129
 
Posts: 34
Joined: Tue Jan 05, 2010 6:32 pm

Re: is it possible?

Postby simey j dude » Mon Jul 12, 2010 12:08 am

add
Code: Select all
    AirfrictionMult = NaN;e.other.AirfrictionMult = NaN
to your code
or just add this:
Code: Select all
Scene.addcircle({
        pos := e.pos;
        Color := [0, 0, 0, 1];
        oncollide := (e)=>{
            AirfrictionMult = NaN;
            e.other.AirfrictionMult = NaN
        };
        radius := 0.1;
        vel := e.normal * 50
    });
    scene.addpen({
        pos := e.pos;
        color := [1.0, 0.78400207, 0.003086269, 1.0];
        size := 0.9
    })
to oncollide/onhitbylaser.
User avatar
simey j dude
 
Posts: 61
Joined: Sat Sep 05, 2009 3:11 am
Location: under your bed!

Re: is it possible?

Postby Matten » Wed Jul 28, 2010 1:55 pm

airFrictionMult is for Phun, for Algodoo use (e.other.)density = 0
Cave Johnson wrote:Do you know who I am? I'm the man who's gonna burn your house down! With the lemons! I'm gonna get my engineers to invent a combustible lemon that burns your house down!
User avatar
Matten
 
Posts: 435
Joined: Mon Apr 05, 2010 2:03 pm
Location: The Netherlands


Return to Thyme scripting

Who is online

Users browsing this forum: No registered users and 7 guests