Main Menu
  • Welcome to The RPG Maker Resource Kit.

Is it possible? [Resolved]

Started by Valcos, February 28, 2007, 01:45:36 PM

0 Members and 1 Guest are viewing this topic.

Valcos

Is it possible that if you get into a sertain distance of an event the event will activate? Like in a mission when you have to follow  a guy to his base or its a sneaking mission.
Im to cool to have my own signature!!!

sabao

You could just add invisible events that activate that event when you touch them, if you're working on a sneaking game. I've done it before on RM2k.

Steel Hearts - Anime Strategy RPG

Valcos

Well I was think of more of a radius kind of thing...
Im to cool to have my own signature!!!

italianstal1ion

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

Valcos

Thanks!!! ;D This will help me out alot!!
Im to cool to have my own signature!!!

:)

if this is solved, add [RESOLVED] to topic title, but leave topic open in case others have questions/comments.
Watch out for: HaloOfTheSun

Valcos

Im to cool to have my own signature!!!