Author Topic: [XP] Event Proximity Icons  (Read 21701 times)

Offline ForeverZer0

  • CP's Pedophile
  • Global Moderator
  • Guardian of Chaos
  • ****
  • Posts: 3247
  • LV: 294
  • Gender: Male
  • Remember you are unique, just like everyone else.
    • View Profile
[XP] Event Proximity Icons
« on: May 16, 2011, 08:29:57 AM »
Event Proximity Icons
Authors: ForeverZer0
Version: 1.4
Type: Event Add-On
Key Term: Misc Add-on

Introduction

This script will allow you to have various icons appear over events' heads when the player gets within a certain range of them, and the appropriate tag is found as a comment in their page.

Features

  • Easy to use
  • Can use any number of custom tags you want
  • Adjustable coordinates for icons
  • Adjustable cycle times for changing icons
  • Adjustable proximity before icons show
  • Icons transition in/out smoothly
  • Ability to have event simply glow when within range instead of use icons
  • Can customize the color and speed of the glow effect

Screenshots

(click to show/hide)
(click to show/hide)

Demo

Demo Link

Script

(click to show/hide)

Instructions

Place above "Main", and below default scripts.
Instructions are within the script.

Compatibility

Pixel movement scripts may cause issues, though I DID add compatibility for Blizz-ABS pixel-movement.

BlizzABS's ABSEAL will under certain circumstances not update events without graphics, which may include some of your proximity events, causing them not to work. To fix this issue, place the small script below anywhere below the BlizzABS scripts.
(click to show/hide)


Credits and Thanks

  • ForeverZer0, for the script
  • Zexion, for the idea and the request
  • Taiine, for her moral support adding Blizz-ABS compatibility ;)
  • Vexus, for helping track down the ABSEAL bug

Author's Notes

Please report any bugs/issues so that they can be resolved.
Enjoy!
« Last Edit: August 14, 2012, 08:53:35 PM by ForeverZer0 »
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

Offline Zexion

  • Addicted to LoL
  • Chaos User
  • ******
  • Posts: 1511
  • LV: 69
  • Gender: Male
  • My anaconda don't...jk it does
    • View Profile
Re: [XP] Event Proximity Icons
« Reply #1 on: May 16, 2011, 11:25:11 AM »
Wow thanks a lot for this :) gonna try it

Offline Melvin

  • Trained Member
  • *
  • Posts: 10
  • LV: 0
    • View Profile
Re: [XP] Event Proximity Icons
« Reply #2 on: May 16, 2011, 12:17:46 PM »
Lol! :D Good script!!

Offline G_G

  • Green Gmod Game_Guy AKA G4 AKA hyper-G AKA G-force
  • Global Moderator
  • Chaos Ultimate
  • ****
  • Posts: 6585
  • LV: 407
  • Gender: Male
    • View Profile
Re: [XP] Event Proximity Icons
« Reply #3 on: May 16, 2011, 02:31:23 PM »
Nice job F0!

Offline Jragyn

  • Ethereal Devastator
  • ****
  • Posts: 311
  • LV: 20
  • Gender: Male
  • A prodigy... maybe? Hoo hah.
    • View Profile
    • facenbooken.
Re: [XP] Event Proximity Icons
« Reply #4 on: May 16, 2011, 05:25:49 PM »
Instead of drawing an icon, could the sprite within the event just... glow or something? Or both.

Just an idea.
A bright light can either illuminate or blind, but how will you know which until you open your eyes?

Offline Zexion

  • Addicted to LoL
  • Chaos User
  • ******
  • Posts: 1511
  • LV: 69
  • Gender: Male
  • My anaconda don't...jk it does
    • View Profile
Re: [XP] Event Proximity Icons
« Reply #5 on: May 17, 2011, 07:34:46 AM »
I forgot to say that this script is not compatible with some of the other ones I have mainly blizz abs. It causes a wierd bug in my cutscenes like it leaves ghost pixels, ghost maps, and screen flashes linger. But if i take out blizz abs it works fine! Is there a way to make them compatible? I really like this script so I don't want to give up on it lol

