💬

Community answer

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

Using ACF muzzle velocity in E2 missile code

🔫 WeaponsUpdated 2 days ago•0 views
Read the gun's muzzle velocity with Gun:acfMuzzleVel(). If it returns 0 the gun is not ready, so trigger a reload; otherwise use the returned value (e.g. 229 m/…

How do you use the ACF muzzle velocity value in an E2 script for a missile, since acfmuzzlevel does not work there?

Read the gun's muzzle velocity with Gun:acfMuzzleVel(). If it returns 0 the gun is not ready, so trigger a reload; otherwise use the returned value (e.g. 229 m/s) as the missile speed variable instead of a hardcoded number: if(Gun:acfMuzzleVel()==0){N=1000 Gun:acfReload()}else{N=229}

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.