Laser & mirrors

For questions about using Classic.

Post » Thu Jan 12, 2012 1:46 pm

Hi. Please, sorry my english. It's level is really low)
I'm making one logic game real long time. I was trying to use Game Maker, MMF, some other game-making programs, Visual Basic, Dark Basic and now - Construct 1.2. But i always have one problem, that i can not decide.
Please, look at this:

This system must works with any count of mirrors and mirrors positions.
Please, if anybody knows how it can be realized, give me example.
Need your help very very very much))
Vis2012-01-12 13:50:05
B
3
Posts: 4
Reputation: 333

Post » Thu Jan 12, 2012 4:46 pm

Hope this will help you :)

mirrorbeams.cap
Image
B
23
S
8
G
10
Posts: 1,820
Reputation: 8,242

Post » Thu Jan 12, 2012 5:16 pm

Thanks, but not so easy)

There are 2 lines in your example and 1 mirror. And if i want to add lines and mirrors, i must to add events in event-editor. It's not that i need.
I need the algorithm, which create the lines (laser rays) according to exist mirrors. Differently, if I will change mirrors count and their location but will not change anything in event-editor, the laser must work all the same.

I hope, my post doesn't look full nonsense))
Russian forum has fallen and now I regret that badly learnt English at school)
B
3
Posts: 4
Reputation: 333

Post » Thu Jan 12, 2012 5:24 pm

But everything is in there. Just adapt it to your project. For every mirror create an out-beam just like I did in the example, just keep track of the id.

Just enumerate the mirrors and out-beams and instead of my "Start of layout" event, use a trigger to create mirror and out beam.
And instead of just setting the mirror values, use a "for each mirror"-loop.
Image
B
23
S
8
G
10
Posts: 1,820
Reputation: 8,242

Post » Thu Jan 12, 2012 5:26 pm

Nice example, tulamide.
If your vision so exceeds your ability, then look to something closer.
Moderator
B
120
S
28
G
68
Posts: 4,847
Reputation: 48,295

Post » Thu Jan 12, 2012 5:42 pm

Yes, you are right. I have absolutely forgotten that only physics visibility is necessary to me, not physics. I think, it is necessary at least to try to work in this direction.
Unfortunately, it is fast at me difficult examination and while I cannot start to work over game.
I hope, your method will approach. Thanks once again!Vis2012-01-12 17:44:18
B
3
Posts: 4
Reputation: 333


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 0 guests