Scripting
9 posts • Page 1 of 1
Scripting
I have figured out a lot of the basic scripting, but where is a good place to learn more of the advanced scripting?
Also, could someone explain the "e." you sometimes have to put in front of a code?
Also, could someone explain the "e." you sometimes have to put in front of a code?
-

tallman1996 - Posts: 13
- Joined: Mon Mar 22, 2010 10:16 pm
Re: Scripting
Search the Thyme Scripting Forum. You'll find info there.
Matthias Wandel is epic, in my humble opinion.
I love my brain...
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.
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.
-

Someone Else - Posts: 1147
- Joined: Sun Nov 21, 2010 10:53 pm
- Location: The Milky Way Galaxy
Re: Scripting
Or if you don't want to search, I'm pretty sure that either Para/Kilinich/Grady said that "e" stands for event. Actually, I think Para said it stands for Emil. But "event" is probably more likely. This would make sense, as some code such as oncollide=(e)=>{e.geom.density=5} would translate to "On an oncollide event, the density of the geom in the event will be changed to 5". So you could thing of "geom" as being an attribute of the event (the event being represented by "e", the geom by "geom"), and "density" as being an attribute of the geom, so you would get "e.geom.density".
This is my theory, based off Para/Kilinich/Grady's info.
As for learning about thyme, I suggest that you download scenes, reverse-engineer them, and read all the thyme tutorials that you can. This includes Grady's thyme commands/variables list (possibly the most insanely useful post ever made), as well as some of the tutorials at the old forums.
Before you do too much messing around in thyme, learn how to reset your config. Because every thyme user will screw it up at some point...
This is my theory, based off Para/Kilinich/Grady's info.
As for learning about thyme, I suggest that you download scenes, reverse-engineer them, and read all the thyme tutorials that you can. This includes Grady's thyme commands/variables list (possibly the most insanely useful post ever made), as well as some of the tutorials at the old forums.
Before you do too much messing around in thyme, learn how to reset your config. Because every thyme user will screw it up at some point...
-

TC42 - Posts: 984
- Joined: Sun Jan 09, 2011 1:53 pm
- Location: $ sudo apt get-install sandwich_
Re: Scripting
Thank you! Your post also reminds me of another question I had. In the code, how do you know we're to use "other" or "geom"? The only time I've seen geom is in lasers.
-

tallman1996 - Posts: 13
- Joined: Mon Mar 22, 2010 10:16 pm
Re: Scripting
e.other.........................................collisions (used only in oncollide)
e.geom.........................................object a laser hits (used only in onlaserhit)
e.laser..........................................laser that hits an object (used only in onhitbylaser)
[No prefix]....................................(used only when referring to the modifying object, ie., color=[0,0,0,0.5] instead of e.this.color=[0,0,0,0.5])
e.this...........................................referring to modifying object (sometimes used in place of [No Prefix])
I'm starting to sound like my Latin teacher teaching us about the uses of ablatives & accusatives.
e.geom.........................................object a laser hits (used only in onlaserhit)
e.laser..........................................laser that hits an object (used only in onhitbylaser)
[No prefix]....................................(used only when referring to the modifying object, ie., color=[0,0,0,0.5] instead of e.this.color=[0,0,0,0.5])
e.this...........................................referring to modifying object (sometimes used in place of [No Prefix])
I'm starting to sound like my Latin teacher teaching us about the uses of ablatives & accusatives.
-

TC42 - Posts: 984
- Joined: Sun Jan 09, 2011 1:53 pm
- Location: $ sudo apt get-install sandwich_
Re: Scripting
e.geom and e.laser are both available in both onLaserHit and onHitByLaser.
- daniels220
- Posts: 95
- Joined: Mon Aug 31, 2009 11:30 pm
Re: Scripting
'e' does stand for event, but it could be anything:
Still works.
- Code: Select all
(fds)=>{fds.other.color = [1, 0, 0, 1]}
Still works.
-

bozbez - Posts: 149
- Joined: Tue Apr 12, 2011 7:01 pm
Re: Scripting
Yes, you can even have scene.my.geom.density=scene.my.othergeom.density
I just noticed something... the oncollide/onlaserhit is a function. Is it just me, or did everyone else already know that?
I just noticed something... the oncollide/onlaserhit is a function. Is it just me, or did everyone else already know that?
-

TC42 - Posts: 984
- Joined: Sun Jan 09, 2011 1:53 pm
- Location: $ sudo apt get-install sandwich_
Re: Scripting
I just figured out that key binds, spawning, and FOR loops are all function calls.
This does help one remember the syntax.
But this is off-topic. Ish.
TC42 wrote:Is it just me, or did everyone else already know that?
This does help one remember the syntax.
But this is off-topic. Ish.
Matthias Wandel is epic, in my humble opinion.
I love my brain...
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.
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.
-

Someone Else - Posts: 1147
- Joined: Sun Nov 21, 2010 10:53 pm
- Location: The Milky Way Galaxy
9 posts • Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest





