![]() |
Mirror
Since testbed back I'm trying to make some new stuff and thought I could try to make a mirror but I no idea on how I would make the tiles show on the mirror. The only way I could think of is to make a screenshot of a specific spot of where I want a mirror.
I thought I would ask here if anyone has any idea how to do this. I just seem to stuck on the tile issue. I sorta have an idea on how to show the player in the mirror with showani possibly but want to get the hard things out of the way first. |
just use a npc that mimics the players gani and look.
|
Get the tile data: this.level.tiles[tx, ty]
Use these functions: PHP Code:
Just make your mirror image dimensions match the tiles so you don't have to do any clipping. |
Quote:
edit: I got everything to work but just looks weird to me. Only problem I have is only yourself will show on mirror and when you swing your sword the gani doesn't play fully. https://gyazo.com/9e7307948b06d80594ae8893710f22fe.png |
Do a check so you aren't updating the ani every time your script times out.
e.g. if (ani != player.ani) ani = player.ani; |
Quote:
I Still got one or two small problems but I'll try to figure it out on my own. |
I'd suggest drawing a black polygon or something at the bottom of the mirror to visually separate it from the ground.
|
1 Attachment(s)
Quote:
this is how it came out. https://gyazo.com/83ff9af9cf515ed0c55cf38a089b7fa7.png Also for gani not showing fully you could do this also PHP Code:
|
Include a video or gif! Looks good!
|
Really cool guys!
|
I had to do it this way for the players on Era-
HTML Code:
function onTimeout() { |
oops I never posted the code :o
been a while since I made it so I decided to rewrite it just now to shorten it up. Only problem is that it only shows your character PHP Code:
|
Quote:
PHP Code:
|
Kirko I'm amazed by you, you have come a long way my friend.
|
Quote:
Quote:
|
| All times are GMT +2. The time now is 11:52 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.