Platform Builder Forums

Main => General Discussion => Topic started by: Wizard Indie Games on June 28, 2020, 06:18:54 PM

Title: When NPCs attack
Post by: Wizard Indie Games on June 28, 2020, 06:18:54 PM
Is it possible to make NPCs attack and fire projectiles?
Title: Re: When NPCs attack
Post by: War on June 28, 2020, 07:13:40 PM
Is it possible to make NPCs attack and fire projectiles?
Sadly no.
Title: Re: When NPCs attack
Post by: Gizgord 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.
Title: Re: When NPCs attack
Post by: CGM on June 28, 2020, 11:58:12 PM
You can tell P2 to move to the NPC's exact coordinates.
Title: Re: When NPCs attack
Post by: Wizard Indie Games on June 29, 2020, 06:34:49 AM
Thanks. I'll try it out.