Open F3der1co opened 1 month ago
https://github.com/Scirra/Construct-bugs/issues/7028
This was brought to my attention, so maybe a different syntax can be used. For example sprite(uid: 123).x
. I don't know how the c3 expression lexer works, so I can just guess what would be feasible to implement.
Referencing by tag would also be very useful. UID can change, but tags will always remain the same. sprite["tag"].x Enemies["dungeon_boss"].health
Reviewed guidelines
Checked for duplicate suggestions
Summary
similar to sprite(iid).x it would be amazing to have the same functionality for uid.
Possible workarounds or alternatives
writing return functions for the specific properties you want to access by uid or using addons like UID TO ANYTHING by Overboy
Proposed solution
Same as
objectType(iid).whatever
but using uid. To differenciate between the two it would use square bracketsobjectType[uid].whatever
Why is this idea important?
While the picking system is often very helpful, it sometimes makes certain logic extremely complicated. Accessing instances in expressions by their uid would allow a great amount of flexibility!
Additional remarks
No response