Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

[Resolved]Trouble with events...(in rgss)

Ares

Member

Hey
I can't seem to figure out how to change the graphic of an event with a certain name.
I'm using this:
[rgss]dir, x, y = $game_player.direction, $game_player.x, $game_player.y
case dir
   when 2
     coords=[x,y+1]
   when 4
     coords=[x-1,y]
   when 6
     coords=[x+1,y]
   when 8
     coords=[x,y-1]
end
@map = load_data(sprintf("Data/Map%03d.rxdata",$game_map.map_id))
 
for i in @map.events.keys
  if @map.events.x==coords[0] && @map.events.y==coords[1]
    if @map.events.name=="Name"
      @map.events.pages[0].graphic=""
      @map.events.pages[0].step_anime=false
      $game_map.need_refresh=true
    end
  end
end
 
[/rgss]
It's not giving me errors, but it isn't working either. Anyone knows what I'm doing wrong?
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top