how do i seect "this event" when doing a script call, for example with self switches. or in my case, YEPs sef variables and self switches plugin?
How do i say "This evnt" in script calls?
RPG Maker MV SupportWhat's the context? If you're using the functions provided in the documentation for Self Switches and Variables, you have to specify the event when calling the function. E.g.:
so you would simply type in the ID for the event that you're putting this script call into.
I can't think off the top of my head of a circumstance where you'd be calling the function and not already know which event it is. Unless you're writing additional code for your own plugin, in which case it seems like you'd either be making it a method of events so you'd use
So...maybe you can explain a bit more clearly how you're trying to use this and how you wouldn't already know which event it is.
Code:
this.setSelfSwitchValue(mapId, eventId, switchId, true)
so you would simply type in the ID for the event that you're putting this script call into.
I can't think off the top of my head of a circumstance where you'd be calling the function and not already know which event it is. Unless you're writing additional code for your own plugin, in which case it seems like you'd either be making it a method of events so you'd use
this, or you'd have the event getting passed in so you'd reference that variable.So...maybe you can explain a bit more clearly how you're trying to use this and how you wouldn't already know which event it is.
Don't worry i've already fixed this. But to answer your questrion. I was just lazy and wanted an easy way to copy events without needing to change them induvidually.
Original thread: https://forums.rpgmakerweb.com/threads/how-do-i-say-this-evnt-in-script-calls.150422/