Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
  • 0
DynamiteKaitorn

Enemy firing shots even when out of sight?

Question

Posted (edited)
Spoiler

actor NMEBossPony01 15046
{
health 4000
speed 12
height 76
radius 24
painchance 64
monster
+BOSSDEATH
+floatbob
+NOBLOOD
STATES
    {
        Spawn:
            POSS BCDE 20 A_look
            loop
        
        see:
            POSS G 6 A_chase
            Goto see+1
        
        Missile:
        POSS K 8 A_FaceTarget
        POSS L 8 
        TNT1 A 0 A_CustomMissile ("BOSS2BOLT", 40, 10, 0, 0, 0)
        POSS M 8
        goto see
        
        
        pain:
        POSS O 8 
        POSS P 8 
        POSS Q 8
        goto see
        
        Death:
            POSS S 8 A_SCREAM
            POSS TUV 8
            POSS W -1 A_NoBlocking
            stop
    }
}

This is my code so far for my second boss I'm about to implement into my TMoD 3D project. For what ever reason, this boss keeps trying to shoot at me despite me not being in range. Most of the code is from the previous boss (though touched up to work with boss 2's model animations) and the previous boss does not have this error. Any idea why this boss has a habit of trying to kill me even when I literally can't be seen through a thick wall?

 

edit:

forgot to mention but I HAVE tried using A_MonsterRefire and it's various types but so far it's all a dud. :l

Share this post


Link to post

2 answers to this question

Recommended Posts

  • 3

I think "Goto see+1" is the problem, the "+1" is the state after See which is the Missile state which fires and then returns to See again.  Probably need to use "loop" keyword instead.

Share this post


Link to post
  • 0

I agree with andrewj, but here is a more detailed explanation.  Sometimes Goto See+1 is useful, if you want to use the first frame in See only the first time you enter the See state, but in this case, See has only 1 frame and the next frame in the code is the first frame in Missile.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×