Just found out about a whole new thing today.
Buttons have a $widget reference for their click event!
However, there does not seem to be anyway to get the ID for evaluation purposes.
Does the issue occur in the editor or during gameplay? If it occurs during gameplay, please specify which movement system is being used (free movement or grid movement):
gameplay, both
Briefly describe the issue you're experiencing:
if you put the following into a "button event" script:
print($widget.id);
returns null.
The only way I could actually evaluate if the buttons widget was a certain ID was to convert to a string first.
$str = str($widget);
if $str == "[Widget:scroll]" then
display_message("Workaround works!");
end;
I may just be not understanding how to use $widget but as you can get the buttons ID with self.id, I would assume $widget.id would work too.
Are there any errors in the in-game debug console or external console window?

Provide the steps necessary to reproduce the issue:
- make a script that prints $widget.id;
- Assign it to a button's Run Script action
- it will print null