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?
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?