This is a locked, single-post thread from Creation Asylum. Archived here to prevent its loss.
No support is given. If you are the owner of the thread, please contact administration.
Ok. First of all, this is not like the pokémon item finder.
What it does is show a transparent window in the lower left (160*96 px) and draws two graphs in it. The closer you are, the closer to each other the two graphs are. When you're on the spot, the graphs are swapped for a note. Don't ask why. You can easily replace the image.
It also plays a sound whenever you're close enough. This can be removed around line 80. Remove these lines:
Code:
if @playing != @distance
Audio.se_play("Audio/SE/" + '014-Move02', 60-(@distance*5)**0.5, 100)
@playing = @distance
end
else
@playing = @distance
When installed and activated, it should look like this when a 'source' is nearby:
The window is empty if there is no source. Text and windowskin are both easily changed.
Insert the script in a new slot above main and below the SDK
You need a picture called 'note' in your pictures folder. It's automatically centered in the window, so don't worry.
That said, howdo you use it?
Easy. Make an event, and insert two comments. One should be
resonance
and the next should be the range. This isn't always exact tiles, so experiment.
Example:
Now, 8 is a very large range, 3 or 4 are good numbers for this, but like I said, experiment.
Good luck, have fun
CODE
Code:
#Treasure hunt/resonance by Jimme Reashu
#SDK is required.
#Last updated 13 of April 2006
#Fixed a few bugs
#Made the window dissapear if there are no resonating events
#Requested by Anaxim
def update
@count %= 128
@count += 2
for i in 0...@count
x = i
@pixels[i] = [x, @amplitude * Math.sin((x-@distance*0.7)/128.0*@repeat)*100+32]
@pixels2[i] = [x, [@amplitude*(@distance/5.0),@amplitude*2].min * Math.sin((x+@distance*0.7)/128.0*@repeat)*100+32]
end
self.contents.clear
if @distance < 999
unless @distance == 0
@pixels.each{|a|self.contents.fill_rect(a[0], a[1], 1, 1, @color)}
@pixels2.each{|a|self.contents.fill_rect(a[0], a[1], 1, 1, @color2)}
@sprite.visible = false
else
@sprite.visible = true
end
if @playing != @distance
Audio.se_play("Audio/SE/" + '014-Move02', 60-(@distance*5)**0.5, 100)
@playing = @distance
end
else
@sprite.visible = false
@playing = @distance
end
draw_text
end
end
end
if SDK.state('Treasure Hunt')
#--------------------------------------------------------------------------
class Scene_Map
#--------------------------------------------------------------------------
def main_draw
@spriteset = Spriteset_Map.new
@message_window = Window_Message.new
@graph_window = Window_Graph.new
Graphics.transition
end
#--------------------------------------------------------------------------
def main_dispose
Graphics.freeze
@spriteset.dispose
@graph_window.dispose
automatic_dispose
end
#--------------------------------------------------------------------------
def update_graphics
@spriteset.update
@message_window.update
@graph_window.update_act
if @graph_window.visible != @graph_window.act
@graph_window.visible = @graph_window.act
end
@graph_window.update if @graph_window.act
end
end
end
if SDK.state('Treasure Hunt')
class Game_Event < Game_Character
attr_reader :page
end
end