ikdoemaarwat wrote:Can you give me an animation you can't trigger?
I'll post back the result.
Exporting the PlayHudMotion method allows you to play any hud animation any time. Scripts by Sin!, like GWR and Gunslinger, put the drinking animation as the idle animation. This isn't triggered at will, it's a hack to play animation when the item is activated. That's not what I was referring to when I made my post about playing hud motions.
Let me give you an example of what can be done with this. Say I have a wpn_abakan equipped and I added a new animation to it which looks like it is bashing something with the stock of the gun. Then play it when an object is used, say when $$ACTION_USE$$ is pressed on a mutant. How would you do this without some convoluted system? All I would need is one line of code to play the animation, db.actor:active_item():play_hud_motion("anim_bash",true,0), then some lines to deal the damage. Probably also a get state check to not allow the animation to play when the weapon is firing or reloading.