Mirror effects (Solved)

Started by Pilpoilplante, Sun 25/10/2009 22:53:41

Previous topic - Next topic

Pilpoilplante

Hi everybody!

I just want to know how to make mirror effects? I mean, I have a room with a mirror, and I want the player to see the reflection of the charcater when he moves near it. Can anybody help me, please?
Program today.
Enjoy tomorrow.

TerranRich

The reflection has to be another, identical character, and the mirror must be, in essence, a hole peeking through the other side, where the identical mirror character is. Then, have him follow. Look up the Follow() command in the manual. (I think that's what it's called.)
Status: Trying to come up with some ideas...

Pilpoilplante

Ok, thanks a lot, TerranRich!
I didin't knew you could do reflextions folloings in the Follow() command
Program today.
Enjoy tomorrow.

Khris

I do reflections by setting the mirror character's coords, loop and frame in the room's repeatedly_execute.

Like this:
Code: ags
  cMirror.x = player.x;
  int wall_y = 150;  // baseline of wall / mirror walk behind
  cMirror.y = wall_y - ((player.y-wall_y)*8)/10;
  cMirror.Frame = player.Frame;
  int l = player.Loop;
  if (l == 0 || l == 3) l = 3 - l;
  cMirror.Loop = l;

Pilpoilplante

Ok... I understand. Thanks!
Program today.
Enjoy tomorrow.

SMF spam blocked by CleanTalk