Still stuck in Thyming...

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

Still stuck in Thyming...

Postby Rexy » Sun Dec 20, 2009 11:28 pm

Im trying to learn it, but every time i try to script, it just wont work. 10 mins ago, i tried to make the onCollide script that increases the number by 1 on the box. (From the video of Paradigam 29).
When i first follow that video step by step, it all worked fine, i even tryed the one with the spring that got longer each time something hit the box, which made the box, "scene.my.varialble1" 1 number higher.

Im really in a need of some kind of guide to help me out of this .. stuff :(
Ive been going through many diffrent guides and/or list's and everyone of them just doesnt give any sense for me.
By now, the only things, exept the video-following scriping, ive made, is some mechanical car's and a failed tank.

:(
Rexy
 
Posts: 14
Joined: Mon Dec 14, 2009 9:38 pm

Re: Still stuck in Thyming...

Postby standardtoaster » Sun Dec 20, 2009 11:51 pm

Are you making sure to put curly brackets around the variables when they are in sections other than onCollide, onLaserHit, and onHitByLaser?
User avatar
standardtoaster
 
Posts: 606
Joined: Mon Aug 31, 2009 7:57 pm

Re: Still stuck in Thyming...

Postby Rexy » Mon Dec 21, 2009 12:07 am

Im using {'s and ['s and all that, the correct places. 2 sec ago, i tried to make a car that should go faster, every time a laser hits a box i made. That just was a big failure.. The system i had in that was kinda one big guess, but i typed in the console: scene.my.box = 0. Then i a box show the box show Speed = 0 on it.
after that, i typed in, in the box, (in the laserhit text box): (e)=>{scene.my.box + scene.my.box + 1}.
Then i made a simple car and set one of its hinge's speed to {scene.my.box}. afer that, i placed a laser in front of the box and set it so, that everytime i pressed 3 it was hitting the box with the laser.
While testing it: Nothing happened. :(
This and some reasons more, is the reasons why i cant/dont Thyme. It wont work for me.

----

Btw, Ive been wondering, in the video, He gets the number on the scene.my.varialble1. Is it possible to make scene.my.varialble1 another polygon, without doing it all over in the F11-bar / (~)-bar?


This is my only working scene with thyme. Thyming is from the Video.

Rating: rated 5
Filesize: 306.05 kB
Comments: 1
Ratings: 1
download
Rexy
 
Posts: 14
Joined: Mon Dec 14, 2009 9:38 pm

Re: Still stuck in Thyming...

Postby KarateBrot » Mon Dec 21, 2009 12:33 am

Rexy wrote:after that, i typed in, in the box, (in the laserhit text box): (e)=>{scene.my.box + scene.my.box + 1}.


you made a mistake. you didn't type the define sign (= ). instead you typed in a +
Code: Select all
(e)=>{scene.my.box = scene.my.box + 1}
Image
User avatar
KarateBrot
 
Posts: 825
Joined: Mon Aug 31, 2009 7:32 pm
Location: Germany

Re: Still stuck in Thyming...

Postby Rexy » Mon Dec 21, 2009 12:38 am

Tried to replace, but another failure. Maybe ive done something completely wrong another place...
I completely fail at thyme :cry: Maybe you could make the scene for me, and i could see the scripting how your is, and what i did wrong? :?
Rexy
 
Posts: 14
Joined: Mon Dec 14, 2009 9:38 pm

Re: Still stuck in Thyming...

Postby KarateBrot » Mon Dec 21, 2009 12:40 am

open up the console and tell us what the error message is. or maybe start with a bit easier stuff to understand the basics of the basics. it really helps. in the beginning the only thing i was able to do with thyme was spawning water.
Image
User avatar
KarateBrot
 
Posts: 825
Joined: Mon Aug 31, 2009 7:32 pm
Location: Germany

Re: Still stuck in Thyming...

Postby Rexy » Mon Dec 21, 2009 12:43 am

Is there an easy way to copy from console? :?
Rexy
 
Posts: 14
Joined: Mon Dec 14, 2009 9:38 pm

Re: Still stuck in Thyming...

Postby Rexy » Mon Dec 21, 2009 12:44 am

No wait! it works! omg :D :shock: :D :shock: :lol:

Okay.. Now i see the number increase when the laser hits, but when i type {scene.my.speed}, in the speed script line, the car doesnt move..
Last edited by Rexy on Mon Dec 21, 2009 12:49 am, edited 1 time in total.
Rexy
 
Posts: 14
Joined: Mon Dec 14, 2009 9:38 pm

Re: Still stuck in Thyming...

Postby KarateBrot » Mon Dec 21, 2009 12:49 am

xD

if someone still wants to know:
yes there is an easy way to copy text from the console. in your algodoo folder in "my documents" there's a file called "log file". scroll down to the bottom and copy the text from there.
Image
User avatar
KarateBrot
 
Posts: 825
Joined: Mon Aug 31, 2009 7:32 pm
Location: Germany

Re: Still stuck in Thyming...

Postby Rexy » Mon Dec 21, 2009 12:54 am

Works again.. This stuff is mean to me =[ ...

Anyways, sorry for so many posts :D

Just for annoy/ask even more,: How do you spawn water? :D



KarateBrot wrote:if someone still wants to know:
yes there is an easy way to copy text from the console. in your algodoo folder in "my documents" there's a file called "log file". scroll down to the bottom and copy the text from there.

Thanks :)
Rexy
 
Posts: 14
Joined: Mon Dec 14, 2009 9:38 pm

Re: Still stuck in Thyming...

Postby standardtoaster » Mon Dec 21, 2009 1:03 am

Rexy wrote:No wait! it works! omg :D :shock: :D :shock: :lol:

Okay.. Now i see the number increase when the laser hits, but when i type {scene.my.speed}, in the speed script line, the car doesnt move..

Did you make sure that the motor is on? ;)
User avatar
standardtoaster
 
Posts: 606
Joined: Mon Aug 31, 2009 7:57 pm

Re: Still stuck in Thyming...

Postby Rexy » Mon Dec 21, 2009 1:06 am

Yeah i noticed that, and fixed it, Thanks anyway :) It all works fine now ;)
Rexy
 
Posts: 14
Joined: Mon Dec 14, 2009 9:38 pm

Re: Still stuck in Thyming...

Postby KarateBrot » Mon Dec 21, 2009 1:07 am

Rexy wrote:Just for annoy/ask even more,: How do you spawn water? :D


:D it's simple. Just paste this code into Oncollide or OnLaserHit or OnHitByLaser:
Code: Select all
(e) => { scene.addWater({ vecs := [e.pos] }) }

if you want to spawn more than 1 water particle per collision/laser hit type vecs := [e.pos, e.pos, e.pos] with as many e.pos as you like.
And be sure to turn off the collision with water for your spawner otherwise you can easily shoot down algodoo because of too many water particles :D
Image
User avatar
KarateBrot
 
Posts: 825
Joined: Mon Aug 31, 2009 7:32 pm
Location: Germany

Re: Still stuck in Thyming...

Postby Rexy » Mon Dec 21, 2009 11:17 am

Okey, Ill go try it out, Thanks :)

Edit:

Oooops..
Rexy
 
Posts: 14
Joined: Mon Dec 14, 2009 9:38 pm


Return to Thyme scripting

Who is online

Users browsing this forum: No registered users and 5 guests

cron