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

Views: 276

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: 315
Comments: 7
Ratings: 2
Date added: 2016/11/10 07:52:33
Made with: Algodoo v2.1.0
Rating: rated 5.6
download
Title: New Algicosathlon Event 4
Rating: 5
Filesize: 91.59 kB
Downloads: 589
Comments: 1
Ratings: 1
Date added: 2016/07/09 17:13:45
Made with: Algodoo v2.1.0
Rating: rated 5
download
Title: Algicosalthon Season 3 Day 2
Rating: 5
Filesize: 0.72 MB
Downloads: 558
Comments: 1
Ratings: 1
Date added: 2019/02/03 17:53:55
Made with: Algodoo v2.1.0
Rating: rated 5
download
Title: Marbleicosathlon Day 1
Rating: 5
Filesize: 13.94 kB
Downloads: 398
Comments: 5
Ratings: 1
Date added: 2015/06/07 15:32:11
Made with: Algodoo v2.1.0
Rating: rated 5
download
Title: Algicosathlon Day 4 part 1
Rating: 5
Filesize: 36.88 kB
Downloads: 539
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: 330
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: 315
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.