Position Changing On Demand

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

Position Changing On Demand

Postby FruitMonger » Sun Sep 26, 2010 9:17 pm

Is it possible to change an object's position with scripting? I don't care about teleporting anything, so I don't mean "can you teleport, dur!?" I mean can you move a single object to a position that you put in. Kinda Like this:

Code: Select all
OnCollide = (e)=>{pos := [ x, x]}


I wanna know cause my new Fruitlizer stabilizer design uses a ball that's hinged to a bar that's fixated to another ball, records the top ball's position, and makes the bottom one's the exact same thing except a little lower. I already have a Fruitilizer that does kind of the same thing, but it doesn't work nearly as well as it could.

So, can and will anybody help me :) ?
Image
User avatar
FruitMonger
 
Posts: 135
Joined: Thu Dec 10, 2009 8:20 pm
Location: Some fruit stand in Indiana

Re: Position Changing On Demand

Postby Rideg » Sun Sep 26, 2010 9:48 pm

No this isn't possible :( It would be cool though.
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: Position Changing On Demand

Postby FruitMonger » Sun Sep 26, 2010 11:02 pm

CRAP CRAP CRAP! ...Well, at least I know that it really isn't possible. Thanks for helping, Rideg.
Image
User avatar
FruitMonger
 
Posts: 135
Joined: Thu Dec 10, 2009 8:20 pm
Location: Some fruit stand in Indiana

Re: Position Changing On Demand

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

You could Delete the object that should move to another pos as the same time you spawn it at another pos
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: Position Changing On Demand

Postby FruitMonger » Mon Sep 27, 2010 9:58 pm

That's pretty much what my current Fruitilizer does. Spawns a ball directly bellow another, destrys it by spawning it with a "density : 0" oncollide script, and spawns another. Over, and over, and over. I had an idea for my fruitilizer, but I'll have to think it over for a little while before I actually try it...
Image
User avatar
FruitMonger
 
Posts: 135
Joined: Thu Dec 10, 2009 8:20 pm
Location: Some fruit stand in Indiana


Return to Thyme scripting

Who is online

Users browsing this forum: No registered users and 2 guests