Jump to content
New account registrations are disabed. This website is now an archive. Read more here.
Tenoukii

"Search me!" Indicator

Recommended Posts

Heya guys... I'm after a script that shows an animation above the player graphic and plays an SE when there's an event nearby that the player needs to/can search for goodies. Something a bit like in FFIX :) Preferably able to set up in the event to be searched so that when the player walks next to it, it shows the indicator without the need for countless numbers of events surrounding the searchable.

If anyone can help, I'll be forever greatful!

Share this post


Link to post
Share on other sites

Dude like 5 years ago I saw something like this in a demo showcasing several scripts of this particular scripter. It was called sephirothspawn's playground or something like that. Back in the day, he was the scripter. Pretty sure he has a family and got over it and hasn't been seen for years

Share this post


Link to post
Share on other sites

Heh, you need to stop with the script requests I can't keep up.

When Mark said he has seen such a script I was almost happy... Until I realized it's lost, still the name sounds familiar.

 

... man something about diving into the obscurity of lost history, broken developer hopes and dead links really churns my guts.

 

I couldn't find anything in particular, but it seems that he has a kingdom hearts script on the Creation asylum website, if anything it's the kind of script where such a feature would be available, unfortunately the website requires registration to download from their topics, and I'd rather die over registering to a site that does that, let alone actually join it for good.

Share this post


Link to post
Share on other sites

Yeah he was a mod at creation asylum and the very old rmxpu.net. In fact, noob saibot has a DB backup of that old site I believe. Still, the file is almost certainly been deleted from whatever filehost it once lived at

Share this post


Link to post
Share on other sites

#foundit http://www.creationasylum.net/forum/index.php?showtopic=12209

 

The demo is down because it was hosted on a site that is long long down. It's possible our old friend Noob could help, but I doubt it.

 

Another thing to try it looking at this scripters topics on CA. Go to her profile, and select options on the left sidebar to view his topics: http://www.creationasylum.net/forum/index.php?showuser=398

Share this post


Link to post
Share on other sites

Lol, shame on you Mark, double posting when you are the owner.

That's a whole new level of law breaking.

 

I guess the request will have to be fulfilled the hard way.

Maybe later. After cramming my brain with the bad inconsistent coding of some people I need a break to unload.

Share this post


Link to post
Share on other sites

Don't worry about it if you cba... I've searched for the Testbed but can't find it anywhere, just a load of dead links :/

I can always just revert to plan B which is chests that can be easily seen. I just wanted to add like search options for shelves and dig sites, but I'm fairly sure I can live without it ^^

Share this post


Link to post
Share on other sites

this is the only thing I have ever seen around that sounds something like what you want

http://forum.chaos-project.com/index.php?PHPSESSID=8701052108fcf7cf7330cd1fae16c62c&topic=9670.0

however its only an icon that is displayed above interact-able events

Share this post


Link to post
Share on other sites

That looks perfect actually... I don't know why I didn't think about having it over the actual event! 

You are a genius! Thanks ^^

 

EDIT: Slight issue with it... The icon appears to being getting stuck to the screen after I've interacted with the interact-able event. It stays constantly but scrolls with the screen. After the next incredibly talented writer of computer language tells me how indeed I may fix this, it is the perfect script! 

Edited by Tenoukii

Share this post


Link to post
Share on other sites

8 hours later...

 

#+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
# Event Proximity Icons
# Author: ForeverZer0
# Modder: Saltome
# Version: 1.5
# Date: 12.02.2014
#+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
#
# 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 asa 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
# - Can use glow feature instead of icons
# - Set custom glow color and speed
#
# Instructions:
# - See configuration below.
# - Make sure all icons are located in Graphics/Pictures directory
#
# Credits:
# - ForeverZer0, for the script
# - Zexion, for requesting it
# - Taiine, for her constant reminders to add Blizz-ABS compatibility ;)
#
##+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+

#+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
# BEGIN CONFIGURATION
#+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+

TAGS = ['TALK', 'SEARCH', 'ATTACK']
# These are th codes that will be searched for in event page comments
ICONS = ['talk', 'search', 'attack']
# These are the filenames of the respective codes, located in Pictures folder

PROXIMITY = 3
# The number of tiles away the player must be to event to show the icons.

CYCLE_TIME = 2
# The number of seconds before the icon cycles to the next one (if available)

ICON_OFFSET = [0, -8]
# The offset of the icon coodinates, adjust to your icon size
# [X_OFFSET, Y_OFFSET]

GLOW_ONLY = false
# Set to true to have sprites glow when within range instead of using icons
GLOW_COLOR = Color.new(255, 255, 200, 128)
# The color of the glow. (RED, GREEN, BLUE, ALPHA)
GLOW_SPEED = 40
# The glow speed. 40 = 1 second

ALWAYS_ON_TOP = false
# Set to true if icons always display over everything else.

#+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
# END CONFIGURATION
#+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+

#===============================================================================
# ** Game_Map
#===============================================================================

class Game_Map

attr_accessor :proximity_data

alias zer0_proximity_setup setup
def setup(map_id)
@proximity_data = {}
zer0_proximity_setup(map_id)
end
end

#===============================================================================
# ** Game_Event
#===============================================================================

