Mirror effect

Started by Skio, Mon 24/05/2004 21:31:49

Previous topic - Next topic

Skio

I have recently tried to figure out a way to create a reflection of the character on a mirror. I used a 2nd character (MIR) with flipped frames and placed him in a walkable area behind the mirror (covering the walls with walk behinds.
In the Repeatedly Execute interaction of the room I write:

MoveCharacter (MIR, character[player].x, 220-character[player].y); 

hoping that the mirror image will follow my character. However when the player moves, MIR starts his walking animation but doesn't move at all. Actually, he moves only when I pause the game by calling the GUI (I have been using a GUI that pops-up with RIGHTCLICK).

I suspect that the script just doesn't refresh the x & y coords of the player.

Any ideas?

                        Thanks
Î'νδρων Επιφανων Πασα Î"η ΤαφοÏ,

Damien

#1

Scorpiorus

#2
Yeah, that's because calling MoveCharacter repeatedly would restart his walking each game loop and thus won't allow to move.

Here two links:

http://www.adventuregamestudio.co.uk/yabb/index.php?topic=9750.0
http://www.adventuregamestudio.co.uk/yabb/index.php?topic=7022.0

The idea, basically, is the same. You adjust reflection's x, y, loop and frame variables in repeatedly_execute.

A good example how actually read-only variables can be written into to get the effect you want.


strazer

You might want to use the new repeatedly_execute_always, so the mirror character gets updated even when the game is blocked (talking etc.).

SMF spam blocked by CleanTalk