Browse Search Popular Register Upload Rules User list Login:
Search:
Timers and events demo

Image:
screenshot of the scene

Author: Kilinich

Group: Default

Filesize: 1.94 kB

Date added: 2010-01-17

Rating: 6.7

Downloads: 1308

Views: 1412

Comments: 7

Ratings: 5

Times favored: 0

Made with: Phun

Tags:
timer,
alarm,
event

Scene tag

This is event handling toolkit demo (phun/algodoo).
Run sim and watch! In the beginning - there is no object on scene.

source on forum

To make another events by yourself just call (type in console or on collision) one of functions:

To make a timer:
scene.my.newTimer(countdown, {{action}}, repeat);
for example: scene.my.newTimer(1, {{sim.running = false}}, true) will stop simulation every second.

To make an alarm:
scene.my.newAlarm(time, {{action}});
for example: scene.my.newAlarm(10, {{scene.camera.pan = [0,0]}}) will move focus to 0,0 at 10 second of sim.

To make custom event:
scene.my.newEvent(time, countdown, count, {{action}});
for example: scene.my.newEvent(7, 1, 10, {{scene.addCircle({pos=[0,0]})}}) will spawn 10 circles one by one every 1 sec after 7 sec sim time.
Last edited at 2010/06/04 19:26:51 by Kilinich
Please log in to rate this scene
edit
Similar scenes
Title: When did making a timer become so easy?
Rating: 5
Filesize: 3.15 kB
Downloads: 606
Comments: 0
Ratings: 1
Date added: 2020/10/21 02:41:25
Made with: Algodoo v2.1.0
Rating: rated 5
download
Title: New Algicosathlon Event 4
Rating: 5
Filesize: 91.59 kB
Downloads: 987
Comments: 1
Ratings: 1
Date added: 2016/07/09 17:13:45
Made with: Algodoo v2.1.0
Rating: rated 5
download
Title: Gear clock with sweep movement AND alarm this time
Rating: 5
Filesize: 359.78 kB
Downloads: 1260
Comments: 0
Ratings: 1
Date added: 2018/09/27 03:12:47
Made with: Algodoo v2.1.0
Rating: rated 5
download
Title: Algicosathlon Day 4 part 1
Rating: 5
Filesize: 36.88 kB
Downloads: 886
Comments: 0
Ratings: 1
Date added: 2016/12/29 17:31:33
Made with: Algodoo v2.1.0
Rating: rated 5
download
Title: RTTB Demo Event
Rating: 5
Filesize: 28.69 kB
Downloads: 953
Comments: 1
Ratings: 1
Date added: 2023/08/24 03:55:31
Made with: Algodoo v2.1.0
Rating: rated 5
download
Title: Algotriagicosathlon Event 1
Rating: 5
Filesize: 55.36 kB
Downloads: 1891
Comments: 20
Ratings: 1
Date added: 2015/01/18 23:14:35
Made with: Algodoo v2.1.0
Rating: rated 5
download
как всегда десяточку мастеру фана и алгуду)))
Да было бы за что - я не придумал пока как эти таймеры красиво показать;)
dette er som å gå på skole, det er kjedelig:|
ЗА ИДЕЮ!:tup:
You should use Scene.camera.pan to center the screen at the start. That way you can see the circles spawning without having to adjust the camera. Just a nice touch ;)
Last edited at 2010/01/19 19:21:47 by Paradigm 29
如何選擇週一大小的圓,木箱等?
:bonk: chinese