Chase issue?

O Ilusionista

Captain 100K
Sometimes the npc gets stuck doing Freespecial3 off screen.
Also ai chase is broken when outside of a certain range the enemies stand still

There is a bug on the engine related with Chasing. If you use wide screen resolution, some enemies just get stuck on their places and only attacks when someone is near. I have this on my mod, where I have 3 different enemies with Chase, but 2 simply got stuck on his place for no reason. I even added that script, but one of those enemies still get stuck.

Skull Kingz, how do you changed the main menu position and names? By script, I presume.
 
O Ilusionista said:
... If you use wide screen resolution, some enemies just get stuck on their places and only attacks when someone is near. I have this on my mod, where I have 3 different enemies with Chase, but 2 simply got stuck on his place for no reason. I even added that script, but one of those enemies still get stuck.

The chase AI is controlled by range in Idle, as is NPC follow behavior. Before calling it a bug, I'd suggest playing around with that a bit. The defaults are meant for standard resolution.

DC
 
That is the question: its not working as it should be, hence why I called it a bug.

I am not talking about an entity that stops to follow whatever it should be and starts to wander freely. The entity simply get stuck and stop moving, remaining in place playing its IDLE anin. IOW, its not stopping to chase, but its stopping to move at all. you can see it here after 12:30 (pay attention to the fat guy)

Father & Son Gameplay - Avengers United Battle Force

Or I am missing something?
ps: about the range in the IDLE to control the chase, I will include it on the manual. Btw, the ITALIC and BOLD buttons are not showing.

ps2: the manual says that the range controls FOLLOW, not CHASE. Or it works for both cases?

Uses range setting in *idle* animation to determine how close it will follow. If the npc exceeds the minimum range and no entities it is hostile towards are nearby, it will move to the spawning entity normally.
 
I just tested w/my Golden Axe project and can't reproduce your error. And by test I mean "turned it on", because I use Chase for all basic mook AI. They do exactly what they should - follow the player directly, Run to close distance, jump to get past obstacles and so on.

DC
 
Yeah, its something fishy. Because I made 3 copies using the same template. The template works, but the copies no. They stop to move for no reason.

This is my char:

Header
name Fatman
health 80
speed 6
type enemy
gfxshadow 1
hostile player npc
candamage player npc obstacle
projectilehit enemy obstacle
aimove Chase
aggression 40
falldie  2
blockodds 1

the attacks - the first is the one at the video
anim attack1
loop 0
range 0 150
followcond 1
followanim 1

hitflash flash2
delay 15
offset 92 115
bbox 81 59 33 57
frame data/chars/enemies/fatman/attack00.png
@cmd target 2 1.5
frame data/chars/enemies/fatman/attack00.png
delay 5
@cmd dash
sound data/sounds/vuu2.wav
frame data/chars/enemies/fatman/attack01.png
sound data/chars/enemies/fatman/attack.wav
frame data/chars/enemies/fatman/attack02.png
delay 24
attack 83 57 55 62 15 1 0 0 10 15
frame data/chars/enemies/fatman/attack03.png
delay 10
attack 0 0 0 0 0 0 0 0 0 0
@cmd bmtFriction 2 0 2
frame data/chars/enemies/fatman/attack02.png
@cmd bmtFriction 2 0 2
frame data/chars/enemies/fatman/attack01.png
@cmd bmtFriction 2 0 2
frame data/chars/enemies/fatman/attack00.png

