Custom Moves/Attacks for Chasing NPCs

At some point there are gonna be NPCs for condos that chase and attack you, and I thought it would be really cool if you could “code” certain abilities for them.

Basically, how it would work is that in the NPC’s edit menu there would be action slots that can be edited. They would work like if/then statements:

  • ‘If’ would be for inputting what causes the NPC to do the action. For example:
    • If there’s a ledge the NPC can’t walk across, then ___
    • If there’s a wall in the way, then ___
    • If the player throws something toward the NPC, then ___
    • If the NPC is at X health, then ___

It would be really nice if you could have multiple ‘if’ statements added to a single action as well, to allow the NPC to use it in many situations.

  • ‘Then’ would be for inputting the action itself. You could make the NPC do many things, like, for example:
    • jump up a certain height
    • move, either in a set direction or away from the thing they are dodging (grenade, bullets, the player, etc)
    • Find cover/hide from the player’s field of view
    • Play a certain animation

With these tools you could make actions like:

  • If the player is shooting near the NPC, then the NPC will crouch, start rotating, and move X units away from the player’s crosshair to do a dodge roll
  • If the NPC takes 60 damage in one hit, then they cannot do anything for 0.5 seconds and are staggered
  • If the player equips a certain weapon in front of/near an NPC, then it will try to run away from the player
  • If a grenade lands near an NPC, then the NPC will pick the grenade up and throw it toward the player/another enemy NPC
  • etc

A “Ignore no collision” NPC option would be ideal for keeping NPCs within specific areas and you dont wanna use teleporters.

2 Likes