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: 1678

Views: 1499

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: 349.38 kB
Downloads: 986
Comments: 0
Ratings: 1
Date added: 2022/03/23 08:23:47
Made with: Algodoo v2.1.0
Rating: rated 5
download
Title: Analog Clock/StopWatch
Rating: 5
Filesize: 19.97 kB
Downloads: 795
Comments: 0
Ratings: 1
Date added: 2014/10/25 05:28:17
Made with: Algodoo v2.1.0
Rating: rated 5
download
Title: Accurate Stopwatch
Rating: 5
Filesize: 20.87 kB
Downloads: 582
Comments: 0
Ratings: 1
Date added: 2022/03/18 07:45:46
Made with: Algodoo v2.1.0
Rating: rated 5
download
Title: Cool digital stopwatch 2
Rating: 5.6667
Filesize: 384.25 kB
Downloads: 479
Comments: 1
Ratings: 3
Date added: 2008/09/09 17:07:34
Made with: Phun
Rating: rated 5.7
download
Title: Stopwatch (Digital)
Rating: 5
Filesize: 22.77 kB
Downloads: 644
Comments: 0
Ratings: 1
Date added: 2023/02/27 12:23:10
Made with: Algodoo v2.1.0
Rating: rated 5
download
Title: -->Thyme Question<--
Rating: 5
Filesize: 299.27 kB
Downloads: 290
Comments: 3
Ratings: 1
Date added: 2015/07/02 00:21:13
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