Sleek Item Popup

Discussion in 'RGSS3 Scripts (RMVX Ace)' started by Vlue, Oct 1, 2012.

    Tags:
  1. Vlue

    Vlue Talent Extraordinaire Member

    Messages:
    589
    Likes Received:
    375
    Location:
    Canada
    First Language:
    English
    Sleek Item Popup v1.0
    by V.M.


    Introduction
    Quick event script command you ca use to popup the name and icon of an item you obtain in a nicer format then the message window.

    Screenshots

    [​IMG]
    How to Use
    Plug and play.
    popup(type,item,amount,duration) withing event script boxes
    Details within script

    Script
    Convenient pastebin... here!

    FAQ
    None yet!

    Credit and Thanks
    - By V.M.
    - Free to use in any non-commercial or commercial project

    Author's Notes
    I'm not too fond of tea...
     
    Last edited by a moderator: Aug 29, 2013
    #1
  2. ReconVirus

    ReconVirus Veteran Veteran

    Messages:
    54
    Likes Received:
    1
    Thank you so much for this awesome script!

    But i do notice a slight lag when the popup happens. And the popop itself doesnt stay up very long when its fully loaded on the screen

    (I change the duration, but it seems its how long it takes to load up )
     
    #2
    Vlue likes this.
  3. Vlue

    Vlue Talent Extraordinaire Member

    Messages:
    589
    Likes Received:
    375
    Location:
    Canada
    First Language:
    English
    Hmm, I'm not sure about the lag yet, but as for duration not working as intended, that's different now. Pastebin has been updated
     
    #3
  4. FenixFyreX

    FenixFyreX Fire Deity Veteran

    Messages:
    434
    Likes Received:
    307
    Location:
    A Volcano Somewhere
    First Language:
    English
    The lag is most likely due to you never disposing of each popup window. In your scene update alias, you never call $popup_window.dispose, thus all the window objects stay in memory. Either change it, or make the window reusable, i.e:

    $popup_window.popup(blah, arg2, bluh)
     
    #4
  5. Vlue

    Vlue Talent Extraordinaire Member

    Messages:
    589
    Likes Received:
    375
    Location:
    Canada
    First Language:
    English
    Hmm, so you're telling me that setting the variable to nil does not free up all memory objects?
     
    #5
  6. FenixFyreX

    FenixFyreX Fire Deity Veteran

    Messages:
    434
    Likes Received:
    307
    Location:
    A Volcano Somewhere
    First Language:
    English
    Nope, you need to call #dispose on the window and then set it to nil &/or a new window

    Code:
    #change this:
    # $popupwindow = nil if $popupwindow.opacity < 0
    #to this:
    if $popupwindow.opacity < 0
    $popupwindow.dispose
    $popupwindow = nil
    end
    -OR-

    Keep the same window and just change its contents per popup.

    Code:
    #change this:
    # $popupwindow = Item_Popup.new(data,amount,duration,nosound)
    #to this:
    $popupwindow ||= Item_Popup.new
    $popupwindow.pop(data,amount,duration,nosound)
     
    Last edited by a moderator: Oct 5, 2012
    #6
  7. KyleRiley

    KyleRiley Veteran Veteran

    Messages:
    31
    Likes Received:
    6
    Location:
    Nova Scotia, Canada
    First Language:
    English (CAN)
    I really like this script so I was attempting to use it but... I'm us'ng Yanfly Menu and I keep getting an error for line 103 when ever I tried to open my menu before grabbing an item. After I get an item and the "item get" popup occurs I'm allowed to open my menu just fine. I'm not so good with scripts but I took out the lines:



    Code:
     def pre_terminate
    	popup_preterminate
    	$popupwindow.visible = false
    end
    These are lines 101-104 and it doesn't give me the error anymore. I have no idea if I screwed something up but I'm just letting you know. It's a very nice script and I would love to use it, but I don't want to go in and change it on you or anything. I'll just wait and see if you fix it, okay? xP
     
    Last edited by a moderator: Oct 5, 2012
    #7
  8. Vlue

    Vlue Talent Extraordinaire Member

    Messages:
    589
    Likes Received:
    375
    Location:
    Canada
    First Language:
    English
    -OR-

    Keep the same window and just change its contents per popup.

    Code:
    #change this:
    # $popupwindow = Item_Popup.new(data,amount,duration,nosound)
    #to this:
    $popupwindow ||= Item_Popup.new
    $popupwindow.pop(data,amount,duration,nosound)
    Well, that could add up to quite a leak. Good to know, thanks.

    That would have been a problem just with my script alone. I've updated the pastebin to fix that.
     
    #8
  9. KyleRiley

    KyleRiley Veteran Veteran

    Messages:
    31
    Likes Received:
    6
    Location:
    Nova Scotia, Canada
    First Language:
    English (CAN)
    Oh, really? Awesome! I really like this script. :3
     
    #9
    Vlue likes this.
  10. ShinGamix

    ShinGamix DS Style 4Ever! Veteran

    Messages:
    3,906
    Likes Received:
    448
    Location:
    Alien Ship
    First Language:
    April Fools
    Primarily Uses:
    N/A
    your pastebin file isnt working for me.
     
    #10
  11. Vlue

    Vlue Talent Extraordinaire Member

    Messages:
    589
    Likes Received:
    375
    Location:
    Canada
    First Language:
    English
    If it's not copying right, you can just hit download up near the top left to get it in a text file.
     
    #11
    ShinGamix likes this.
  12. ShinGamix

    ShinGamix DS Style 4Ever! Veteran

    Messages:
    3,906
    Likes Received:
    448
    Location:
    Alien Ship
    First Language:
    April Fools
    Primarily Uses:
    N/A
    my little brother actually had the script so i got it off him.

    How can you make gold popup?
     
    #12
  13. Vlue

    Vlue Talent Extraordinaire Member

    Messages:
    589
    Likes Received:
    375
    Location:
    Canada
    First Language:
    English
    You cheat by making a fake item with the gold icon and name and call the popup manually whenever you add gold, like i used item 40 so the script call would be for when adding 100 gold:

    popup(0,40,100)
     
    #13
    ShinGamix likes this.
  14. ShinGamix

    ShinGamix DS Style 4Ever! Veteran

    Messages:
    3,906
    Likes Received:
    448
    Location:
    Alien Ship
    First Language:
    April Fools
    Primarily Uses:
    N/A
    My little brother and me figured that out but I was hoping that was not the real it was done but it does work. thanks Vlue!
     
    #14
  15. Acezon

    Acezon Om Nom Nom Veteran

    Messages:
    131
    Likes Received:
    25
    Location:
    Philippines
    First Language:
    English
    Primarily Uses:
    N/A
    I'm having an issue when it comes to multiple items: the display overlaps even though I made a wait statement in the event and adjusted the script's timing. Any ideas?

    EDIT:

    Also, can you make an add-on where it can be displayed even when the player is moving? It's kind of boring waiting for all items to display :D
     
    Last edited by a moderator: Dec 26, 2012
    #15
  16. Vlue

    Vlue Talent Extraordinaire Member

    Messages:
    589
    Likes Received:
    375
    Location:
    Canada
    First Language:
    English
    Any ideas... any ideas... Hmm... Ah, oh I know!

    Just updated the script so it queues popups together, so they won't overlap if spammed and yes, if you want, you can move around with them going.

    Report any bugs!
     
    #16
  17. Acezon

    Acezon Om Nom Nom Veteran

    Messages:
    131
    Likes Received:
    25
    Location:
    Philippines
    First Language:
    English
    Primarily Uses:
    N/A
    Wow, this update is great! Now, I can just use the Change Items command without calling the script! Thanks! :rock-left: :D :rock-right:
     
    #17
    Vlue likes this.
  18. Bob Saget

    Bob Saget Veteran Veteran

    Messages:
    66
    Likes Received:
    2
    First Language:
    English
    Nicely done! This is a fine script - I love how you accept members advice, and use it to your advantage when updating your scripts.

    I can promise you, it really does make a difference!
     
    #18
    Vlue likes this.
  19. JohnnyR

    JohnnyR Dungeon Master Restaff

    Messages:
    275
    Likes Received:
    135
    Location:
    My very own private hell!
    First Language:
    English
    Primarily Uses:
    RMMV
    Vlue, seriously man, anybody can create an amazing game just by using your scripts. They don't need monsters, actors, nothing but your scripts! Great job, made my stupid game look waaay better now, thanks for that!  :D
     
    #19
    Vlue likes this.
  20. smeros

    smeros Villager Member

    Messages:
    15
    Likes Received:
    3
    Location:
    Istanbul
    First Language:
    Turkish
    Primarily Uses:
    RMMV
    I love this script. You really did a good job.
     
    #20
    Vlue likes this.

Share This Page