Offline LiTTleDRAgo

  • Astral Trancist
  • *****
  • Posts: 841
  • LV: 514
  • Gender: Male
    • View Profile
    • ~
Re: [XP] Event Proximity Icons
« Reply #6 on: May 19, 2011, 03:05:05 AM »
Quote
class Spriteset_Map
 
  alias zer0_icon_dispose dispose
  def dispose
    # Dispose the icons when the map is disposed
    $game_map.events.each_value {|event| event.dispose_icons }
    zer0_icon_dispose  # Missing?
  end
end

Offline ForeverZer0

  • CP's Pedophile
  • Global Moderator
  • Guardian of Chaos
  • ****
  • Posts: 3247
  • LV: 294
  • Gender: Male
  • Remember you are unique, just like everyone else.
    • View Profile
Re: [XP] Event Proximity Icons
« Reply #7 on: May 19, 2011, 03:27:02 AM »
Fixing now, thanks for pointing it out.  :D

I'm actually changing the whole thing. I should have had all the actual processing in Sprite_Character to begin with, it will allow for a lot easier manipulation and more features.

Should have it up within the hour.


EDIT:

Updated to version 1.1
- Fixed the above mentioned bugs
- Added the "glow" option instead of using icons
- Totally restructured the script
« Last Edit: May 19, 2011, 07:09:32 AM by Baraka »
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

Offline PhoenixFire

  • Moderator
  • Astral Trancist
  • ***
  • Posts: 918
  • LV: 6
  • Gender: Female
  • ~That's an interesting notion, in it's own way~
    • View Profile
Re: [XP] Event Proximity Icons
« Reply #8 on: May 19, 2011, 06:14:07 PM »
I might be hijacking this script as well...      Maybe...

I haven't tested it out yet, but, I like the glowing concept. I might bother you about it later, but, for right now, I'm at work, so, no downloading to company computers  :facepalm:

Damn corporate rules :rulez:
Next off, how to create a first person shooter using microsoft excel.

<Remember when computers had turbo buttons?

Offline Shalaren

  • Ethereal Devastator
  • ****
  • Posts: 442
  • LV: 46
  • Gender: Male
  • Also known as DexKyle
    • View Profile
Re: [XP] Event Proximity Icons
« Reply #9 on: May 21, 2011, 04:24:24 AM »
error of something in line 162, undefined method, only happens with blizz-abs

Offline G_G

  • Green Gmod Game_Guy AKA G4 AKA hyper-G AKA G-force
  • Global Moderator
  • Chaos Ultimate
  • ****
  • Posts: 6585
  • LV: 407
  • Gender: Male
    • View Profile
Re: [XP] Event Proximity Icons
« Reply #10 on: May 21, 2011, 04:25:17 AM »
Did you place this below or above Blizz-ABS?

Offline Shalaren

  • Ethereal Devastator
  • ****
  • Posts: 442
  • LV: 46
  • Gender: Male
  • Also known as DexKyle
    • View Profile
Re: [XP] Event Proximity Icons
« Reply #11 on: May 21, 2011, 04:33:27 AM »
*facepalm*
I take my bug report back! Thanks g_g

Offline Zexion

  • Addicted to LoL
  • Chaos User
  • ******
  • Posts: 1511
  • LV: 69
  • Gender: Male
  • My anaconda don't...jk it does
    • View Profile
Re: [XP] Event Proximity Icons
« Reply #12 on: May 22, 2011, 09:39:09 AM »
Thanks you fixed the bug it had before, the ghost pixels and all! However I forgot to mention the other bug, err i did mention it but the post didn't go through and i was too tired to re-do it lol.
Anyways...the other bug was, the icon only triggers on one event on my map. The event that triggers it doesn't have a tag on it, but it shows up on the event with the tag. I know it sounds confusing so I made a pic.
(click to show/hide)

