frankie2000
Member
Hi!
How do i found the event that called the script?
How do i found the event that called the script?
Dark Zero said:Go to the event commands and go to the last page. It's the last item in the last column. Type in whatever script you have in the box that comes up.
http://support.antheasoft.com/ev_comm_script_1.jpg[/img]
http://support.antheasoft.com/big_arrow_vert.png[/img]
http://support.antheasoft.com/ev_comm_script_2.jpg[/img]
http://support.antheasoft.com/big_arrow_vert.png[/img]
http://support.antheasoft.com/ev_comm_script_3.jpg[/img]
Or do you mean how do you find which event called the script? In that case, I think the easiest way would be to use a variable to pass the event ID to the script.
i'm not really sure if this is what you wantfrankie2000 said:Thanx for the tut. No i mean, how to find Wich event called the script. Like if i had a class it would look mayby like this:
class Someclass
def initialize
@trigger_that_called_this_method=??????
end
end
So the event look like the tut you showed. In the command section of the trigger:
Someclass.new
There must be a way whitout using arguments to find out the event that called the method...or am i wrong?
class Interpreter
def event
return $game_map.events[@event_id]
end
end
Freakboy said:i'm not really sure if this is what you want
you need to be in the Interpreter class for this, add this.
the interpreter handles all event commands.
this will retrieve the current event if i'm not mistakenCode:class Interpreter def event return $game_map.events[@event_id] end end
i never messed with the interpretter class before so i dont have a clue how to call it.