[Thyme][1.5.61]Thyme Command/Variables List
123 posts • Page 2 of 5 • 1, 2, 3, 4, 5
Re: [Thyme][1.5.61]Thyme Command/Variables List
Great work, as always, Grady.
I have one request though: Can you explain exactly what parameters are needed for each add______ command to work, and where you can get the input values from? I find it challenging to figure out what can be used where, and how to find out exactly what is needed. Also, does the addSpring method work at all, even if it only works partially? I've read on the forum in several places about how the addHinge method is almost impossible to use, but I wanted to try the addSpring method first since I thought I read about it working, and then wanted to move onto addHinge to see if I couldn't trick it into working properly (or even improperly is good enough I suppose).
Thanks in advance. I might be new to Algodoo, but you can believe me when I say I'm plenty experienced in coding. It's refreshing having you around the forums to help.
I have one request though: Can you explain exactly what parameters are needed for each add______ command to work, and where you can get the input values from? I find it challenging to figure out what can be used where, and how to find out exactly what is needed. Also, does the addSpring method work at all, even if it only works partially? I've read on the forum in several places about how the addHinge method is almost impossible to use, but I wanted to try the addSpring method first since I thought I read about it working, and then wanted to move onto addHinge to see if I couldn't trick it into working properly (or even improperly is good enough I suppose).
Thanks in advance. I might be new to Algodoo, but you can believe me when I say I'm plenty experienced in coding. It's refreshing having you around the forums to help.
- Prsn828
- Posts: 3
- Joined: Wed Sep 09, 2009 7:57 pm
Re: [Thyme][1.5.61]Thyme Command/Variables List
Prsn828 wrote:Great work, as always, Grady.
I have one request though: Can you explain exactly what parameters are needed for each add______ command to work, and where you can get the input values from? I find it challenging to figure out what can be used where, and how to find out exactly what is needed. Also, does the addSpring method work at all, even if it only works partially? I've read on the forum in several places about how the addHinge method is almost impossible to use, but I wanted to try the addSpring method first since I thought I read about it working, and then wanted to move onto addHinge to see if I couldn't trick it into working properly (or even improperly is good enough I suppose).
Thanks in advance. I might be new to Algodoo, but you can believe me when I say I'm plenty experienced in coding. It's refreshing having you around the forums to help.
For a spring you need world0pos and (world1pos or geom1pos (and geom1)).
So, if you are connecting an object to the background you could use the code:
- Code: Select all
Scene.addSpring { geom1 = 0; world0pos = [-0.19999999, 0.19999999];geom1pos = [-0.1, 0.7];}
If you were connecting two geometries, you could use the code:
- Code: Select all
Scene.addSpring { world0pos = [-0.10000002, 0.90000004]; geom1pos = [-0.90000004, 0.1];}
For a hinge you need geom0 and geom1, its best to include geom0pos and geom1pos too.
Two hinged objects:
- Code: Select all
Scene.addHinge { geom0 = 6726112; geom0pos = [-4.7683716e-007, 5.9604645e-008]; geom1 = 6726111; geom1pos = [-4.7683716e-007, 5.9604645e-008];}
One hinged object:
- Code: Select all
Scene.addHinge { geom0 = 6726111; geom0pos = [-4.7683716e-007, 5.9604645e-008]; geom1 = 0; geom1pos = [6.1, 0.90000004];}
Hopefully this helped .
- gradyfitz
- Posts: 174
- Joined: Tue Sep 01, 2009 8:33 am
- Location: Victoria, Australia
Re: [Thyme][1.5.61]Thyme Command/Variables List
nobody has still replied to my question :/
scene is now here -
Author: Sniperkasa
Title: Calculator W.I.P V.1.1
File Size: 9.86 kB
Rating:
scene is now here -
Author: Sniperkasa
Title: Calculator W.I.P V.1.1
File Size: 9.86 kB
Rating:
If you have a question, have a dollar and call somebody that cares.
No really just PM me if you have a problem
No really just PM me if you have a problem
-
Sniperkasa - Posts: 493
- Joined: Tue Sep 01, 2009 5:34 pm
- Location: The bottom of a lake.
Re: [Thyme][1.5.61]Thyme Command/Variables List
Sniperkasa wrote:nobody has still replied to my question :/
scene is now here - http://www.algodoo.com/algobox/details/30680
Now I've seen your scene, I know the problem, I'm sorry I didn't reply to you earlier
http://www.algodoo.com/algobox/details/30960
The problem was that you were using integer values instead of float values, try to use float values, so, when you are declaring a variable of value 1, write:
- Code: Select all
<x> = 1.0
What I seem to find is that frequently, when all elements of an operation are of one type, the ending product will be that type , if you want to stop this, use Math.toFloat.
I hope it helps .
- gradyfitz
- Posts: 174
- Joined: Tue Sep 01, 2009 8:33 am
- Location: Victoria, Australia
Re: [Thyme][1.5.61]Thyme Command/Variables List
So.. You mean.. instead of typing 1 I type 1.0.. ? Not too good at these stuffs yet
If you have a question, have a dollar and call somebody that cares.
No really just PM me if you have a problem
No really just PM me if you have a problem
-
Sniperkasa - Posts: 493
- Joined: Tue Sep 01, 2009 5:34 pm
- Location: The bottom of a lake.
Re: [Thyme][1.5.61]Thyme Command/Variables List
I have a problem. It keeps saying "Not a list" for this:
Scene.addWater{vecs = [5,10]}
And I don't know why... I'm still new to this language
Scene.addWater{vecs = [5,10]}
And I don't know why... I'm still new to this language
- Grenade1950
- Posts: 9
- Joined: Sat Sep 26, 2009 2:40 pm
Re: [Thyme][1.5.61]Thyme Command/Variables List
Grenade1950 wrote:I have a problem. It keeps saying "Not a list" for this:
Scene.addWater{vecs = [5,10]}
And I don't know why... I'm still new to this language
You need another two [] brackets... don't ask me why...
- Code: Select all
Scene.addWater{vecs = [[5,10]]}
-
KarateBrot - Posts: 825
- Joined: Mon Aug 31, 2009 7:32 pm
- Location: Germany
Re: [Thyme][1.5.61]Thyme Command/Variables List
KarateBrot wrote:Grenade1950 wrote:I have a problem. It keeps saying "Not a list" for this:
Scene.addWater{vecs = [5,10]}
And I don't know why... I'm still new to this language
You need another two [] brackets... don't ask me why...
- Code: Select all
Scene.addWater{vecs = [[5,10]]}
I can explain this, you need two square brackets because it's an array of arrays, like for example, if I wanted to make 5 water particles at [1,1],[1,2],[1,3],[1,4] and[1,5] I'd write: Scene.addWater{vecs = [[1,1],[1,2],[1,3],[1,4],[1,5]]}, which is basically: [p0,p1,p2,p3,p4], p0-p4 being the positions of the particles.
Hopefully this explained it well enough .
- gradyfitz
- Posts: 174
- Joined: Tue Sep 01, 2009 8:33 am
- Location: Victoria, Australia
Re: [Thyme][1.5.61]Thyme Command/Variables List
wow thanks. i didn't know you can spawn water at different positions with one event
-
KarateBrot - Posts: 825
- Joined: Mon Aug 31, 2009 7:32 pm
- Location: Germany
Re: [Thyme][1.5.61]Thyme Command/Variables List
Could you add some sort of indication that shows whitch factors are reqired. Like this...
scene.addCircle
>pos
>radius
Could you also give examples of what to put after the factor eg:
pos- e.pos
that would be awsome if not can you tell me how to set geom0 and geom1 with springs
thanks in advance
scene.addCircle
>pos
>radius
Could you also give examples of what to put after the factor eg:
pos- e.pos
that would be awsome if not can you tell me how to set geom0 and geom1 with springs
thanks in advance
- DeathCon88
- Posts: 2
- Joined: Fri Sep 04, 2009 1:31 pm
Re: [Thyme][1.5.61]Thyme Command/Variables List
You can find out about geom0 and geom1 from this tutorial.
-
standardtoaster - Posts: 606
- Joined: Mon Aug 31, 2009 7:57 pm
Re: [Thyme][1.5.61]Thyme Command/Variables List
Is it possible to get the sqare root.. just btw
If you have a question, have a dollar and call somebody that cares.
No really just PM me if you have a problem
No really just PM me if you have a problem
-
Sniperkasa - Posts: 493
- Joined: Tue Sep 01, 2009 5:34 pm
- Location: The bottom of a lake.
Re: [Thyme][1.5.61]Thyme Command/Variables List
Yes. n^0.5 or math.pow(n, 0.5)
-
standardtoaster - Posts: 606
- Joined: Mon Aug 31, 2009 7:57 pm
Re: [Thyme][1.5.61]Thyme Command/Variables List
Could some one elaberate on what the "vel" and the "angvel" functions do. I am sort of getting into scripting and I would like to understand things I see in other scenes.
I am Alpha and Omega, the beggining and the end.
-
StephenAlverez - Posts: 164
- Joined: Wed Sep 30, 2009 2:46 am
- Location: Vermont
Re: [Thyme][1.5.61]Thyme Command/Variables List
Vel is the velocity of an object. It is in X and Y axes. [X, Y] Angvel is angular velocity.
-
standardtoaster - Posts: 606
- Joined: Mon Aug 31, 2009 7:57 pm
Re: [Thyme][1.5.61]Thyme Command/Variables List
So if i had Vel:=[1,1] in a script for a circle, the circle would be moving when it was spawned?
I am Alpha and Omega, the beggining and the end.
-
StephenAlverez - Posts: 164
- Joined: Wed Sep 30, 2009 2:46 am
- Location: Vermont
Re: [Thyme][1.5.61]Thyme Command/Variables List
Yes, it will be moving when spawned.
-
standardtoaster - Posts: 606
- Joined: Mon Aug 31, 2009 7:57 pm
Re: [Thyme][1.5.61]Thyme Command/Variables List
nevermind
Last edited by shark0151 on Wed Mar 16, 2011 8:21 pm, edited 2 times in total.
Toto, I don't think we're in Kansas anymore!
-
shark0151 - Posts: 3
- Joined: Wed Nov 11, 2009 4:34 pm
- Location: Romania
Re: [Thyme][1.5.61]Thyme Command/Variables List
What is the point of this:
?????
Because it doesn't do anything to a number - if you times by one, it will not change!!!
Gradyfitz wrote:posivate - Multiply by 1 (* 1)
?????
Because it doesn't do anything to a number - if you times by one, it will not change!!!
<-- Made with GIMP
-
blahblah200 - Posts: 61
- Joined: Tue Sep 01, 2009 11:33 am
- Location: Somewhere over the rainbow...
Re: [Thyme][1.5.61]Thyme Command/Variables List
maybe that was a failure Emil did(that function was there even before he got employed by algoryx.
I think that he wanted to write this function
math.posivate:= (x)=>{(x^2)^0.5}
I think that he wanted to write this function
math.posivate:= (x)=>{(x^2)^0.5}
Jrv wrote:TC42 wrote:Quite honestly, I didn't think anyone on 4chan has that good a use of grammar, spelling, usage, mechanics, ect.
But I've never been there, so I may be wrong.
GTFO newfgt
-
RA2lover - Posts: 607
- Joined: Mon Aug 31, 2009 8:43 pm
- Location: Brazil
Re: [Thyme][1.5.61]Thyme Command/Variables List
RA2lover wrote:maybe that was a failure Emil did(that function was there even before he got employed by algoryx.
I think that he wanted to write this function
math.posivate:= (x)=>{(x^2)^0.5}
I didn't know Emil could FAIL
<-- Made with GIMP
-
blahblah200 - Posts: 61
- Joined: Tue Sep 01, 2009 11:33 am
- Location: Somewhere over the rainbow...
Re: [Thyme][1.5.61]Thyme Command/Variables List
what is texturematrix?
- legophunpp
- Posts: 12
- Joined: Tue Jan 12, 2010 1:26 am
Re: [Thyme][1.5.61]Thyme Command/Variables List
The textureMatrix is what manipulates the texture on an object. There are nine parts to the textureMatrix.
textureMatrix = [0, 1, 2, 3, 4, 5, 6, 7, 8]
textureMatrix(0) = width of the texture
textureMatrix(1) = how much the top of the texture moves to the left and the bottom of the texture moves to the right
textureMatrix(2) = X position of the texture
textureMatrix(3) = how much the right side moves up and how much the left side moves down
textureMatrix(4) = Pinches the texture up and down
textureMatrix(5) = Y position of the texture
textureMatrix(6) = X position of the texture(applies only to polygons)
textureMatrix(7) = Pinches the texture to the top right(applies only to polygons)
textureMatrix(8) = Scale of the texture(applies only to polygons)
textureMatrix = [0, 1, 2, 3, 4, 5, 6, 7, 8]
textureMatrix(0) = width of the texture
textureMatrix(1) = how much the top of the texture moves to the left and the bottom of the texture moves to the right
textureMatrix(2) = X position of the texture
textureMatrix(3) = how much the right side moves up and how much the left side moves down
textureMatrix(4) = Pinches the texture up and down
textureMatrix(5) = Y position of the texture
textureMatrix(6) = X position of the texture(applies only to polygons)
textureMatrix(7) = Pinches the texture to the top right(applies only to polygons)
textureMatrix(8) = Scale of the texture(applies only to polygons)
-
standardtoaster - Posts: 606
- Joined: Mon Aug 31, 2009 7:57 pm
Re: [Thyme][1.5.61]Thyme Command/Variables List
legophunpp wrote:what is texturematrix?
Basically what the texture looks like inside an object
-
niffirg1 - Posts: 376
- Joined: Mon Aug 31, 2009 10:31 pm
- Location: The Great American South!
Re: [Thyme][1.5.61]Thyme Command/Variables List
Is there , and if yes , what is , a possibility to get the mass of something , using a e.other script?
as anything like e.other.mass ( or e.geom.mass with lasers ) doesnt work.
thanks in advance , me
as anything like e.other.mass ( or e.geom.mass with lasers ) doesnt work.
thanks in advance , me
- TimTheOne
- Posts: 40
- Joined: Tue Jan 12, 2010 9:22 pm
123 posts • Page 2 of 5 • 1, 2, 3, 4, 5
Who is online
Users browsing this forum: No registered users and 0 guests