class Game_Event
attr_reader :erased
attr_reader :page
alias zer0_proximity_init initialize
def initialize(map_id, event)
# Normal method
$game_map.proximity_data[event.id] = [false, []]
zer0_proximity_init(map_id, event)
# A little extra work now, but it greatly reduces the number of checks later
# @event.pages.each {|page| page.list.each {|command|
# if [108, 408].include?(command.code) &&
# command.parameters.any? {|param| TAGS.include?(param) }
# $game_map.proximity_data[@id][0] = true
# end
# }}
@page.list.each {|command|
if [108, 408].include?(command.code) &&
command.parameters.any? {|param| TAGS.include?(param) }
$game_map.proximity_data[@id][0] = true
end
}
refresh
end

# alias zer0_proximity_tag_refresh refresh
# def refresh
# # Call normal refresh method
# zer0_proximity_tag_refresh
# # Check current page
# if !GLOW_ONLY && $game_map.proximity_data[@id][0] && @page != nil
# if !GLOW_ONLY && @page != nil
# # Set default values
# $game_map.proximity_data[@id] = [false, []]
# # Iterate commands and check if tag is present. If so, set respective flag
# @page.list.each {|command|
# if [108, 408].include?(command.code) &&
# TAGS.include?(command.parameters[0])
# $game_map.proximity_data[@id][0] = true
# $game_map.proximity_data[@id][1].push(command.parameters[0])
# end
# }
# end
# end
end

#===============================================================================
# ** Sprite_Character
#===============================================================================

class Sprite_Character

alias zer0_proximity_tag_init initialize
def initialize(viewport, character = nil)
# Check if the sprite is that of an event, and has icons
if character.id != 0
flag = $game_map.proximity_data[character.id][0]
if character.is_a?(Game_Event) && flag
if ALWAYS_ON_TOP
topview = Viewport.new(0, 0, 640, 480)
topview.z = 9999
end
# Initialize sprite and bitmaps
@icon_sprite = ALWAYS_ON_TOP ? Sprite.new(topview) : Sprite.new(viewport)
@icon_sprite.opacity = @icon_index = 0
end
end
# Normal initialize method
zer0_proximity_tag_init(viewport, character)
end

alias zer0_proximity_tag_upd update
def update
# Normal update method
zer0_proximity_tag_upd
# Update the icons if needed
if ![nil, 0].include?(@character.id)
if @character.is_a?(Game_Event)

if !GLOW_ONLY && @character.page != nil #&& @character.page !=nil
# Set default values
$game_map.proximity_data[@character.id] = [false, []]
# Iterate commands and check if tag is present. If so, set respective flag
@character.page.list.each {|command|
if [108, 408].include?(command.code) &&
TAGS.include?(command.parameters[0])
$game_map.proximity_data[@character.id][0] = true
$game_map.proximity_data[@character.id][1].push(command.parameters[0])
end
}
end
GLOW_ONLY ? update_glow : update_icons
end
end
end

def update_glow
if !$game_map.proximity_data[@character.id][0]
return
end
# Check proximity, then set flash if within range.
range_x = @character.x - $game_player.x
range_y = @character.y - $game_player.y
range = Math.hypot(range_x, range_y).abs
if range <= PROXIMITY && Graphics.frame_count % GLOW_SPEED == 0
self.flash(GLOW_COLOR, GLOW_SPEED)
end
end

def update_icons
if !$game_map.proximity_data[@character.id][0]
return
end
# Return if no icons exist for page, or set icon if none is defined
if $game_map.proximity_data[@character.id][1].empty?
return
elsif @icon_sprite.bitmap == nil
icon_name = $game_map.proximity_data[@character.id][1][0]
@icon_sprite.bitmap = RPG::Cache.picture(icon_name)
end
if @character.erased
@icon_sprite.opacity =0
return
end
bw = bh = 0
# Calculate width and height of icon and figure into the coordinates
if @icon_sprite.bitmap != nil
bw = ((self.bitmap.width / 4) - @icon_sprite.bitmap.width) / 2
by = -@icon_sprite.bitmap.height
end
# Set coordinates of icon relative to sprite
@icon_sprite.x = (self.x - self.ox) + bw + ICON_OFFSET[0]
@icon_sprite.y = (self.y - self.oy) + bh + ICON_OFFSET[1]
# Check range, fading in/out smoothly as needed
if $BlizzABS
pix = $BlizzABS.pixel
char_x, char_y = @character.x, @character.y
player_x, player_y = $game_player.x / pix , $game_player.y / pix
if @character.is_a?(Map_Battler)
char_x /= pix
char_y /= pix
end
else
char_x, char_y = @character.x, @character.y
player_x, player_y = $game_player.x, $game_player.y
end
range_x = char_x - player_x
range_y = char_y - player_y
range = Math.hypot(range_x, range_y).abs
@icon_sprite.opacity += (range <= PROXIMITY) ? 10 : -10
# Cycle icon bitmap as needed
if @icon_sprite.opacity > 0 && Graphics.frame_count % (CYCLE_TIME * 40) == 0
size = $game_map.proximity_data[@character.id][1].size
@icon_index = (@icon_index + 1) % size
icon_name = $game_map.proximity_data[@character.id][1][@icon_index]
@icon_sprite.bitmap = RPG::Cache.picture(icon_name)
end
end

alias zer0_proximity_icon_dispose dispose
def dispose
# Disposed the icon sprite
if @icon_sprite != nil && !@icon_sprite.disposed?
@icon_sprite.dispose
end
zer0_proximity_icon_dispose
end
end

 

You can remove the icon either by using the erase event command, or simply by changing the event page.

There is a slight delay before the icon changes, after it changes pages, but it shouldn't be much of a problem.

Edited by Saltome

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...