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(NodePath) var _visibility_path: NodePath
|
||||||
|
export(int) var _player_follow_pill_level = 3
|
||||||
|
|
||||||
var _visibility: Area
|
var _visibility: Area
|
||||||
|
|
||||||
@ -20,8 +21,10 @@ func _on_body_entered_visibility(body: PhysicsBody):
|
|||||||
|
|
||||||
if body.is_in_group("Player"):
|
if body.is_in_group("Player"):
|
||||||
Logger.info("Seeing player!")
|
Logger.info("Seeing player!")
|
||||||
# TODO: Check if the Player is in an area where they shouldn't be
|
|
||||||
|
|
||||||
|
# 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
|
current_target = body.transform.origin
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user