My first use of thyme :)

Discuss scenes and videos made with Algodoo.

My first use of thyme :)

Postby Jaxc » Tue Dec 01, 2009 9:58 pm

i were boored so i disided to make somthing using thyme:
Rating: rated 5
Filesize: 11.21 kB
Comments: 0
Ratings: 1
download
User avatar
Jaxc
 
Posts: 78
Joined: Mon Aug 31, 2009 11:21 pm

Re: My first use of thyme :)

Postby kilebantick » Wed Dec 02, 2009 7:31 am

This is broken, your variables are not assigned to anything.
Image
User avatar
kilebantick
 
Posts: 1267
Joined: Tue Sep 01, 2009 9:50 am

Re: My first use of thyme :)

Postby Jaxc » Wed Dec 02, 2009 10:59 pm

meh

edit: your sure, it works for me when i download, just give it a few seconds to start
User avatar
Jaxc
 
Posts: 78
Joined: Mon Aug 31, 2009 11:21 pm

Re: My first use of thyme :)

Postby KarateBrot » Wed Dec 02, 2009 11:36 pm

are you sure? the scene is missing the motor when i try to start it. check if your motor speed variable is not "NaN" otherwise the motor gets deleted. And check if your motor speed variable is only a number and nothing else or the script in the "motor speed" line will be deleted.
Image
User avatar
KarateBrot
 
Posts: 825
Joined: Mon Aug 31, 2009 7:32 pm
Location: Germany

Re: My first use of thyme :)

Postby Cs24 » Thu Dec 03, 2009 7:09 am

1. {scene.my.speed} is not in in motorSpeed of the motor
2. scene.my.speed in your "speed changer" is always 1.1

"fixed"" version....
Rating: rated 5
Filesize: 27.12 kB
Comments: 0
Ratings: 3
download


that was kinda fun playing around with scene.my.variable :idea:
Newbie Thymer
Intermediate Phuner
Cs24
 
Posts: 41
Joined: Tue Nov 03, 2009 5:30 am

Re: My first use of thyme :)

Postby kilebantick » Thu Dec 03, 2009 7:43 am

CS24, your scene/s so far seem to be of impeccable quality, i can tell you are going to be loved here :)
Image
User avatar
kilebantick
 
Posts: 1267
Joined: Tue Sep 01, 2009 9:50 am

Re: My first use of thyme :)

Postby KarateBrot » Thu Dec 03, 2009 4:48 pm

looks very nice. it's not often that someone who just joined here is so experienced.
Image
User avatar
KarateBrot
 
Posts: 825
Joined: Mon Aug 31, 2009 7:32 pm
Location: Germany

Re: My first use of thyme :)

Postby Cs24 » Thu Dec 03, 2009 10:05 pm

(e)=>{forum.my.offtopic=
thanks guys
I'm not really new to phun, I've been using it since phun 4, only been posting a few months back and learned thyme very recently}
the rule of "no randomly generated colours" helps make scenes much nicer to look at (even to non-phun users)

and both of our topspins have a major flaw
anyone riding them would die from the Gs :P
Newbie Thymer
Intermediate Phuner
Cs24
 
Posts: 41
Joined: Tue Nov 03, 2009 5:30 am

Re: My first use of thyme :)

Postby Jaxc » Thu Dec 03, 2009 11:18 pm

Cs24 wrote:and both of our topspins have a major flaw
anyone riding them would die from the Gs :P

details, its once in a lifetime ride!


anyway, seems like i missed to do somthing that declairs the varibles, or am i wrong?
User avatar
Jaxc
 
Posts: 78
Joined: Mon Aug 31, 2009 11:21 pm

Re: My first use of thyme :)

Postby Cs24 » Thu Dec 03, 2009 11:24 pm

yes
press "~" the button to the left of 1
then enter "scene.my.speed=0" without quotes and your scene will work
in my version scene.my.speed2 is for the motor that controls the chair
Newbie Thymer
Intermediate Phuner
Cs24
 
Posts: 41
Joined: Tue Nov 03, 2009 5:30 am

Re: My first use of thyme :)

Postby KarateBrot » Thu Dec 03, 2009 11:34 pm