Offline ForeverZer0

  • CP's Pedophile
  • Global Moderator
  • Guardian of Chaos
  • ****
  • Posts: 3247
  • LV: 294
  • Gender: Male
  • Remember you are unique, just like everyone else.
    • View Profile
Re: [XP] Event Proximity Icons
« Reply #13 on: May 22, 2011, 09:46:52 AM »
You mean the wrong event is getting the icon?

ie. Event_A has a comment Tag, but the icon appears over Event_B?
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

Offline Zexion

  • Addicted to LoL
  • Chaos User
  • ******
  • Posts: 1511
  • LV: 69
  • Gender: Male
  • My anaconda don't...jk it does
    • View Profile
Re: [XP] Event Proximity Icons
« Reply #14 on: May 22, 2011, 05:58:36 PM »
You mean the wrong event is getting the icon?

ie. Event_A has a comment Tag, but the icon appears over Event_B?

Yes exactly! Except it only happens to 1 event. The other event with tags doesn't show at all Idk why.

Offline Raziel 0128

  • Trained Member
  • *
  • Posts: 13
  • LV: 0
    • View Profile
Re: [XP] Event Proximity Icons
« Reply #15 on: June 03, 2011, 09:50:17 PM »
Your script works nicely and is very useful but I've discovered an error with it.
If you attempt to save on a map using this code then you will get the following error:
"Script 'Scene_Save' Line 80: Type error occurred.
no marshal_dump is defined for class Bitmap"

This happens in your demo as well.
In future versions could you also allow glowing AND icons at the same time, for example if I wanted to have one item glow but another bring up a speech bubble?

Offline yuhikaru

  • Trained Member
  • *
  • Posts: 21
  • LV: 3
  • Gender: Female
    • View Profile
Re: [XP] Event Proximity Icons
« Reply #16 on: June 18, 2011, 03:01:11 PM »
Another bug I found was that if the actual event page has a tag, and you change the event page while the player is within it's range, but the new event page doesn't have a tag, the icon won't be erased until you exit the map. (Example: Chest with tag 'OPEN', and when it's open doesn't have any tag).
I tried to correct it with this change, but I don't know if it's a good approach. Apparently works.
Code: [Select]
def update_icons
    # Return if no icons exist for page, or set icon if none is defined
    if @character.icons.empty?
      @icon_sprite.dispose  #ADD THIS LINE
      return
[....]
(And just a little bump on the save error thing).

Offline Taiine

  • Ethereal Devastator
  • ****
  • Posts: 311
  • LV: 14
  • Gender: Female
    • View Profile
Re: [XP] Event Proximity Icons
« Reply #17 on: July 13, 2011, 04:36:31 AM »
Don't mean to bump this. But I'm hoping for a fix to the
"Script 'Scene_Save' Line 80: Type error occurred.
no marshal_dump is defined for class Bitmap"
error on saving.

I was hoping to use this to mark exits that may not be fully obvious to some (like side door ways in homes) but that error when trying to save is proving problematic.

Offline ForeverZer0

  • CP's Pedophile
  • Global Moderator
  • Guardian of Chaos
  • ****
  • Posts: 3247
  • LV: 294
  • Gender: Male
  • Remember you are unique, just like everyone else.
    • View Profile
Re: [XP] Event Proximity Icons
« Reply #18 on: July 13, 2011, 05:19:10 AM »
Ah, yes, I keep forgetting about this one.
I'll make a note and fix it within the next day or so.
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

Offline Taiine

  • Ethereal Devastator
  • ****
  • Posts: 311
  • LV: 14
  • Gender: Female
    • View Profile
Re: [XP] Event Proximity Icons
« Reply #19 on: July 16, 2011, 12:45:27 AM »
*sits and waits for that next day or so* XD