Meldewesen only follows player with low pill level
This commit is contained in:
parent
ff1d85a325
commit
761ff2f264
@ -2,6 +2,7 @@ extends NPC
|
||||
|
||||
|
||||
export(NodePath) var _visibility_path: NodePath
|
||||
export(int) var _player_follow_pill_level = 3
|
||||
|
||||
var _visibility: Area
|
||||
|
||||
@ -20,9 +21,11 @@ func _on_body_entered_visibility(body: PhysicsBody):
|
||||
|
||||
if body.is_in_group("Player"):
|
||||
Logger.info("Seeing player!")
|
||||
# TODO: Check if the Player is in an area where they shouldn't be
|
||||
|
||||
current_target = body.transform.origin
|
||||
# If the player didn't take enough pills lately, they're suspicious -> Run towards them!
|
||||
if Pills.get_round_level() <= _player_follow_pill_level:
|
||||
Logger.info("The player's pill level is too low - following!")
|
||||
current_target = body.transform.origin
|
||||
|
||||
|
||||
func _on_body_exited_visibility(body: PhysicsBody):
|
||||
|
Loading…
x
Reference in New Issue
Block a user