💬

Community answer

Collected from the ACE community Discord archive around 2022-03-28. It may be informal or outdated — anyone can edit this page to improve it. Original discussion

self vs explicit entity in method calls

🌙 LuaUpdated 2 days ago•0 views
With colon calls the target is passed as the first arg (self); for plain fields use entity.pos = pos - the distinction only matters inside method definitions.

Is 'self' the entity when calling obj:method()?

With colon calls the target is passed as the first arg (self); for plain fields use entity.pos = pos - the distinction only matters inside method definitions.

Was this article helpful?

See More

Discussion(0)

No comments yet. Be the first to ask a question!

Have a question? Sign in to join the discussion.