Page 1 of 1

Syntax Needed

PostPosted: Wed Sep 02, 2009 1:25 am
by Blazemann
Where can I learn Thyme syntax? The post with the language is good, but useless without knowing how to use it!

Re: Your an idiot..... lol jk

PostPosted: Wed Sep 02, 2009 1:26 am
by Rhett97
by what do you mean 'Syntax??

Re: Syntax Needed

PostPosted: Wed Sep 02, 2009 1:28 am
by Blazemann
Like in the console it is easy: app.scene.*

But how to apply code to areas in the script menus, or non-console areas.

Re: Syntax Needed

PostPosted: Wed Sep 02, 2009 1:41 am
by Rhett97
oh well... i dont know how you would do that....... ask para or grady

Re: Syntax Needed

PostPosted: Wed Sep 02, 2009 1:46 am
by Versieon
I see, the places you can put code into are in the scipt menus in advanced mode, you can either put it into oncollide or onlasercolide. every time something is hit, it executes the script.

heres how.
you will always need {} on the ends of your script

example
(e)=>{e.other.collideSet = 2}
this is in the oncollide script

e.other says do this to the other object(e.this is for this object)
.collideSet = 2 changes the other objects collideSet to 2 or B

every time something collides with the object, it executes the script and changes the collideset

Re: Syntax Needed

PostPosted: Wed Sep 02, 2009 1:49 am
by Blazemann
Thankyou, but is there a difference with lasers? I thought I saw somewhere it is.

Re: Syntax Needed

PostPosted: Wed Sep 02, 2009 1:50 am
by Versieon
yes there is, a laser uses e.geom to specify the object it is hitting and e.laser to specify itself.

Re: Syntax Needed

PostPosted: Wed Sep 02, 2009 1:53 am
by Blazemann
Thanks alot, didn't know it was this simple. A topic should be made.

Re: Syntax Needed

PostPosted: Wed Sep 02, 2009 1:55 am
by Versieon
You can if you would want to, im not that great at making tuts

Re: Syntax Needed

PostPosted: Wed Sep 02, 2009 2:20 am
by Blazemann
Maybe with more experience.

Re: Syntax Needed

PostPosted: Wed Sep 02, 2009 2:42 am
by Ian151
Don't forget you can change many different variables from strings to arrays and intergers, floats, if you can't do it directly between objects... That usually uses the console though, but it can help if you want to try that and you don't care making a phunlet.
Most user created variables start with scene.my.Variablenamehere
You usually declare these variables in the console.
String (Words and phrases) ---> "Hello world!"
array (collection of numbers, helpfull with colors) --->[0.5,0.5,0.5,1] thats gray in a color code.
integer or float (a number or decimal) ---> 123 OR 12.3 etc.

Just putting that out there if you didn't know about that.

Re: Syntax Needed

PostPosted: Wed Sep 02, 2009 9:41 am
by gradyfitz
[Tutorial]Thyme - With full explanations at every step

I'm not going to transfer this yet, there are a lot of changes I have to make (a lot of information is out of date), but, still, I don't think anything in it doesn't work :).

Re: Syntax Needed

PostPosted: Wed Sep 02, 2009 11:48 pm
by Blazemann
Thanks Grady.