-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"$this." or "$self." self reference for events. The current way is very counter intuitive even for programmers #188
Comments
use |
@krmbn0576 does Its still not very intuitive :) who is character 0 ? Why not |
Yes. 0 means itself 😇 |
@krmbn0576 what would 1 mean in this case then? :) |
0 is special |
@krmbn0576 the method is hard to discover :) Rpg maker MV has no official API documentation. There is one incomplete google doc made by the community and even that is hard to find |
Thanks, I'll think about it. |
https://docs.google.com/spreadsheets/d/1-Oa0cRGpjC8L5JO8vdMwOaYMKO75dtfKDOetnvh7OHs/edit#gid=0 I think you can just take it and make official |
Right now when you use the editor, and you want to access a variable of an event from the event you are editing, the syntax is very counter intuitive and very long. Like this:
$dataMap.events[n].name
Where you have to also know how to get the event's own ID ('n') (I already forgot it)
This is counter intuitive - even for programmers.
When you try:
$this.name
you find out that
$this
is not even defined. The event has no reference to itself!Consider having to check an event's own variable from an addon via a conditional branch - only way to do it is by using the 'script' option. The syntax to access variables is a pain in the butt and is easy to forget. Even if you know javascript, you have to dig through forums to find out this very basic thing..
Suggested solution:
Define
$this
automatically when calling events from the editor, so when using $this.x for example, we can get the event's X , without having to write tons of obscure functions just to get the event to look into its own script valuesThe text was updated successfully, but these errors were encountered: