Description: This is the syntax for defining a hash table. Hash tables differ from arrays in that the "indexes" can be anything, characters, strings, even complex data structures. The code sample below shows a hash table with a complex data structure as its key.
Code Sample:
def command_123
if @event_id > 0
key = [$game_map.map_id, @event_id, @parameters[0]]
$game_self_switches[key] = (@parameters[1] == 0)
end
$game_map.need_refresh = true
return true
end
RPG RPG Revolution is your #1 stop for game development and console RPG games, as well as those created by people like you. Link to us to support us, so we may grow to be better website community for you.