[solved] Mirroring a laser in onHitByLaser
3 posts • Page 1 of 1
[solved] Mirroring a laser in onHitByLaser
Hi, I'm new to using Algodoo and I'm trying to use lasers to simulate key presses without using key bindings. I have a few lasers with different sises (the differences are very small) and they are neutrally pointing away from a box shape. Each laser has a mirror key, and so when the key is pressed, the laser is mirrored and it points toward the box shape. In the box shape onHitByLaser event I check to see what size the laser is and add a certain alpha character based on that size. But this adds alot of characters at the same time because I press the key for too long. I want to be able to mirror the laser back after I add just one character so and disable the key until that key is released.
I want to know if it is possible to mirror the laser with Thyme and if I can disable it's key until that key is released.
I want to know if it is possible to mirror the laser with Thyme and if I can disable it's key until that key is released.
Last edited by Brother156 on Sun Apr 03, 2011 10:40 pm, edited 1 time in total.
- Brother156
- Posts: 2
- Joined: Sun Apr 03, 2011 9:12 pm
Re: Mirroring a laser in onHitByLaser
Brother156 wrote:I want to know if it is possible to mirror the laser with Thyme and if I can disable it's key until that key is released.
Why mirroring? You can just use laser activation key.
And here it is example of single key-down/key-up event:
Run, press enter few times, look into console.
It's not very simple but it should do the trick - just replace box onCollide code to similar with your needs.
Dream of Algodoo as game development engine...
-

Kilinich - [Best bug reporter 2010]
- Posts: 2098
- Joined: Mon Aug 31, 2009 8:27 pm
- Location: South Russia
Re: Mirroring a laser in onHitByLaser
Thanks for the reply! 
But it wasn't quite what I was looking for.
I found a laser logic example that shows how to use blips to turn off laser flow after a certain amount of time.
But thank's anyway, I'll be using that events example in another project though
But it wasn't quite what I was looking for.
I found a laser logic example that shows how to use blips to turn off laser flow after a certain amount of time.
But thank's anyway, I'll be using that events example in another project though
- Brother156
- Posts: 2
- Joined: Sun Apr 03, 2011 9:12 pm
3 posts • Page 1 of 1
Who is online
Users browsing this forum: No registered users and 2 guests




