# Pass through each event, saving the nearest range
nearest_range = nil
for event in $game_map.events
if nearest_range.nil? || VR.range($game_player, event) < nearest_range
nearest_range = VR.range($game_player, event)
end
end
# Then, just make a case statement, with your range, with when statements for each range:
case nearest_range
when 0..1
p 'Right Next to Event'
when 2..5
p 'Getting Close'
when 6..10
p ' Plenty of room'
else
p 'no where near you'
end
SephirothSpawn said:You can just use Near's View Range, and just test the range of the event with the player. Simply making a window or something, that checks range of events and player on the map.
Code:# Pass through each event, saving the nearest range nearest_range = nil for event in $game_map.events if nearest_range.nil? || VR.range($game_player, event) < nearest_range nearest_range = VR.range($game_player, event) end end # Then, just make a case statement, with your range, with when statements for each range: case nearest_range when 0..1 p 'Right Next to Event' when 2..5 p 'Getting Close' when 6..10 p ' Plenty of room' else p 'no where near you' end
More or less, something like that. It's not to developed, but if you need any help, just ask.