Pictures fixed to maps

Discussion in 'RGSS Script Requests' started by Andrea87Sky, Sep 11, 2019.

  1. Andrea87Sky

    Andrea87Sky Just a random musician/coder. Veteran

    Messages:
    81
    Likes Received:
    1
    Location:
    Sicily
    First Language:
    Italian
    Primarily Uses:
    RMXP
    Does anyone have a script for fixing pictures in maps? i mean, to have picture to not follow the player's camera.
     
    #1
  2. TheNewSon

    TheNewSon Veteran Veteran

    Messages:
    49
    Likes Received:
    83
    Location:
    Brazil
    First Language:
    Portuguese
    Primarily Uses:
    RMMV
    #2
    KK20 likes this.
  3. KK20

    KK20 Just some XP Scripter Veteran

    Messages:
    101
    Likes Received:
    41
    Location:
    Orange County, California
    First Language:
    English
    Primarily Uses:
    RMXP
    Ayyy beat me to it :)
     
    #3
    TheNewSon likes this.
  4. Andrea87Sky

    Andrea87Sky Just a random musician/coder. Veteran

    Messages:
    81
    Likes Received:
    1
    Location:
    Sicily
    First Language:
    Italian
    Primarily Uses:
    RMXP
    The script is nice but it strangely don't work how I wanted: I wanted to make some lightmasks to a city of my fangame when it's night (with a my common event system) and i wanted to show a picture on a specific event of the map:

    YqO51pf2St.png

    (The event is the one that I selected)

    0q6YxVuY9H.png

    Lightmask

    spr_tile_sanspapyrushouse_night.png

    The problem is that the picture don't show correctly:

    Instead of showing on this house

    Game_4sMKsXAVkL.png

    It shows it on the other side of the map.

    Game_8gSsF72wCC.png

    Maybe it's a problem because the map is giant? The map is 100x100, or maybe it's because of the spawn point? (it's near the house, check the second image.)
     
    #4
  5. callmedan

    callmedan Friendly Stranger Veteran

    Messages:
    562
    Likes Received:
    877
    Location:
    i'm behind you . . .
    First Language:
    Vietnamese
    Primarily Uses:
    RMXP
    @Andrea87Sky I don't think the script would cause a problem like that, just adjusting the picture's location.
     
    #5
  6. Andrea87Sky

    Andrea87Sky Just a random musician/coder. Veteran

    Messages:
    81
    Likes Received:
    1
    Location:
    Sicily
    First Language:
    Italian
    Primarily Uses:
    RMXP
    What? the picture location is alright, i tried to put the event away to put the picture in the house perfectly, but when the picture updates (like if you do show image again with the same coords and etc.) it just go to other parts of the map.
     
    #6
  7. Andrea87Sky

    Andrea87Sky Just a random musician/coder. Veteran

    Messages:
    81
    Likes Received:
    1
    Location:
    Sicily
    First Language:
    Italian
    Primarily Uses:
    RMXP
    Any solutions to this? Maybe I'm just stupid.
     
    #7
  8. callmedan

    callmedan Friendly Stranger Veteran

    Messages:
    562
    Likes Received:
    877
    Location:
    i'm behind you . . .
    First Language:
    Vietnamese
    Primarily Uses:
    RMXP
    Can you tell how you set up the coordinates or upload a project including only that map?
     
    #8
  9. Andrea87Sky

    Andrea87Sky Just a random musician/coder. Veteran

    Messages:
    81
    Likes Received:
    1
    Location:
    Sicily
    First Language:
    Italian
    Primarily Uses:
    RMXP
    Alright here it is: https://www.dropbox.com/s/w3knxmgiqv2hati/DELTATALE v.2.0.rar?dl=0

    Please don't steal anything on it, all the things in there are reserved only for my project.

    (Anyway yes I'm sorry but I forgot to add the script for locking the picture, I've removed it before, until the problem wasn't fixed, and i forgot to put it again, no i'm not talking about the script in the script editor, but the script calls.)
     
    Last edited: Sep 15, 2019
    #9
  10. callmedan

    callmedan Friendly Stranger Veteran

    Messages:
    562
    Likes Received:
    877
    Location:
    i'm behind you . . .
    First Language:
    Vietnamese
    Primarily Uses:
    RMXP
    @Andrea87Sky Well, I think you should set fixed coords for the picture instead of getting it from an event. I have no ideas why whenever the picture updated, it's sent to another place. Also I don't see a reason to get values from an event, because the house is stationary. It'd be helpful if you're creating light effects like flashlight/torch for player, but in this case it's not necessary.
     
    Last edited: Sep 16, 2019
    #10
  11. Roninator2

    Roninator2 Gamer Veteran

    Messages:
    1,741
    Likes Received:
    381
    Location:
    Canada
    First Language:
    English
    Primarily Uses:
    RMVXA
    It's used because it makes the calculation easier. Instead of playtesting to see if the exact coordinate is correct, game data can be used to assist. As long as the graphic is designed correctly.
    I won't. But you should have send that in a personal message. Now anyone can download and use your hard work with the scripts to make something similar.

    The issue is with your calculation. You are getting event nighthouse screen x & y coordinates. Which if you put a text message in with \v[57] you would have seen that it returns 320. That part I'm not sure about at the moment, but this number when you do a show picture converts that number to pixels. So 320 / 32 = 10. Hence your picture is shown 10 tiles in.
    What you should use is map x & y. if you did this with the text message \v[57] you would have gotten 50. take that and multiply by 32 and you get 1600. That is the starting position on your map for the house location (in pixels).
    upload_2019-9-15_10-41-28.png

    Also the loader is doing something because when try to delete the game folder, I can't as every font is being used by another program.
     
    #11
    callmedan likes this.
  12. Andrea87Sky

    Andrea87Sky Just a random musician/coder. Veteran

    Messages:
    81
    Likes Received:
    1
    Location:
    Sicily
    First Language:
    Italian
    Primarily Uses:
    RMXP
    Alright I will try it later then, and yes sorry, you can't delete it because i've created a special program to load the fonts, because some computers have problems on installing them or scripts have problem to access to the system's fonts folder, so i did that little program, for delete it just reload your computer or close that program (i think it's Launcher.exe) in background.
     
    #12

Share This Page