How Do you Spawn a Shape With different Collisions?

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

Re: How Do you Spawn a Shape With different Collisions?

Postby Dezzeron » Thu Nov 12, 2009 10:13 pm

Ok, heres the scene:
Rating: rated 5
Filesize: 16.59 kB
Comments: 4
Ratings: 1
download


Get the RED block to spawn the circle, as scripted, and if it works right, it will shoot. Press "enter" to shoot. I suggest you fixate the gun to the background.
Check out my stuff HERE!
MY WEB SITE HERE!

Image
Sorry, I just had to.

Phundamentalist!
Mystery wrote:I'm convinced that dezzerons scenes are all epic. He's one of the biggest underdogs of algobox.
User avatar
Dezzeron
 
Posts: 296
Joined: Tue Sep 01, 2009 12:45 am
Location: Dark Side Of The Moon

Re: How Do you Spawn a Shape With different Collisions?

Postby standardtoaster » Fri Nov 13, 2009 12:51 am

I don't need to edit anything. It already works. I don't see what's wrong with it? If you wanted it to have a forward velocity use:
Code: Select all
(e)=>{
    sim.time > (scene.my.lastshoot + 0.010000001) ? {         scene.my.lastshoot = sim.time;         scene.addcircle({             pos := e.pos;             radius := 0.05;             density := 5500000;             color := [0, 0, 0, 1];             vel := e.normal * (-100)         });         scene.addpen({             pos := e.pos;             fadetime := 0.1;             size = 0.1;             color := [1, 1, 0, 0.5]         })     } : {} }
User avatar
standardtoaster
 
Posts: 606
Joined: Mon Aug 31, 2009 7:57 pm

Re: How Do you Spawn a Shape With different Collisions?

Postby Dezzeron » Fri Nov 13, 2009 3:36 am

Ok... ok. I got it to work. Finally! :roll:
Check out my stuff HERE!
MY WEB SITE HERE!

Image
Sorry, I just had to.

Phundamentalist!
Mystery wrote:I'm convinced that dezzerons scenes are all epic. He's one of the biggest underdogs of algobox.
User avatar
Dezzeron
 
Posts: 296
Joined: Tue Sep 01, 2009 12:45 am
Location: Dark Side Of The Moon

Previous

Return to Thyme scripting

Who is online

Users browsing this forum: No registered users and 8 guests

cron