Spring spawning?

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

Spring spawning?

Postby TC42 » Fri May 13, 2011 1:50 am

I am using this code spawn springs:
Code: Select all
scene.addSpring({geom1:=1; geom0:=2; geom1pos:=scene.my.pos; geom0pos:=app.mousepos; length:=3})


However, it doesn't work. What is wrong with it?
Image
Spambot wrote:Nowadays, memes usually are studied less in the field of biology, but more with the arena of psychology along with sociology. But, the major area of a meme, getting embraced and imitated all the time is what’s at any core connected with any meme.
User avatar
TC42
 
Posts: 984
Joined: Sun Jan 09, 2011 1:53 pm
Location: $ sudo apt get-install sandwich_

Re: Spring spawning?

Postby Someone Else » Fri May 13, 2011 3:48 am

I don't know. Except that it's completely and utterly wrong and springs are a lot different from hinges.

Try copy/pasting a spring into the Appearance menu and seeing if that helps. I'd be surprised.
Matthias Wandel is epic, in my humble opinion.
I love my brain...
TC42 wrote:Also, your sig is too big, please change it.

ARE YA HAPPY NOW?????

Thymechanic/Phundamentalist

Recently, I discovered something a lot of you probably already knew: Minecraft is awesome.
Due to this, I may not be as active as usual for a while.
User avatar
Someone Else
 
Posts: 1147
Joined: Sun Nov 21, 2010 10:53 pm
Location: The Milky Way Galaxy

Re: Spring spawning?

Postby bozbez » Fri May 13, 2011 5:21 pm

TC42 wrote:I am using this code spawn springs:
Code: Select all
scene.addSpring({geom1:=1; geom0:=2; geom1pos:=scene.my.pos; geom0pos:=app.mousepos; length:=3})


However, it doesn't work. What is wrong with it?

Nothing is wrong with the code, it is something else. Can we see the rest of the code?
Image

Go here. Now. That's Now. Not in 5 minutes. Now.
User avatar
bozbez
 
Posts: 149
Joined: Tue Apr 12, 2011 7:01 pm

Re: Spring spawning?

Postby Someone Else » Sat May 14, 2011 3:49 am

I couldn't get that code to work. Then again, I changed geom0pos and geom1pos both to [0, 0]. With a hinge, this will make both ends connect to the center of the circle.
Matthias Wandel is epic, in my humble opinion.
I love my brain...
TC42 wrote:Also, your sig is too big, please change it.

ARE YA HAPPY NOW?????

Thymechanic/Phundamentalist

Recently, I discovered something a lot of you probably already knew: Minecraft is awesome.
Due to this, I may not be as active as usual for a while.
User avatar
Someone Else
 
Posts: 1147
Joined: Sun Nov 21, 2010 10:53 pm
Location: The Milky Way Galaxy

Re: Spring spawning?

Postby TC42 » Sat May 14, 2011 3:54 am

The rest of the code is e.geom.controlleracc=0. I'm assuming y'all are using algodoo 1.8.5, right? From what I've read, it should work. The reason I know that it is the spring code is that the controlleracc code is after the spring code, and the controlleracc code did not run, so the problem must be in the spring code.
Image
Spambot wrote:Nowadays, memes usually are studied less in the field of biology, but more with the arena of psychology along with sociology. But, the major area of a meme, getting embraced and imitated all the time is what’s at any core connected with any meme.
User avatar
TC42
 
Posts: 984
Joined: Sun Jan 09, 2011 1:53 pm
Location: $ sudo apt get-install sandwich_

Re: Spring spawning?

Postby Someone Else » Sun May 15, 2011 10:51 pm

I'm using 1.9.4 beta.

Did you try deleting the controllerAcc code?
Matthias Wandel is epic, in my humble opinion.
I love my brain...
TC42 wrote:Also, your sig is too big, please change it.

ARE YA HAPPY NOW?????

Thymechanic/Phundamentalist

Recently, I discovered something a lot of you probably already knew: Minecraft is awesome.
Due to this, I may not be as active as usual for a while.
User avatar
Someone Else
 
Posts: 1147
Joined: Sun Nov 21, 2010 10:53 pm
Location: The Milky Way Galaxy

Re: Spring spawning?

Postby TC42 » Sun May 15, 2011 11:13 pm

Someone Else wrote:I'm using 1.9.4 beta.

That could be why the code doesn't work for you...

Did you try deleting the controllerAcc code?

Nah, the controlleracc code should work no matter what. However, I have put the project that I was going to use this for on hold for a while, as I am now working on something else, and exams are coming up in a couple of weeks :crazy: So I'll try to experiment a bit more, but it's no longer top priority.

However... does anyone (aside from Kilinich--I haven't seen him online for ages) know how to save variables so that they are not scene specific?
Image
Spambot wrote:Nowadays, memes usually are studied less in the field of biology, but more with the arena of psychology along with sociology. But, the major area of a meme, getting embraced and imitated all the time is what’s at any core connected with any meme.
User avatar
TC42
 
Posts: 984
Joined: Sun Jan 09, 2011 1:53 pm
Location: $ sudo apt get-install sandwich_

Re: Spring spawning?

Postby Someone Else » Mon May 16, 2011 3:18 am

TC42 wrote:
Someone Else wrote:I'm using 1.9.4 beta.

That could be why the code doesn't work for you...

Sure is. Turns out that a 1.9.4 spring is actually three separate entities- a spring and two lineEndPoints. A lineEndPoint is the thing that shows up on either end of a spring that anchors it to an object.

You can only move a spring by moving its lineEndPoints. Moving the spring itself does nothing. (Glitch?)

You can change the zDepth of lineEndPoints independent of the attached spring. (Glitch?)

When you go Context Menu.Selection.Select, you cannot tell it to select lineEndPoints, even if you have some selected. If you click Spring, it will deselect lineEndPoints. (Glitch?)

The title of the menus for a lineEndPoint might say "Appearance Menu for [Type_LineEndPoint(1)]". (Glitch?)

You can change the color of a lineEndPoint independent of everything. (Deliberate?)

TC42 wrote:
Someone Else wrote:Did you try deleting the controllerAcc code?

Nah, the controlleracc code should work no matter what. However, I have put the project that I was going to use this for on hold for a while, as I am now working on something else, and exams are coming up in a couple of weeks :crazy: So I'll try to experiment a bit more, but it's no longer top priority.

However... does anyone (aside from Kilinich--I haven't seen him online for ages) know how to save variables so that they are not scene specific?

Try typing this into console: blah = 100
It should declare a variable in the [ROOT] scope under the identifier blah and with integer value 100.
Matthias Wandel is epic, in my humble opinion.
I love my brain...
TC42 wrote:Also, your sig is too big, please change it.

ARE YA HAPPY NOW?????

Thymechanic/Phundamentalist

Recently, I discovered something a lot of you probably already knew: Minecraft is awesome.
Due to this, I may not be as active as usual for a while.
User avatar
Someone Else
 
Posts: 1147
Joined: Sun Nov 21, 2010 10:53 pm
Location: The Milky Way Galaxy


Return to Thyme scripting

Who is online

Users browsing this forum: No registered users and 2 guests