The sound of arrow hit-The threaded arrow

正在查看此主题的用户

:arrow: I've done a fireball staff (gun-bow-crossbow<doesn't matter>) BUT my inteligent fireball (arrow-bolt-bullet<doesn't matter) gets threaded on everything (trees-shields-people-floor).
----------------------------------------
Is there some way to fix that.


:arrow: I've obtained a sound for the fireball hit (like an explosion).
------------------------------------------------------------------------------------------------------------
How can I fix that (change the hit sound only for my new projectile <fireball>)

>>Lot of thanks>>
 
Look at the firearm code. At the very end is something like play_sound_yoursound. Add in your own sound item, and change that code to your sounds name.
 
:arrow: I've done a fireball staff (gun-bow-crossbow<doesn't matter>) BUT my inteligent fireball (arrow-bolt-bullet<doesn't matter) gets threaded on everything (trees-shields-people-floor).

By "threaded" you mean that the fireball sticks in trees etc like arrows do?  If so, what type of weapon it is does matter.  If you change your weapon itp_type_ from bow/crossbow to itp_type_musket or itp_type_pistol, the projectile will disappear on impact.  You'll have to change your ammo items from itp_type_arrow or itp_type_bolt to itp_type_bullet as well.

How can I change the hit sound only for my new projectile <fireball>)

As far as I know you can't replace the hit sound for a single weapon, or even to find out where or when a projectile hits.  But you can use (agent_get_look_position, pos1, ":agent") to get the position an agent is looking at, then do a (play_sound,"snd_fireball_explosion").  I say this after studying the source for the cannon item in Mirathei's Gun Thunder mod.  I think that's right, but I have a feeling play_sound might play the sound at the position of the person who fired the projectile, so the agent_get_look_position might not be useful for a sound, but sure is good for setting off an explosion particle system :grin:
 
后退
顶部 底部