• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Friendly NPC

Status
Not open for further replies.
Level 7
Joined
Dec 5, 2013
Messages
280
How to make unit which is 100% controlled by AI but is on the player 1 side and is hostile to player 2?
 
Level 7
Joined
Dec 5, 2013
Messages
280
But the unit must not do anything until player 2 comes in range and when player 2 leaves the area or is dead, npc is inactive again. Just like any boss in world of warcraft.
 

yip

yip

Level 3
Joined
Jan 15, 2014
Messages
69
But the unit must not do anything until player 2 comes in range and when player 2 leaves the area or is dead, npc is inactive again. Just like any boss in world of warcraft.

Without an AI/controller, that's how any hostile enemy unit will behave, I think... they'll only attack if you come within their acquisition range, and only chase until a certain distance from their placement point is reached. If you run away, they'll go back.

Of course, you could have triggers order the unit to manually return to it's position at any time. (ex: Every 2 seconds, if Region 'xyz' contains units owned by player 2 equal to false, then do Unit - Issue order targeting a point etc)

With triggers you can probably make something more accurate, yeah.
 
Status
Not open for further replies.
Top