loading gun sounds?

Have a question, suggestion, or comment about Aleph One's features and functionality (Lua, MML, the engine itself, etc)? Post such topics here.
Post Reply
Posts: 2
Joined: Jul 12th '13, 17:48

Is it possible to have a sound play when loading a weapon (such as in Damage Incorporated)?
User avatar
Posts: 1659
Joined: Jul 1st '06, 21:14
Location: Earth

Loading as in bringing up weapon from the inventory or Reloading a weapon?

The sound for reloading a weapon can be set in the physics file. It would be under Weapons/____/Trigger Settings using ShapesFusion or Anvil.

As for bringing up a weapon:
I imagine it would also be possible by using lua or editing the shapes file.

Edit shapes - Change the idle animation to have 2 equivalent frames. Have the frame 0 be the keyframe and have a corresponding keyframe 'ready' sound attached of your choice. Then have the animation loop from frame 1 so the sound only plays once. [Untested.]

Lua - check which gun is equipped. If the gun equipped this frame is not the same equipped as the last frame, then play a sound.
Post Reply