Spawning a Scene

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

Spawning a Scene

Postby Rideg » Wed May 05, 2010 5:54 pm

Hello I'm Trying to spawn a scene but I'm Having some difficulties. I spawn all parts at e.pos, and it all get scambled. How should I do to make them span at the same position?

Best Regards// Rideg
Image
make sure to check out my work.
User avatar
Rideg
 
Posts: 948
Joined: Tue Dec 15, 2009 5:17 pm
Location: Östersund, Sweden

Re: Spawning a Scene

Postby Mystery » Thu May 06, 2010 9:55 am

Obviously spawning all the part at e.pos isn't a good idea, you should see why.
I haven't done much work in this area but i do believe the codes should go something like this..
The objects original pos was
Code: Select all
pos := [-0.75, 0.5]

Your going to want to change it to
Code: Select all
pos := [-0.75, 0.5] + e.pos

To get best results base the center of the scene around the center of Algodoo ( [0, 0] )
User avatar
Mystery
 
Posts: 2802
Joined: Thu Sep 03, 2009 1:16 pm
Location: Southern Australia

Re: Spawning a Scene

Postby Rideg » Thu May 06, 2010 4:47 pm

Okey thanks alot should've thoguht of that. :P
Image
make sure to check out my work.
User avatar
Rideg
 
Posts: 948
Joined: Tue Dec 15, 2009 5:17 pm
Location: Östersund, Sweden

Re: Spawning a Scene

Postby coleyy » Sun Sep 26, 2010 11:17 pm

just select the entire object, copy it (ctrl+c), delete the object, go to the script menu of the geometry you want it to spawn out of and paste (ctrl+v) in the oncollide between the {}
I'm English. Я русский. Soy español. Je suis français. Ich bin Deutscher. 私は日本人です.Image
coleyy
 
Posts: 31
Joined: Fri Sep 24, 2010 11:13 pm

Re: Spawning a Scene

Postby Rideg » Mon Sep 27, 2010 7:58 am

Wow. This was looong ago. Thank you for your help though, but theese days I can spawn a scene asleep ;D
Image
make sure to check out my work.
User avatar
Rideg
 
Posts: 948
Joined: Tue Dec 15, 2009 5:17 pm
Location: Östersund, Sweden


Return to Thyme scripting

Who is online

Users browsing this forum: No registered users and 3 guests