anim attack2
loop 0
range 0 80
delay 1 0
offset 92 115
landframe 9
dropframe 6
quakeframe 9 2 20
hitflash flash4
bbox 66 62 46 55
frame data/chars/enemies/fatman/attack00.png
@cmd targetL 3 0 0
frame data/chars/enemies/fatman/attack00.png
@cmd leap 4.5
sound data/sounds/vuu2.wav
frame data/chars/enemies/fatman/jump01.png
sound data/chars/enemies/fatman/dive.wav
frame data/chars/enemies/fatman/jump02.png
frame data/chars/enemies/fatman/jump03.png
delay 40
frame data/chars/enemies/fatman/jump04.png
delay 8
offset 88 115
@cmd dasher NULL() -3 NULL()
frame data/chars/enemies/fatman/jump05.png
delay 1000
attack 74 75 50 38 20 2 0 0 10 15
frame data/chars/enemies/fatman/fall01.png
delay 100
frame data/chars/enemies/fatman/fall02.png
attack 0 0 0 0 0 0 0 0 0 0
delay 10
@cmd spawn01 "stompfx" 0 0 0
frame data/chars/enemies/fatman/fall03.png
delay 60
@cmd dasher 1 1 0
frame data/chars/enemies/fatman/fall03.png
delay 8
offset 88 110
daley 8
frame data/chars/enemies/fatman/fall02.png
offset 88 107
frame data/chars/enemies/fatman/fall01.png
frame data/chars/enemies/fatman/jump05.png
offset 92 115
bbox 81 59 33 57
frame data/chars/enemies/fatman/attack00.png

the follow
anim follow1
loop 0
delay 14
landframe 5
offset 92 115
bbox 81 59 33 57
@script
if(frame==0)
{
      int SFX1 = loadsample("data/chars/enemies/fatman/laught.wav");
      void vSelf = getlocalvar("self");
            int r = rand()%30;
            if(r > 0){
              playsample(SFX1, 0, 120, 120, 100, 0);
    }

        }
@end_script
@cmd stop
frame data/chars/enemies/fatman/attack03.png
delay 4
@cmd velo001 -1.3 0 3.9
frame data/chars/enemies/fatman/attack03.png
frame data/chars/enemies/fatman/attack02.png
frame data/chars/enemies/fatman/attack01.png
delay 100
frame data/chars/enemies/fatman/jump01.png
delay 20
frame data/chars/enemies/fatman/attack00.png

the idle, with scripts

anim idle
loop 1
offset 92 115
bbox 68 65 45 52
delay 20
@script
                void self = getlocalvar("self");
                    int MindControl = getglobalvar("MindControl");
    int Type = getentityproperty(self, "type");

    if(frame==1 && MindControl==NULL() && Type==openborconstant("TYPE_NPC")){
      performattack(self,openborconstant("ANI_FOLLOW10"));
    }
                int  pos  = openborvariant("xpos");
                int  selfx    = getentityproperty(self, "x");
                if ((selfx > pos + 480 )&&(frame == 0)){
                changeentityproperty(self, "direction", 0);
                performattack(self, openborconstant("ANI_FOLLOW2"));
      }
      if ((selfx < pos + 1 )&&(frame == 0)){
                changeentityproperty(self, "direction", 1);
                performattack(self, openborconstant("ANI_FOLLOW2"));
      }
@end_script
frame data/chars/enemies/fatman/idle.png
frame data/chars/enemies/fatman/idle2.png

I can't see anything wrong with that.
 
Skull Kingz, how do you changed the main menu position and names? By script, I presume.

I was able to do that by modifying some scripts that White Dragon used in his TMNT mod, and I also broke down Volcanic's Rocket Viper 2.41 mod to study some of his scripts also. I control it all by using "title_script". White Dragon's scripts are easier to work with.
 
Just like any of the attack animations. Just add a range setting to it. Every animation has a range, and they sometimes do different things.

See here for detail.
 
No problem about resurrection - that's perfectly OK here. Problem is I just don't know what your issue is. Chase works exactly like it should for me, and that's with loads and loads of script messing with things.

Just to get a clean test I even took a copy of the original BOR module and gave an enemy chase + run to see what would happen. Got exactly what was expected.

DC
 
@DC - I recall it's a pain to get the range setting in good way so they follow nicely, maybe post the code you had so he can compare.

I remember having to trial and error to get this right in a mod, but I can't access it right now to check what I had.

If the npc exceeds the minimum range and no entities it is hostile towards are nearby, it will move to the spawning entity normally.

This is what is usually the problem, getting this minimum value just right so they don't always get too far away and keep teleporting back to player.  A bad setting and anytime you walk they will be playing catch up.
 
nsw25 said:
Aggression settings have no effect as there seems to b a bug preventing normal and chase modes from working in these situations

Ahh, there it is. Still not sure what the specific issue is, but this explains why mine work and yours won't. I use chase mode by itself. No other aimodes.

DC

 
Back
Top Bottom