Browsing Wiremod's section
← Back to ACE
💬

Community answer

Collected from the ACE community Discord archive around 2023-12-21. It may be informal or outdated — anyone can edit this page to improve it. This topic changes between game versions — double-check before relying on it. Original discussion

E2 vector components and @persist

💻 Expression 2Updated 2 days ago•0 views
vec(3,5,7):x() gives 3, :y() gives 5, :z() gives 7; you can also index vec(3,5,7)[1] for the first component. @persist makes variables persist between execution…

How to get a single component out of a vector in E2; why do variables reset

vec(3,5,7):x() gives 3, :y() gives 5, :z() gives 7; you can also index vec(3,5,7)[1] for the first component. @persist makes variables persist between executions of the E2 - without it variables reset each interval (e.g. X set under if(first()) prints 10 once then 0 every second). @strict changes that rule to make persist unnecessary in some cases.

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.