[Thyme] New Method

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

[Thyme] New Method

Postby gradyfitz » Fri Sep 25, 2009 2:31 am

Image
What is New Method?
New method is a new method of calculating just about any part of an object's properties and current action.

Why would I use New Method?
New Method enables a person to read any property of an object, with the same level or higher level of accuracy as the information box, and the ability to determine other properties like geomID that were previously unreachable without some manual work.

New Method only requires one single refresher anywhere on the scene to update every value, as opposed to a constant refresher required in beacon systems.


Are there down sides to New Method?
Yes, New Method doesn't unfortunately serialise and holding keys down will be basically disabled (unless of course you don't use a constant refresh).

What object properties can I access with New Method?
All of them:
• airFrictionMult
• angle
• angvel
• attraction
• autoBrake
• body
• buttonDestroy
• buttonMirror
• ccw
• collideSet
• collideWater
• color
• controllerAcc
• controllerInvertX
• controllerInvertY
• controllerReverseXY
• cutter
• dampingFactor
• density
• distanceLimit
• drawBorder
• drawCake
• entityID
• fadeDist
• fadeTime
• friction
• geom
• geom0
• geom1
• geom1pos
• geomID
• heteroCollide
• immortal
• impulseLimit
• killer
• length
• materialVelocity
• maxRays
• motor
• motorTorque
• onCollide
• onHitByLaser
• onLaserHit
• opaqueBorders
• pos
• protractor
• radius
• refractiveIndex
• relpoint
• restitution
• rotation
• ruler
• showLaserBodyAttrib
• size
• strengthFactor
• surfaces
• text
• textColor
• textScale
• texture
• textureMatrix
• vel
• velocity
• world0pos
• world1pos
• zDepth


Am I able to modify values like pos with New Method?
No, unless they have not yet been defined, though, those you had access to before will still be fine, like texture or text.

How do I use New Method?
You can follow a few steps:
1. Select an object and go into it's script menu.
2. In the box down the bottom, type the name of the value you want, like pos or vel or size.
3. Then type a new identifier declaration operator (":=").
4. Type a value, like [1,1] or 2 or 5.6.
5. Check you haven't made any mistakes, it should look something like pos := [1,1].
6. Press Enter.

For the refresher, put the onCollide or onHitByLaser as:
Code: Select all
(e)=>{App.step;App.undo}
, you can add more to the onCollide code, but that code will update all objects using New Method.


Any examples of New Method?
Yes,
Rating: rated 6
Filesize: 18.5 kB
Comments: 3
Ratings: 3
download
Mechanisms: 18 Mechanisms.
Thyme: Tutorial - Variables/Commands List.
Thymechanic
gradyfitz
 
Posts: 174
Joined: Tue Sep 01, 2009 8:33 am
Location: Victoria, Australia

Re: [Thyme] New Method

Postby Mystery » Sat Sep 26, 2009 3:32 am

-bows down-
In the name of the farther, the Grady and the holy Emil
Amen.

:D This is so awesome you've finally released Meathod-X (Copyright Pending) This is the dawn of a new age (Thyme Glitching) With this remarkable things will happen.
User avatar
Mystery
 
Posts: 2802
Joined: Thu Sep 03, 2009 1:16 pm
Location: Southern Australia

Re: [Thyme] New Method

Postby niffirg1 » Sat Sep 26, 2009 4:14 am

:clap: Wow this is amazing
User avatar
niffirg1
 
Posts: 376
Joined: Mon Aug 31, 2009 10:31 pm
Location: The Great American South!

Re: [Thyme] New Method

Postby RA2lover » Sat Sep 26, 2009 9:13 pm

too bad this disables certain things - that makes the usage of things like pos, vel, and other constantly updating stuff almost useless to track
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
User avatar
RA2lover
 
Posts: 607
Joined: Mon Aug 31, 2009 8:43 pm
Location: Brazil

Re: [Thyme] New Method

Postby FruitMonger » Thu May 13, 2010 8:32 pm

