Author Topic: When NPCs attack  (Read 1348 times)

Wizard Indie Games

  • Level 7: Tilbub
  • *
  • Posts: 145
    • View Profile
When NPCs attack
« on: June 28, 2020, 06:18:54 PM »
Is it possible to make NPCs attack and fire projectiles?
Developer of:

AI Anomaly
Dickie A Cumming
Someone Cloned The President
Freedom! Do or Die
Pension Day
Red Mist: Rivers of Blood

Available on Steam

War

  • "The top player is here!"
  • Level 20: Nobom
  • *
  • Posts: 1490
    • View Profile
    • My website
Re: When NPCs attack
« Reply #1 on: June 28, 2020, 07:13:40 PM »
Is it possible to make NPCs attack and fire projectiles?
Sadly no.
Hey, wassup wassup? My name is Warrior555MainsGanon (but just call me War) and I'm the main guy behind Megaman Zero Online and the upcoming Matt's Adventure! I don't speak often here but I'm a very friendly lad so if you wanna talk, don't hesitate!

Gizgord

  • average
  • Level 18: Statix
  • *
  • Posts: 835
    • View Profile
Re: When NPCs attack
« Reply #2 on: June 28, 2020, 09:17:35 PM »
Is it possible to make NPCs attack and fire projectiles?
not with NPC's per se, but using character movement commands you can make a player do these actions.

disable a player (use player 2 if you can), remove the npc and spawn the player in this place (you can't replace an NPC with a player, so make use of invinsible spawn blocks).
Code: [Select]
co op = true
disable player 2
destroy npc [NPC ID]
create player 2, [spawn ID]
for player 2
change character = [NPC ID]
I'm not sure if this works well at all, but you could give it a shot.
« Last Edit: June 28, 2020, 10:30:13 PM by Gizgord »

CGM

  • Christian, 3D artist, former Platform Builder gamdev
  • Master Builder
  • *
  • Posts: 3836
    • View Profile
Re: When NPCs attack
« Reply #3 on: June 28, 2020, 11:58:12 PM »
You can tell P2 to move to the NPC's exact coordinates.

Wizard Indie Games

  • Level 7: Tilbub
  • *
  • Posts: 145
    • View Profile
Re: When NPCs attack
« Reply #4 on: June 29, 2020, 06:34:49 AM »
Thanks. I'll try it out.
Developer of:

AI Anomaly
Dickie A Cumming
Someone Cloned The President
Freedom! Do or Die
Pension Day
Red Mist: Rivers of Blood

Available on Steam