Scripted_sequence interrupted by player?

I’m currently working on a mod where the majority of the gameplay involves sneaking around enemy soldiers. To test this, I’ve created a simple scene where a combine_soldier patrols back and forth infinitely between two scripted_sequences. However, the soldier fails to react to the player while moving betweeen the two entities, meaning I can walk straight past his face without a reaction. Shooting him results in normal AI behaviour, though.
Does anyone know if there’s a way of achieving what I’m looking for?

ai_scripted_sequence perhaps.

I don’t know much about Scripted Sequences and Animations, but maybe you can make a trigger_once function that will disable the infinite animation loop?

There is no such entity. I’m assuming you’re talking about aiscripted_schedule? Trying that now.

Well, I tried by using the OnFoundPlayer output but the problem is that the npc does not seem to find the player if it’s in the middle of moving to a position, which is utter bullshit in my opinion.

Hmm… Well maybe instead of making an infinite loop, you can cut the animation short?

Aiscripted_schedule did the job. It’s a lot more complicated than using scripted_sequence since there aren’t nearly as many functions or outputs/inputs, though. Only problem left is that the standard combine soldier has got eagle vision and spots you five hundred meters away…

Can’t you use the ai_changetarget entity triggered by a trigger_once entity to make the npc’s target to the player?

Well, when’s the trigger once supposed to be triggered?

I don’t know you could have it around the area of the combine?

True, but the point of him patrolling in a pattern is that the player is supposed to wait until he’s facing the opposite direction and then sneak past.


But maybe it’d be possible to parent a trigger that represents his FOV to him (that’d be pretty retarded by programming standards, but it’d work out pretty well).
I’m going to give that a try.


You’ve got to be kidding me, that actually worked!
Haha, I made it so that when he sees you he dies, looks silly.