Alright, I managed to get it working !
I built a simple gun turret, with no animation. I simply use it as a clickable.
Then, when this turret is clicked, the Python script switches the view to a camera in front of the barrel, and disables avatar movement.
The player can still pan the camera to aim (this way I didn't have to rig manually a whole aiming system).
When the jump key is pressed, the script asks the engine to find the nearest object in the center of the screen (which means it can find the exact location of the impact, the name of the object and the distance to the camera). If this object has a responder or a python file attached, the script can trigger it (this is how rocks break and shrooms move when shot in Teledahn).
It also tells the game to trigger all the bullet managers of all objects on this path, which puts decals on all these objects. I didn't bother with particles, but since it's engine-managed, it should be easy to setup in Max.
It doesn't have sounds, since they are handled by responders, but again it should be easy to setup.
- Show Spoiler
- shootingthewall.png (1009.48 KiB) Viewed 5439 times
Yeah, I used a random texture for the decal...