Sprite Reflection

Discussion in 'RGSS3 Scripts (RMVX Ace)' started by TDS, Mar 14, 2012.

    Tags:
  1. TDS

    TDS - T D S - Veteran

    Messages:
    361
    Likes Received:
    129
    First Language:
    English
    Sprite Reflection 1.4




    by TDS


    Introduction

    This script creates the effect of reflection on certain map tiles.

    Features

    - Set reflection tiles based on terrain.

    - Set Y offset of reflection based on terrain tag on the tile notes.

    - Set individual Y offset for character or events.

    - Turn reflection ON/OFF for the player, events and followers on the map.

    Screenshots

    How to Use

    Instructions are on the script.

    Demo

    http://dl.dropbox.co... Reflection.exe

    Script

    Script

    Credit and Thanks

    - TDS

    - Cozziekuns for his help with the clipping method.

    - voyager4383 for helping by reporting fatal bugs in the script.

    Author's Notes

    This script is meant to be used mostly with the default sprites and square water tiles. If people need more complex clipping and X offset I will add them in a later version.

    Restrictions

    Only for use in non-commercial games.
     
    Last edited by a moderator: Apr 28, 2012
    #1
  2. Panda

    Panda Level 15 Fluffy Bear Veteran

    Messages:
    296
    Likes Received:
    165
    Location:
    England
    First Language:
    English
    Primarily Uses:
    N/A
    I do like how the ghost doesn't have a reflection, nice little touch there. :)

    I'll test this out when Ace finally comes tomorrow.
     
    Last edited by a moderator: Mar 14, 2012
    #2
  3. Link

    Link Hero of Slime Veteran

    Messages:
    227
    Likes Received:
    11
    Location:
    United States of America
    First Language:
    English/Engrish
    Now all we need is a dynamic shadow generator.
     
    #3
  4. Dr.Yami

    Dr.Yami 。◕‿◕。 Developer

    Messages:
    994
    Likes Received:
    736
    Location:
    Finland
    First Language:
    Vietnamese
    Primarily Uses:
    Other
    Very sexy script <3 Nice one TDS <3
     
    #4
  5. Knightmare

    Knightmare Knight of the Night Veteran

    Messages:
    1,057
    Likes Received:
    107
    Location:
    Central USA
    First Language:
    English
    Primarily Uses:
    RMMV
    Oh this is very nice TDS thanks.
     
    #5
  6. TDS

    TDS - T D S - Veteran

    Messages:
    361
    Likes Received:
    129
    First Language:
    English
    Thank you all for the comments.

    I updated the script and added a way to turn the reflections ON/OFF for the characters on the map.
     
    #6
  7. Icenick

    Icenick Veteran Veteran

    Messages:
    158
    Likes Received:
    19
    First Language:
    English
    This doesnt work for me. I tried setting the water to terrain 1 or 2, and no reflections. I tried creating a parallel process event with the title [Reflect], nothing....

    What am I missing?
     
    #7
  8. TDS

    TDS - T D S - Veteran

    Messages:
    361
    Likes Received:
    129
    First Language:
    English
    You don't create a "Parallel" event to make it reflect, you add [Reflect] to the events you want to reflect.

    I added a demo to show people how it works, and updated the script.
     
    #8
  9. Icenick

    Icenick Veteran Veteran

    Messages:
    158
    Likes Received:
    19
    First Language:
    English
    No idea... The demo doesnt have the rpg maker file, just the game export. Plus theres no text in demo, I talked to a dog and the reflections stop... I dont know why however.
     
    #9
  10. TDS

    TDS - T D S - Veteran

    Messages:
    361
    Likes Received:
    129
    First Language:
    English
    That's weird, I downloaded it and it's not encrypted for me.

    As for the text, I made the demo on a hurry since I'm very busy at the moment. I'll make a better one soon.
     
    #10
  11. Icenick

    Icenick Veteran Veteran

    Messages:
    158
    Likes Received:
    19
    First Language:
    English
    Oh your right, re downloaded it and its not encrypted. Dunno what happened before.

    Well, I still cant get reflections in my game, I copied the events and script from demo, still nothing.
     
    Last edited by a moderator: Apr 18, 2012
    #11
  12. voyager4383

    voyager4383 Villager Member

    Messages:
    5
    Likes Received:
    0
    Location:
    Las Vegas, NV
    First Language:
    English
    Hi TDS!

    First off, I love the script. Thank you for making it and offering it for others to use! Reflections add that extra layer of realism that a lot of 8 bit RPG's didn't used to have in the past.

    Second...Of course, I am having an issue, lol.

    I am having an issue where reflections are all not turning on (Except for the Actors) when you transition to a new map. Returning to the starting map the reflections return. I tested to ensure this was happening by changing the game starting location to be on one of the maps that wasn't working, and reflections were back...although only for the starting map.

    I must be missing a critical but obvious part...a script call or something, but I am still too new to know better. ^_^

    Any help would be appreciated!
     
    #12
  13. TDS

    TDS - T D S - Veteran

    Messages:
    361
    Likes Received:
    129
    First Language:
    English
    Thank you for reporting the bug, and no you are not missing anything, it's a bug caused by something I forgot to add that was a change from RGSS2 to RGSS3 and the update of sprites in the map spriteset class.

    I've updated the script and it should work properly now.

    Let me know if you find any other bugs or problems.

    Have a nice day.
     
    #13
  14. Icenick

    Icenick Veteran Veteran

    Messages:
    158
    Likes Received:
    19
    First Language:
    English
    Mine still dont work at all, pretty much gave up. I set the terrain in the water to 1 or 2 and no reflections.
     
    #14
  15. voyager4383

    voyager4383 Villager Member

    Messages:
    5
    Likes Received:
    0
    Location:
    Las Vegas, NV
    First Language:
    English
    @ TDS: Thanks, that worked like a charm! The only thing I am noticing now is that when you are walking "North" or "South", your screen is scrolling with you as you walk as normal...the reflective events that are moving left or right have their reflections moving off the water instead of staying in place. The only way I can describe to reproduce it is to make an event like a dog, have it walk left and right, and play test walking north or south to the point where the map scrolls. You will see the "reflection" will not stay put where it originated. Meh, prob didn't describe it well...a pic would be better. If I can get one, I'll show you what I mean. (Added "Reflection moving.png" so you can hopefully see what I mean)

    @ Icenick: Did you make sure to go to Tools > Database > Tilesets. Then choose your tileset from the left that you plan to use, then go to "Notes" on the bottom right and input the code like so:

    S_REFLECT_OFFSET:

    1: 9

    2: 14

    E_REFLECT_OFFSET:

    From your previous posts you didn't mention that you did that step.

    Good luck! (Added that "RPG Maker Reflections.png" to show you where!)

    RPG Maker Reflections.png

    Reflection moving.png
     
    #15
  16. Icenick

    Icenick Veteran Veteran

    Messages:
    158
    Likes Received:
    19
    First Language:
    English
    Oh man, my mistake I thought you had to put the terrain number on the map itself... Thanks for clearing that up!
     
    #16
  17. TDS

    TDS - T D S - Veteran

    Messages:
    361
    Likes Received:
    129
    First Language:
    English
    Sorry for the delay.

    @voyager4383:

    Very strange bug, with an even stranger fix. Once again thank you for reporting the bug and if you find anything else let me know.

    @Icenick:

    I honestly have no idea why it's not working for you and sadly I do not have the time at the moment to figure it out.
     
    #17
  18. CRBeam

    CRBeam Villager Member

    Messages:
    27
    Likes Received:
    5
    Location:
    Reno, NV
    First Language:
    English
    I'm using a Script to change the screen resolution. I have it set at 640 x 416 to work better with my widescreen display, this causes the relfections to be off by about 1.5 tiles.

    It works perfect if the relolution is set to default, Is there a way to get it to work with the widescreen resolution?
     
    #18
  19. TDS

    TDS - T D S - Veteran

    Messages:
    361
    Likes Received:
    129
    First Language:
    English
    I tried to replicate the bug, but I was not able to.

    Is the script you're using to change the resolution below the reflection script? You could try to put the reflection script below it and see if that fixes it.

    If not, then could you please make a small demo with the problem?
     
    #19
  20. CRBeam

    CRBeam Villager Member

    Messages:
    27
    Likes Received:
    5
    Location:
    Reno, NV
    First Language:
    English
    #20

Share This Page