Usually attaching an action to an entity is the better way as it is mor intuitive and understandable by more people. But at least maybe just a matter of personal preferences...

If you attach gun_shoot to an entity in WED this will of course work. But you're calling gun_shoot from the main function and the main function is of course not attached to anything.


Always learn from history, to be sure you make the same mistakes again...