Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Testing for an Event Name
#1
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.


Description :

This Script loads in the names of events from the map files

Script :

Code:
#==============================================================================
# **  Game_Map
#------------------------------------------------------------------------------
#   Near Fantastica
#   22/12/04
#   Add defenision of the names to Game Map Class
#==============================================================================

class Game_Map
#--------------------------------------------------------------------------
# * Refer setup to Game Map
#--------------------------------------------------------------------------
alias game_map_setup setup
#--------------------------------------------------------------------------
# * Loads Event names
#--------------------------------------------------------------------------
def setup(map_id)
   game_map_setup(map_id)
   @name = {}
   for i in @map.events.keys
     @name[i] = @map.events[i].name
   end
end
#--------------------------------------------------------------------------
# * Displays Event names
#--------------------------------------------------------------------------
def event_name(event)
   @event_id = event
   @name[@event_id]
end
end


Instructions :

To test for an event name use this call

Code:
$game_map.event_name(event_id)

event_id = the id for the event you wish the name to displayed
}


Possibly Related Threads…
Thread Author Replies Views Last Post
  Event dependent Movement Caldaron 0 2,189 10-09-2006, 01:00 PM
Last Post: Caldaron
  Event Name and ID Search Script Hadriel 0 2,026 06-21-2006, 01:00 PM
Last Post: Hadriel
  Common Event on Terrain Tag mudgolem 0 2,141 03-26-2006, 01:00 PM
Last Post: mudgolem
  Battle Event List & Pre-Battle Troop Setup SephirothSpawn 0 2,459 12-25-2005, 01:00 PM
Last Post: SephirothSpawn
  Event check before battle end Jimmie 0 1,835 09-03-2005, 01:00 PM
Last Post: Jimmie



Users browsing this thread: