[SOLVED] Yanfly Common Picture Events- Transparency issue

Discussion in 'Javascript/Plugin Support' started by fightingferrets, Aug 22, 2019.

Thread Status:
Not open for further replies.
  1. fightingferrets

    fightingferrets Villager Member

    Messages:
    6
    Likes Received:
    3
    First Language:
    English
    Primarily Uses:
    RMMV
    Hello everyone! I've been a lurker for a while and am amazed at all the knowledgeable, helpful people on the forums. I hope my problem isn't a silly one.

    I'm having an issue with Yanfly's Picture Common Events.

    1. I show picture with a transparent background on the screen, no problem.
    2. I create a common event to show text, no problem.
    3. I use Yanfly's Common Picture Events to trigger the common event, no problem.
    4. The issue is that the entire picture is a clickable trigger, including the transparent area. Since the shapes I'm making clickable triggers are oddly shaped, they all have some amount of transparent background.

    Is there a way to make it so that only the visible parts of the displayed picture are triggers?

    Thank you guys so much, I truly appreciate all the hard work in the forums.
     
    #1
  2. Hyouryuu-Na

    Hyouryuu-Na Poker-faced girl who is on a break Veteran

    Messages:
    349
    Likes Received:
    661
    Location:
    Lazyland!
    First Language:
    Bangla/Bengali
    Primarily Uses:
    RMMV
    Maybe you can take a look at this extension to the Yanfly's Pictyre Common Events plugin by Caethyril
    Apparently it can check if clicked pixel is transparent or not. Make a conditional branch (in the common event) and check if it's transparent. If transparent, do nothing. If not, then show text
     
    #2
    caethyril and fightingferrets like this.
  3. fightingferrets

    fightingferrets Villager Member

    Messages:
    6
    Likes Received:
    3
    First Language:
    English
    Primarily Uses:
    RMMV
    Woah, thanks so much! I'll give this is a try and update the thread. I really appreciate you taking the time.
     
    #3
    Hyouryuu-Na likes this.
  4. Hyouryuu-Na

    Hyouryuu-Na Poker-faced girl who is on a break Veteran

    Messages:
    349
    Likes Received:
    661
    Location:
    Lazyland!
    First Language:
    Bangla/Bengali
    Primarily Uses:
    RMMV
    Oh I misunderstood that extension :| It's plug and play. You don't have to do anything as it checks for you, I think.
     
    #4
  5. fightingferrets

    fightingferrets Villager Member

    Messages:
    6
    Likes Received:
    3
    First Language:
    English
    Primarily Uses:
    RMMV
    It absolutely worked! It was just as easy as putting the plugin after Yanfly's. Thanks a ton dude!
    For reference, the player can now click just the visible pixels of the doors to go to the next area in the dungeon. clickthru.png
     
    #5
    caethyril and Hyouryuu-Na like this.
  6. slimmmeiske2

    slimmmeiske2 Little Red Riding Hood Moderator

    Messages:
    5,685
    Likes Received:
    4,162
    Location:
    Belgium
    First Language:
    Dutch
    Primarily Uses:
    RMXP

    This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

     
    #6
Thread Status:
Not open for further replies.

Share This Page