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

Views: 1270

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: New Algicosathlon Event 4
Rating: 5
Filesize: 91.59 kB
Downloads: 840
Comments: 1
Ratings: 1
Date added: 2016/07/09 17:13:45
Made with: Algodoo v2.1.0
Rating: rated 5
download
Title: Algotriacontathlon Day 1 (YT Only)
Rating: 5
Filesize: 100.87 kB
Downloads: 1369
Comments: 0
Ratings: 1
Date added: 2017/05/16 13:59:53
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: 1070
Comments: 0
Ratings: 1
Date added: 2018/09/27 03:12:47
Made with: Algodoo v2.1.0
Rating: rated 5
download
Title: Events II Demo
Rating: 6.1111
Filesize: 7.69 kB
Downloads: 964
Comments: 1
Ratings: 3
Date added: 2010/10/18 10:21:55
Made with: Algodoo before v1.8.5
Rating: rated 6.1
download
Title: Algotriagicosathlon Event 1
Rating: 5
Filesize: 55.36 kB
Downloads: 1745
Comments: 20
Ratings: 1
Date added: 2015/01/18 23:14:35
Made with: Algodoo v2.1.0
Rating: rated 5
download
Title: onStopHitByLaser event
Rating: 5.625
Filesize: 32.05 kB
Downloads: 1222
Comments: 1
Ratings: 2
Date added: 2014/12/04 10:41:38
Made with: Algodoo v2.1.0
Rating: rated 5.6
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