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

Views: 831

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: 99.23 kB
Downloads: 437
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: 409
Comments: 0
Ratings: 1
Date added: 2017/05/16 13:59:53
Made with: Algodoo v2.1.0
Rating: rated 5
download
Title: Algicosathlon Day 4 part 1
Rating: 5
Filesize: 36.88 kB
Downloads: 323
Comments: 0
Ratings: 1
Date added: 2016/12/29 17:31:33
Made with: Algodoo v2.1.0
Rating: rated 5
download
Title: onStopHitByLaser event
Rating: 5.625
Filesize: 32.05 kB
Downloads: 873
Comments: 1
Ratings: 2
Date added: 2014/12/04 10:41:38
Made with: Algodoo v2.1.0
Rating: rated 5.6
download
Title: Rock Cheese Cup Bracket (rules in description!)
Rating: 5
Filesize: 204.96 kB
Downloads: 86
Comments: 5
Ratings: 1
Date added: 2016/02/20 13:02:31
Made with: Algodoo v2.1.0
Rating: rated 5
download
Title: Marbleicosathlon Day 1
Rating: 5
Filesize: 13.94 kB
Downloads: 351
Comments: 5
Ratings: 1
Date added: 2015/06/07 15:32:11
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