Browse Search Popular Register Upload Rules User list Login:
Search:
onLaserStop event

Image:
screenshot of the scene

Author: Xray

Group: Default

Filesize: 31.7 kB

Date added: 2014-12-03

Rating: 5

Downloads: 465

Views: 499

Comments: 6

Ratings: 1

Times favored: 0

Made with: Algodoo v2.1.0

Tags:

Scene tag

I got this idea from a scene that kilinich posted and then later removed. This scene operates a little differently than his did, but it produces the same result.

Normally, you can create script that will activate when the geometry gets hit by a laser beam. This function will activate a script when the laser beam STOPS hitting the geometry. Currently, a simple script changes the color of a box when the beam stops hitting it, but that script could be anything else that you desire.

This system is self-resetting. That is, after the laser stops hitting the geometry, it can hit it again, and then the script in onLaserStop will activate again when the laser beam stops hitting it.

UPDATE: Fixed bug that prevented scene from working at less than 0.5 simulation speed.
Last edited at 2014/12/06 06:41:28 by Xray
Please log in to rate this scene
edit
Similar scenes
Title: Laser Hit And Miss
Rating: 5.625
Filesize: 21.31 kB
Downloads: 430
Comments: 7
Ratings: 2
Date added: 2016/11/10 07:52:33
Made with: Algodoo v2.1.0
Rating: rated 5.6
download
Title: Algicosathlon Day 2
Rating: 5
Filesize: 45.92 kB
Downloads: 717
Comments: 0
Ratings: 1
Date added: 2016/12/28 12:44:00
Made with: Algodoo v2.1.0
Rating: rated 5
download
Title: Algicosathlon Day 6
Rating: 5
Filesize: 29.41 kB
Downloads: 668
Comments: 0
Ratings: 1
Date added: 2017/01/04 21:07:52
Made with: Algodoo v2.1.0
Rating: rated 5
download
Title: Algotriacontathlon Event 6
Rating: 5
Filesize: 45.96 kB
Downloads: 485
Comments: 0
Ratings: 1
Date added: 2016/11/19 03:34:04
Made with: Algodoo v2.1.0
Rating: rated 5
download
Title: Algicosathlon Day 4 part 1
Rating: 5
Filesize: 36.88 kB
Downloads: 773
Comments: 0
Ratings: 1
Date added: 2016/12/29 17:31:33
Made with: Algodoo v2.1.0
Rating: rated 5
download
Title: Superdecathlon Party Day 3
Rating: 5
Filesize: 1 MB
Downloads: 418
Comments: 3
Ratings: 1
Date added: 2015/08/11 16:41:44
Made with: Algodoo v2.1.0
Rating: rated 5
download
Responses to this scene
show list
Title: Laser Hit And Miss
Rating: 5.625
Filesize: 21.31 kB
Downloads: 430
Comments: 7
Ratings: 2
Date added: 2016/11/10 07:52:33
Made with: Algodoo v2.1.0
Rating: rated 5.6
download
That will not work on 0.1 time factor.
Yes, you are correct. I'll see if I can improve it.

Thanks


It's fixed.
Last edited at 2014/12/06 06:42:53 by Xray
This works very well. I tried to break it, but couldn't. I had some problems with my onNotHitByL­aser scene running at 10X sim speed, but have since fixed it. The source of my problem was that you can get multiple postStep events in between laser events.
Yeah, I've learned that for some types of scenes, timing is critical between "update" and "postStep", and even the laser functions, and can make the difference between a scene working or not working. In the case of this scene not working at < 0.5 sim speed, all I had to do was to move a few lines of code from update to postStep, and now it works as it's supposed to!
Not trying to offend, some of ur saves have misspelled words in them.
Not trying to offend, but "ur" is not a word.