Making townsfolk report you to a guard
This commit is contained in:
@@ -1057,9 +1057,11 @@ var AISprite = function(game, x, y, key, frame) {
|
||||
this.action_reportplayer = function()
|
||||
{
|
||||
if ( (this.path.length < 1) || this.path_index >= this.path.length) {
|
||||
if ( hasState(this, STATE_RUNNINGTOLIGHT) == false ) {
|
||||
var aiSprites = game.state.states.game.aiSprites;
|
||||
this.target = nearestInGroup(this, aiSprites, "townsfolk-guard");
|
||||
}
|
||||
}
|
||||
if ( this.target !== null ) {
|
||||
var targetseesyou = false;
|
||||
if (this.target.canSeeSprite) {
|
||||
|
||||
Reference in New Issue
Block a user