Skip to content

"$this." or "$self." self reference for events. The current way is very counter intuitive even for programmers #188

@blurymind

Description

@blurymind

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 values

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions