Using for loop to spawn boxes does not set correct ID

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

Using for loop to spawn boxes does not set correct ID

Postby standardtoaster » Fri Oct 30, 2009 4:25 am

I've been trying to make a new function that deals with geomIDs. Using a for loop to spawn objects with preset geomID's won't set them properly.
Code: Select all
for(10, (x)=>{Scene.addBox({pos := [App.mousePos(0) + x, App.mousePos(1)]; geomID := x})})

That would spawn a row of boxes with geomID's starting from 0 all the way to 9. If you look at the geomID's of the boxes they are no where near what they should be. Can I get some help here?
User avatar
standardtoaster
 
Posts: 606
Joined: Mon Aug 31, 2009 7:57 pm

Re: Using for loop to spawn boxes does not set correct ID

Postby standardtoaster » Sat Oct 31, 2009 6:30 pm

Bump. I really need help with this. Is there a possible fix for this or am I doing something wrong?
User avatar
standardtoaster
 
Posts: 606
Joined: Mon Aug 31, 2009 7:57 pm

Re: Using for loop to spawn boxes does not set correct ID

Postby standardtoaster » Mon Nov 09, 2009 5:38 am

Bump. This needs to be taken care of IMO. BTW can a mod or admin please move this to Help/Bug reports?
User avatar
standardtoaster
 
Posts: 606
Joined: Mon Aug 31, 2009 7:57 pm

Re: Using for loop to spawn boxes does not set correct ID

Postby niffirg1 » Mon Nov 09, 2009 5:56 am

See if Gradyfitz will help you he knows practicably everything about thyme but i believe you knew that
User avatar
niffirg1
 
Posts: 376
Joined: Mon Aug 31, 2009 10:31 pm
Location: The Great American South!


Return to Thyme scripting

Who is online

Users browsing this forum: No registered users and 2 guests