it's even better to declare variables with := (which normally means declare. = is the assign command).
you can do it with = too but sometimes the variables won't be declared. It happened to me twice so using := is bomb-proof for declaring variables in the console.
Image
User avatar
KarateBrot
 
Posts: 825
Joined: Mon Aug 31, 2009 7:32 pm
Location: Germany

Re: My first use of thyme :)

Postby Cs24 » Thu Dec 03, 2009 11:51 pm

ah so thats what := is for :wtf:
I've used it before(when modding scenes for personal use) but had no idea what it really did :lol:
Newbie Thymer
Intermediate Phuner
Cs24
 
Posts: 41
Joined: Tue Nov 03, 2009 5:30 am

Re: My first use of thyme :)

Postby Jaxc » Fri Dec 04, 2009 11:03 am

Cs24 wrote:yes
press "~" the button to the left of 1
then enter "scene.my.speed=0" without quotes and your scene will work

thats what i have done, but it doesnt seem to work when uploaded :/
User avatar
Jaxc
 
Posts: 78
Joined: Mon Aug 31, 2009 11:21 pm

Re: My first use of thyme :)

Postby Jaxc » Fri Dec 04, 2009 12:09 pm

the wierd thing is that it works perfectly for me :/
User avatar
Jaxc
 
Posts: 78
Joined: Mon Aug 31, 2009 11:21 pm

Re: My first use of thyme :)

Postby KarateBrot » Fri Dec 04, 2009 3:50 pm

Jaxc wrote:
Cs24 wrote:yes
press "~" the button to the left of 1
then enter "scene.my.speed=0" without quotes and your scene will work

thats what i have done, but it doesnt seem to work when uploaded :/


that's the problem i was talking about. if you declare the variable type in scene.my.speed := 0 into the console and it will work

and there's another problem. your script in the rectangles are OnCollide scripts (which is good because you let objects collide with it so the code gets activated) but your scene.my.speed = ... thing is typed into OnHitByLaser. but you don't have any lasers that collide with the geometry so it's useless :D
rather than typing it into OnHitByLaser type it also into OnCollide so scene.my.speed = blahwhatever will also be activated at collision.
Image
User avatar
KarateBrot
 
Posts: 825
Joined: Mon Aug 31, 2009 7:32 pm
Location: Germany

Re: My first use of thyme :)

Postby Cs24 » Fri Dec 04, 2009 4:22 pm

custom variables don't carry over in the scene, thats why yours dones't work as is. It does work when i entered scene.my.speed though
so there are AFAIK 4 solutions to this
1. use :=
2. like my scenes get the user to enter the variables
3. don't use custom variables :lol:

would it be possible to enter a custom variable using onCollide? something like
(e)=>{scene.console.????=scene.my.variable}
of couse this doesn't work but would entering things into the console work with onCollide
Newbie Thymer
Intermediate Phuner
Cs24
 
Posts: 41
Joined: Tue Nov 03, 2009 5:30 am

Re: My first use of thyme :)

Postby KarateBrot » Fri Dec 04, 2009 4:35 pm

custom variables ARE saved to the scene. so users don't have to type it in again. just use := instead of = if you declare them to avoid errors when algodoo "forgets" to save those variables to the scene. it just sometimes happens to a variable. it's not often that there is a variable saving error.
Image
User avatar
KarateBrot
 
Posts: 825
Joined: Mon Aug 31, 2009 7:32 pm
Location: Germany

Re: My first use of thyme :)

Postby Cs24 » Fri Dec 04, 2009 10:37 pm

ah the problem with some of my scenes was not missing variables but missing lasers :oops: :roll:
I think this thread is done now
Newbie Thymer
Intermediate Phuner
Cs24
 
Posts: 41
Joined: Tue Nov 03, 2009 5:30 am

Re: My first use of thyme :)

Postby Jaxc » Sat Dec 05, 2009 5:52 pm

about the laser hit, i were going to use laser first because its laser, but then i had problems due to the laser beeing inside the plane, so i used on colide, and im to lazy to remove the other script :P

anyway, this ver SHOULD work:
Rating: rated 5
Filesize: 26.19 kB
Comments: 0
Ratings: 1
download
User avatar
Jaxc
 
Posts: 78
Joined: Mon Aug 31, 2009 11:21 pm


Return to Scenes

Who is online

Users browsing this forum: No registered users and 10 guests