mirror mirror on the wall

Started by Sam., Sun 16/11/2003 16:11:15

Previous topic - Next topic

Sam.

okay, heres the deal. i asked creed malay about his cool mirror effect on apocolypse meow in the RON sereis. i needed a similar thing for y game but he couldn't really help cos he didn't make it. could any other artsy farstsy person inform me on how to do it? (if u don't know what i mean llook at the bathroom scene) it would be in the same room and everything in davy's house just a different character.
can anyone help a poor lad in distress?
Bye bye thankyou I love you.

MrColossal

try making a new walkable area behind the mirror and adding a walkbehind area over everything in that area but the mirror so the mirror acts as a hole, ya know?

then make a new character that is exactly like the one you want to reflect so you'll have EGO and then like EGOMIRROR

place EGOMIRROR on the walkable area behind the mirror then move him to the players coordinates except subtract 50 from the x value so he is always 50 pixels above the main character

50 is just a random number i picked out of my butt, experimenting will help

so you could either add to the on_click event or the rooms repeatedly execute something like

MoveCharacter(EGOMIRROR, character[EGO].x-50,character[EGO].y,0);

if i'm not totally retarded this should work

the reason i'd add it to the on click even is cause then you don't have to run a check to see if EGO is moving or not

so i'd have:

function on_mouse_click(int button) {

 if (button==LEFT) {
   ProcessClick(mouse.x, mouse.y, GetCursorMode() );
 }
 else {   // right-click, so cycle cursor
   SetNextCursorMode();
 }

 if ((button==LEFT) && (player[EGO].room==theroomwiththemirro)){
   MoveCharacter(EGOMIRROR, character[EGO].x-50,character[EGO].y,0);
 }
}


i hope i know what i'm talking about...

eric
"This must be a good time to live in, since Eric bothers to stay here at all"-CJ also: ACHTUNG FRANZ!

Jodo Kast

Thanks Eric!

Saving this one... Quick question:  Is there a way to put a coating on the mirror?  So it shows a reflection of EGO?

I was thinking of darkening EGO, but not sure about stuff like mirror scratches or distortion.  Thanks for your help!

Quintaros

You could use a semi-transparent object with the mirror imperfections on it.

Sam.

okay, that obviously means something to someone. but not to me. this might sound alot to ask but could you make me a sample room or something? i am no good with script. i just break things.
Bye bye thankyou I love you.

Timosity

I have another code for a mirror that SSH helped me with, which is different to Eric's as it allows you to move closer and further from the mirror and not always stay the same distance away.

Have the two characters in the room (The main character, and their reflection) with all the walkbehinds as Eric mentioned.

note: in this example LAZ is the character and LMI is the reflection.

------------------------------------------------------------------------------------

//at the top of room script

int mirrorbase=132; //this is the y value which will be inbetween the 2 characters.
int laz_dist_from_mirror;
int lmi_dist_from_mirror;
int scale=3; // you can experiment with this number depending on the size of room and character.


 // script for room: Repeatedly execute
character[LMI].x=character[GetPlayerCharacter()].x;

laz_dist_from_mirror=character[GetPlayerCharacter()].y-mirrorbase;
lmi_dist_from_mirror=laz_dist_from_mirror/scale;
character[LMI].y=mirrorbase-lmi_dist_from_mirror;


character[LMI].loop=character[GetPlayerCharacter()].loop;
character[LMI].frame=character[GetPlayerCharacter()].frame;

------------------------------------------------------------------------------

Then with the character in the mirror, set their view so that left and right are the same, but walking up should be down, and down should be up.

and if you want to get more technical, you can have it so in the mirror characters view, they walk with the opposite leg first in each direction to get the complete mirrored effect.

This works as a complete fully functioning mirror.

As for what Quintaros said, it could work: put an object on the screen where the mirror is (lets say it's object 1)

then in the room (before fadein)

SetObjectTransparency(1,90); // object 1 at 90% transparent (experiment with the number with 100 being totally transparent)

Note: I think tranparency only works in high colour games

Hope this helps.

~Tim

MrColossal

duh! that totally makes sense

i wasn't thinking and of course getting closer to the mirror would be totally awkward... i think i had my mind on like water reflections and not mirrors

and yes transparency only works in high colour games
"This must be a good time to live in, since Eric bothers to stay here at all"-CJ also: ACHTUNG FRANZ!

Kweepa

Still waiting for Purity of the Surf II

SMF spam blocked by CleanTalk