Image Reflection?

Ok, so I’ve been wondering. Is it possible to reflect a players image onto like a glass image with an NPC script on that glass? Because I think I saw something like this a while back on one of the original GraalOnline servers. So if it’s possible, can somebody get me on the right track?

Just have an NPC/image follow the player, only difference is, if the player looks up or down, NPC does the opposite.

Hm, can you get me started a little bit? I don’t think I have the right idea currently lol.

depends, do you just want the player’s head?

no, i want to reflect all of his attributes

K

//ImLazy
if(playerdir in {0,2}) this.dir=(playerdir + 2)%4; else this.dir = playerdir;
showani 300,playerx,30,this.dir,#m;
timeout=0.05;

Hm ok, so how would I make it stop working when the player reaches a certain point on the map? (Sorry, I can’t think right now, I have a migrane x_x) Sorry for being a newbie…

while (playerx in |30,35||){
  if(playerdir in {0,2}) this.dir=(playerdir + 2)%4; else this.dir = playerdir;
    showani 300,playerx,30,this.dir,#m;
  }
}

havnt tested but i see no reason it shudnt work

I see a few.
You forgot the portion where it hides out of range, plus while() is more of an instantaneous loop, if the player is within range it’ll complete it’s max loops on frame 1, if the player isn’t in range, it’ll never start.

Lol, it doesn’t seem to work, but I’ll get on that later. Thanks guys.

If you’re gonna do a mirror, make sure it doesn’t look like shit.

wow this is exactly what i was looking for (the script) if you don’t mind can i use it?
(ill give credit :D)

nice script Shiny, im sure all us noobies will benefit from analysing this script, thankyou so much for sharing :smiley:

I was going to have it reflect all players/npcs in the level but apparently that’s impossible because it can only display the looks of the NPC, which can only account for one look at a time. Oh well.

for (i=0;i<playercount;i++){
if (players[i].x in |#,#|)putnpc “shiniesmirrorscipt”;
}

then in the npc if the players x isnt in the range the npc destroys itself

just an idea, could work maybe…?

if (playerenters) {
  showcharacter;
  setcharprop #3,#3;
  setcharprop #2,#2;
  setcharprop #1,#1;
  setcharprop #C0,#C0;
  setcharprop #C1,#C1;
  setcharprop #C2,#C2;
  setcharprop #C3,#C3;
  setcharprop #C4,#C4;
  setcharprop #8,#8;
  showcharacter;
  timeout=.05;
}
if (timeout) {
  if (isleader){this.id=players[0].id;}

  if (this.id=players[0].id){

    showcharacter;
    setcharprop #3,#3;
    setcharprop #2,#2;
    setcharprop #1,#1;
    setcharprop #C0,#C0;
    setcharprop #C1,#C1;
    setcharprop #C2,#C2;
    setcharprop #C3,#C3;
    setcharprop #C4,#C4;
    setcharprop #8,#8;

    if (playery>y && playery<y+10 && playerx=>38 && playerx=<50) {
      show;
      x=playerx;}

    if (!playery>y || !playery<y+10 || !playerx=>38 || !playerx=<48.5) {
      hide;}

    if (playerdir=0) {
      dir=2;}

    if (playerdir=1) {
      dir=1;}

    if (playerdir=2) {
      dir=0;}

    if (playerdir=3) {
      dir=3;}

    if(playersprite<9||playersprite>13){
      sprite=playersprite;}
  }
  timeout=.05;timereverywhere;

}

USE THE FUCKING CODE TAG