02-01-2005, 01:00 PM
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.
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