For some reason, the refresher crashes phun. Is this method only for algodoo, or did I just did something wrong?
I'm pretty sure I did everything you said...
Image
User avatar
FruitMonger
 
Posts: 135
Joined: Thu Dec 10, 2009 8:20 pm
Location: Some fruit stand in Indiana

Re: [Thyme] New Method

Postby Dakta » Thu May 13, 2010 9:53 pm

I assume it's an Algodoo thing.

And well discovered grady! This is purely awesome!
.. ,__,_____
. / __.==--" - - - - - - - - ""
./#(-'
.`-' From http://www.ascii-art.de/. Modded by me to work in Arial. Image
a Mammoth wrote:be boring and interesting.

Mystery wrote:If you were jailbreaker you shouldn't have when't up the 3.1.3
I didn't know you could go up 3.1.3! Thanks Mystery person!
User avatar
Dakta
 
Posts: 417
Joined: Sat Sep 12, 2009 4:36 pm

Re: [Thyme] New Method

Postby xplane80 » Thu May 13, 2010 11:19 pm

You could just make a probe but it wouldn't be as accurate.
Image<- Designed by PhysicsGuy
User avatar
xplane80
 
Posts: 498
Joined: Mon Aug 31, 2009 7:28 pm

Re: [Thyme] New Method

Postby FruitMonger » Wed Nov 03, 2010 1:24 am

Is the simulation supposed to be screwed up so that I can't drag or zoom or camera pan when the refresher is running? This New Method is cool and all, but I can't do anything when the refresher is going.
Image
User avatar
FruitMonger
 
Posts: 135
Joined: Thu Dec 10, 2009 8:20 pm
Location: Some fruit stand in Indiana

Re: [Thyme] New Method

Postby kilebantick » Wed Nov 03, 2010 2:04 am

Yes, that happens. At the moment, there's no way to avoid that happening.
Image
User avatar
kilebantick
 
Posts: 1267
Joined: Tue Sep 01, 2009 9:50 am

Re: [Thyme] New Method

Postby FruitMonger » Wed Nov 03, 2010 2:08 am

Crapola! Well then I guess I won't be using it a whole bunch. Thanks for the help. (dang stinkin' new method...)
Image
User avatar
FruitMonger
 
Posts: 135
Joined: Thu Dec 10, 2009 8:20 pm
Location: Some fruit stand in Indiana

Re: [Thyme] New Method

Postby Kilinich » Wed Nov 03, 2010 8:25 am

FruitMonger wrote:Crapola! Well then I guess I won't be using it a whole bunch. Thanks for the help. (dang stinkin' new method...)

Relax, not working in 1.8.0, you can read it but can't use to attach or create objects.
Dream of Algodoo as game development engine...
User avatar
Kilinich
[Best bug reporter 2010]
 
Posts: 2098
Joined: Mon Aug 31, 2009 8:27 pm
Location: South Russia

Re: [Thyme] New Method

Postby FruitMonger » Wed Nov 03, 2010 1:50 pm

I'm having a little trouble seeing what you mean. So you mean in 1.8.0 you can do everything normal, but you can't use it to attach or spawn stuff? Well, I have the Algodoo you get from the back to school special, so I'm not sure which version that is, but I'll check what the latest version is and if the back to school special is the same or not and get back to you.

Edit: Uh hu...I just looked, and the latest version (1.8.0) is the version I have. So it might be my algodoo that's screwed up...?
Image
User avatar
FruitMonger
 
Posts: 135
Joined: Thu Dec 10, 2009 8:20 pm
Location: Some fruit stand in Indiana

Re: [Thyme] New Method

Postby Kilinich » Wed Nov 03, 2010 3:38 pm

I mean that method 1) mess with undo, 2) slow down sim, 3) can't be used for getting geomID and attaching things to it
Dream of Algodoo as game development engine...
User avatar
Kilinich
[Best bug reporter 2010]
 
Posts: 2098
Joined: Mon Aug 31, 2009 8:27 pm
Location: South Russia


Return to Thyme scripting

Who is online

Users browsing this forum: No registered users and 5 guests