💬

Community answer

Collected from the ACE community Discord archive around 2024-12-02. It may be informal or outdated — anyone can edit this page to improve it.

E2 soundPlay only plays once

🔊 SoundUpdated 2 days ago•0 views
if(first()) only runs once when the chip is first executed, so the sound plays a single time at spawn. To make it play while firing, call soundPlay inside the b…

Why does my Expression 2 chip not play the sound when I press Mouse1? It calls Base:soundPlay() inside an if(first()) block.

if(first()) only runs once when the chip is first executed, so the sound plays a single time at spawn. To make it play while firing, call soundPlay inside the branch that reacts to the Mouse1 input changing (e.g. the changed(Mouse1) check) instead of inside first().

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.