Sobeman459
Member
I have this method for when the player hits "Z" on the keyboard i want it to open a scene if a comment in the event is present. How do i go about doing this?
Code:
class Scene_Map
alias non_thief_update update
def update
non_thief_update
if Input.trigger?(Input::Z)
call_thief
end
end
def call_thief
case $game_player.direction
when 2
lookingx = $game_player.x
lookingy = $game_player.y + 1
when 4
lookingx = $game_player.x - 1
lookingy = $game_player.y
when 6
lookingx = $game_player.x + 1
lookingy = $game_player.y
when 8
lookingx = $game_player.x
lookingy = $game_player.y - 1
end
for actor in $game_party.actors
thief = actor
end
for actor in $game_party.actors
thief = actor
end
[color=red]if comment "thief" exists[/color]
return if thief == nil
end
end