Skip to content

NPCs Update

Latest
Compare
Choose a tag to compare
@Wabtey Wabtey released this 24 Sep 09:14
fee0492

v0.4.0 Full Commits History Demo

Preview

2023-09-23.19-49-42.mp4
2023-09-23.19-41-22.mp4
2023-09-23.19-50-08.mp4

Landmarks

Added

  • Landmarks Sensor
    • Hall
    • Temple
    • Secret Room
  • Landmarks forcing direction (flip_x)

Changed

  • globalize PlayerLocation to Location
    • The component Location is given to
      • Each npc
      • Each landmark
    • Location is still a State to keep the quick and easy access to the player's location
  • globalize Spritesheet Indices

Dialog

  • YML Dialog and reorganize ui components

NPCs' Behavior

Refactored

  • Follow Behavior
    • add and use a FollowRangeSensor to detect the follow_target's hitbox
  • JustWalk to LandmarkSeeking

Added

  • Detection Behavior
    • TargetSeeker
    • DetectionRangeSensor used to analyze all entering characters' hitbox and compare with their TargetType
      • if it correpond: Deactivate this sensor and start the Chase Behavior with the component Chaser.
  • Chase Behavior
    • Chaser
    • PursuitRangeSensor used to analyze all exiting characters' hitbox and compare with their Chaser's target
      • if it correpond: Deactivate this sensor and remove the Chase Behavior.
    • The CharacterCloseSensor used to detect all entering Chasers hitbox and start a Combat if the Chaser's target is the parent of the CharacterCloseSensor.