HAVING THE EVENT CHECK THE REGION.
Posts
Pages:
1
I need a way to make an event check what region it's standing on.
I thought 'get location info' would do what I wanted. But it didn't.
This is for Ace
I thought 'get location info' would do what I wanted. But it didn't.
This is for Ace
I was writing the script as you edited your post.
I think this might help with what you were trying to do.
You can use in a script conditional branch this to check if the event is outside the screen.
or if you want a specific event that is not the one running.
You could also use event.region_id to find out the id then use == like event.region_id == 1.
Let me know if it helps you out.
I think this might help with what you were trying to do.
#============================================================================== # ** Game_Interpreter #------------------------------------------------------------------------------ # An interpreter for executing event commands. This class is used within the # Game_Map, Game_Troop, and Game_Event classes. #============================================================================== class Game_Interpreter #-------------------------------------------------------------------------- # * Get Running Event #-------------------------------------------------------------------------- def event(id = @event_id) ; $game_map.events[id] end end
You can use in a script conditional branch this to check if the event is outside the screen.
event.near_the_screen?
or if you want a specific event that is not the one running.
event(id).near_the_screen?
You could also use event.region_id to find out the id then use == like event.region_id == 1.
Let me know if it helps you out.
author=LibertyWhoops, when I edited my post I took that out. I'm looking to do this in ace.
What Engine?
author=TDSI have no idea how to use ruby so I just kinda stuck that in a conditional branch. It crashed, I did a bit of googling and found this "$game_map.events.region_id == 56" and tried that as well but that also crashed. How was I supposed to be using that bit of code?
event.region_id == 1
The regions here are what I want the events to react to.
If you're using it straight from the global variable then it's like this.
Like so:
Also test it before posting instead of editing your post. You might not receive help properly if you just post about trying then edit your post.
$game_map.events[ID_OF_EVENT_HERE].region_id == 5
Like so:
$game_map.events[5].region_id == 5
Also test it before posting instead of editing your post. You might not receive help properly if you just post about trying then edit your post.
Pages:
1