Browse Search Popular Register Upload Rules User list Login:
Search:
Stopwatch {thyme}

Image:
screenshot of the scene

Author: Jelmerholland

Group: Default

Filesize: 373.37 kB

Date added: 2009-06-16

Rating: 4.5

Downloads: 1099

Views: 1249

Comments: 2

Ratings: 2

Times favored: 0

Made with: Phun

Tags:

Scene tag

This is my first real thyme scene. I love it, but it's useless, maybe you want to use it in a race game, for the time.. but please cred me.

Open the script menu of the hinge of the bar on the right. On the line "Motor" you type: "{scene.my.start}" (without the quotes)
Now it should work when you press start.


Controles: (everything is with the dragtool)
Drag the start down to start the stopwatch
Drag the stop to stop the stopwatch
Drag the reset to reset the stopwatch.
Warning: You can reset the stopwatch while it's started, so watch it

I used very simple coding. everyone will understand if you know a bit about scripting.

scene.my.s // the seconds variable
scene.my.m // the minute variable
scene.my.h // the hour variable

Chip This is the box on the left, I call this the chip because it does the calculations
onCollide = (e)=>{
scene.my.s == 60 ? {
scene.my.s := 0;
scene.my.m := scene.my.m + 1
} : {};
scene.my.m == 60 ? {
scene.my.m := 0;
scene.my.h := scene.my.h + 1
} : {};
scene.my.h == 24 ? {
scene.my.s := 0;
scene.my.m := 0;
scene.my.h := 0
} : {}
}

Engine This is the bar and circle on the right, that updates the seconds
onCollide = (e)=>{scene.my.s = scene.my.s + 1}

Buttons
Start
onCollide = (e)=>{
scene.my.start := true;
scene.my.aa := 0.30000001
}
Spring for that button
length = {scene.my.aa}

Stop
onCollide = (e)=>{
scene.my.start := false;
scene.my.aa := 0.60000002
}

Reset
onCollide = (e)=>{
scene.my.s := 0;
scene.my.m := 0;
scene.my.h := 0
}

Screen
Seconds
text = {" " + scene.my.s}

Minutes
text = {" " + scene.my.m}

Hours
text = {" " + scene.my.h}



Enjoy, I hope you like it:cool:
Last edited at 2009/06/17 07:15:39 by Jelmerholland
Please log in to rate this scene
edit
Similar scenes
Title: Stopwatch
Rating: 5
Filesize: 65.34 kB
Downloads: 267
Comments: 1
Ratings: 1
Date added: 2016/10/26 13:08:08
Made with: Algodoo v2.1.0
Rating: rated 5
download
Title: Cell Time trial Beta
Rating: 4.75
Filesize: 191.66 kB
Downloads: 1124
Comments: 0
Ratings: 2
Date added: 2009/09/26 19:50:05
Made with: Phun
Rating: rated 4.8
download
Title: -->Thyme Question<--
Rating: 5
Filesize: 299.27 kB
Downloads: 143
Comments: 3
Ratings: 1
Date added: 2015/07/02 00:21:13
Made with: Algodoo v2.1.0
Rating: rated 5
download
Title: Секундомер Stopwatch
Rating: 5
Filesize: 54.02 kB
Downloads: 108
Comments: 0
Ratings: 1
Date added: 2016/04/15 18:42:08
Made with: Algodoo v2.1.0
Rating: rated 5
download
Title: Stopwatch Ver. 2
Rating: 5
Filesize: 260.23 kB
Downloads: 929
Comments: 0
Ratings: 1
Date added: 2009/06/28 18:25:57
Made with: Phun
Rating: rated 5
download
Title: Stopwatch
Rating: 5
Filesize: 62.66 kB
Downloads: 217
Comments: 0
Ratings: 1
Date added: 2016/10/21 22:46:36
Made with: Algodoo v2.1.0
Rating: rated 5
download
this sucks it doesnt even go from 1 sec to 2sec when i start it its just gay
Then something went wrong in saving the scripts..

Fixed,

Right click on the hinge of the right small long bar. open the script menu and type in the motor line "scene.my.start"

Now it should work when you press start
Last edited at 2009/06/17 07:11:37 by Jelmerholland