Accurate Shooting Bot

If you are using the war.wdl or a modified version as long as it has the “function attack_fire()” in it, you can fix it so the enemy bot will shoot only when he is facing the player instead of the default way which makes him shoot all over the place and not even hit the player.

This will make the enemy a more accurate shooter. Change the:   vec_to_angle(MY_ANGLE,temp); to this vec_to_angle(MY.PAN,temp);.

This is what it looks like in the war.wdl:

function attack_fire()

{

            while((MY._STATE == _STATE_ATTACK) && (MY._COUNTER > 0))

            {

                        // turn towards player

                        temp.X = player.X - MY.X;

                        temp.Y = player.Y - MY.Y;

                        temp.Z = player.Z - MY.Z;

                    //  vec_to_angle(MY_ANGLE,temp);

                        vec_to_angle(MY.pan,temp); // will always face the player then shoot

                        force = MY._FORCE * 2;

                        actor_turn();

-----------------------------------------------------------.

It’s that easy.


Enjoy,the Mad Dog