yeah, near fantastica's View Range events...I have to go find it now...
[in-post edit!]
It does exactly what you say, it was thought for events that spot you (pokemon) or events that the sounds get louder when you get closer, softer farther away etc..
#==============================================================================
# ** View Range Module
#==============================================================================
# Near Fantastica
# Version 4
# 29.11.05
#==============================================================================
#--------------------------------------------------------------------------
# * SDK Log Script
#--------------------------------------------------------------------------
SDK.log("View Range", "Near Fantastica", 4, "29.11.05")
#--------------------------------------------------------------------------
# * Begin SDK Enable Test
#--------------------------------------------------------------------------
if SDK.state("View Range") == true
module VR
#----------------------------------------------------------------------------
def VR.in_range?(element, object, range)
x = (element.x - object.x) * (element.x - object.x)
y = (element.y - object.y) * (element.y - object.y)
r = x + y
if r <= (range * range)
return true
else
return false
end
end
#----------------------------------------------------------------------------
def VR.range(element, object)
x = (element.x - object.x) * (element.x - object.x)
y = (element.y - object.y) * (element.y - object.y)
r = x + y
r = Math.sqrt(r)
return r.to_i
end
end
#==============================================================================
class Interpreter
#----------------------------------------------------------------------------
def event
return $game_map.events[@event_id]
end
end
#--------------------------------------------------------------------------
# * End SDK Enable Test
#--------------------------------------------------------------------------
end
Well, I'm pretty sure you don't have any idea what to do with this (i dont lol)
Heres his demo(watch out the one in there is v.2 and this script is v.4, im pretty sure the same event commands work in both...)
http://savefile.com/files/525231