Laser Hit Counter
			11 posts			 • Page 1 of 1		
	
Laser Hit Counter
I've been looking for a laser hit counter. Something that would register and display a number every time it gets hit by a laser.  ( ex. Count up - 1, 2, 3, 4, 5.. etc. )
If that can be done, I'm also curious of a way to do the same thing, but have it give a count of cycles per minute and/or second. ( EX. Find frequency of a laser pulse which is being flashed on and off every second to get 30Hz or something similar. )
I've searched the forums and found nothing myself, if there is a topic with such information then I apologize for this post, but would request a link to the topic.
			
		If that can be done, I'm also curious of a way to do the same thing, but have it give a count of cycles per minute and/or second. ( EX. Find frequency of a laser pulse which is being flashed on and off every second to get 30Hz or something similar. )
I've searched the forums and found nothing myself, if there is a topic with such information then I apologize for this post, but would request a link to the topic.
- 
				 
 ImaPirate
- Posts: 65
- Joined: Mon Oct 12, 2009 6:24 pm
Re: Laser Hit Counter
Is this what ur looking for. 
1. Create a custom variable like scene.my.count = 0 and put that into the console (f11 or ~ key)
2.Press enter
3. Go into the script menu of the laser and type
Hope that helped
			
		1. Create a custom variable like scene.my.count = 0 and put that into the console (f11 or ~ key)
2.Press enter
3. Go into the script menu of the laser and type
- Code: Select all
- scene.my.count = scene.my.count + 1
Hope that helped
- 
				 
 niffirg1
- Posts: 376
- Joined: Mon Aug 31, 2009 10:31 pm
- Location: The Great American South!
Re: Laser Hit Counter
Adding to niff, to display the count  in the scripting menu in "Text" Type 
{""+ Scene.my.count} And this will display the current number adjust the text size and color in the appearance menu.
			
		{""+ Scene.my.count} And this will display the current number adjust the text size and color in the appearance menu.
- 
				 
 Mystery
- Posts: 2802
- Joined: Thu Sep 03, 2009 1:16 pm
- Location: Southern Australia
Re: Laser Hit Counter
Paradigm made a video tutorial for it. It's very basic so it's perfect for beginners.
It works with OnCollide but it's the same pricipe for OnLaserHit and for OnHitByLaser
If you want I can make a laser counter and a frequency detector
Btw:
I tested it and normally I get a laser hit frequency of 56Hz so if I make the laser pulsating at half speed, I get nearly 30Hz
							It works with OnCollide but it's the same pricipe for OnLaserHit and for OnHitByLaser
If you want I can make a laser counter and a frequency detector
Btw:
I tested it and normally I get a laser hit frequency of 56Hz so if I make the laser pulsating at half speed, I get nearly 30Hz
Last edited by KarateBrot on Wed Oct 14, 2009 9:05 pm, edited 1 time in total.									
			
- 
				 
 KarateBrot
- Posts: 825
- Joined: Mon Aug 31, 2009 7:32 pm
- Location: Germany
Re: Laser Hit Counter
But what if he wants the laser to count only once when its hit by a laser, even if continously shot at?
  for that I'd maybe do some mechanics... thymed propably..
  for that I'd maybe do some mechanics... thymed propably..
			 for that I'd maybe do some mechanics... thymed propably..
  for that I'd maybe do some mechanics... thymed propably..If you have a question, have a dollar and call somebody that cares.
No really just PM me if you have a problem
		No really just PM me if you have a problem

- 
				 
 Sniperkasa
- Posts: 493
- Joined: Tue Sep 01, 2009 5:34 pm
- Location: The bottom of a lake.
Re: Laser Hit Counter
Ive managed to make a counter that shows the total amount, and it works good, but I didn't anticipate it counting the 56 hits per second or so. In other words, the number jumps up by large increments.
I don't know how to word this question exactly.. but does anybody know how to "soften" out the reading? As in make it see a more constant stream of light. So a person could connect the light and have it stay there only to have it register as one ( rather than 200 ), and then disconnect and reconnect it to have it register as two, etc.
KarateBrot, If you'd be willing to make a counter and frequency detector, that would be greatly appreciated. Either way, I learn something.
Edit: How might I reset the value, via a command or line of script?
			
		I don't know how to word this question exactly.. but does anybody know how to "soften" out the reading? As in make it see a more constant stream of light. So a person could connect the light and have it stay there only to have it register as one ( rather than 200 ), and then disconnect and reconnect it to have it register as two, etc.
KarateBrot, If you'd be willing to make a counter and frequency detector, that would be greatly appreciated. Either way, I learn something.

Edit: How might I reset the value, via a command or line of script?
- 
				 
 ImaPirate
- Posts: 65
- Joined: Mon Oct 12, 2009 6:24 pm
Re: Laser Hit Counter
You can use my blips gates in my laser logic gate scene to get only one reading of an incoming laser.
			
		- 
				 
 Conundrumer
- Posts: 344
- Joined: Mon Aug 31, 2009 5:55 pm
- Location: NYC
Re: Laser Hit Counter
Conundrumer wrote:You can use my blips gates in my laser logic gate scene to get only one reading of an incoming laser.
 Those do exactly what I want, and I must say, your laser works are quite stunning. I'm amazed. ^_^
 Those do exactly what I want, and I must say, your laser works are quite stunning. I'm amazed. ^_^- 
				 
 ImaPirate
- Posts: 65
- Joined: Mon Oct 12, 2009 6:24 pm
Re: Laser Hit Counter
Oh, that's what you wanted   
 
So do you still want a frequency detector or is everything alright now with Conundrumer's scene?
			 
 So do you still want a frequency detector or is everything alright now with Conundrumer's scene?

- 
				 
 KarateBrot
- Posts: 825
- Joined: Mon Aug 31, 2009 7:32 pm
- Location: Germany
Re: Laser Hit Counter
A frequency counter would be greatly appreciated. ^_^ If you want too.  
I can learn from the scene.
			
		I can learn from the scene.
- 
				 
 ImaPirate
- Posts: 65
- Joined: Mon Oct 12, 2009 6:24 pm
			11 posts			 • Page 1 of 1		
	Who is online
Users browsing this forum: No registered users and 5 guests




 
			



