The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Enemy States
Newsman Waterpaper Offline
Senior Member

Posts: 735
Threads: 20
Joined: May 2013
Reputation: 39
#1
Information  Enemy States

PHP Code: (Select All)
stringGetEnemyStateName(string &in asName);

Returns the name of the state a specified enemy is current in

asName Internal name of the enemy 

Ever since this was added to the game with the 1.3 update, it has always confused me and I felt the description of it didn't really make things clear me but today I found what you could do with it. I'm surprised no-one brought it up.

Here are the states I have discovered that an enemy can be in so far.

Spoiler below!

Hunt: Enemy is chasing the player.

HuntPause: Enemy slows down after attacking the player.

Attack: Enemy is attacking the player.

Patrol: Enemy is patrolling/following pathnodes.

Wait: Enemy is waiting at a pathnode.

Search: Enemy is searching for the player after being alerted.

Alert: Enemy is alerted to the player.

Investigate: Enemy is investigating a sound made by a player or hears the player.

Track: Enemy is tracking the player if Track is used in IdleBehaviour option for manpig enemy type.

BreakDoor: Enemy is breaking down a door.


You can use the GetEnemyStateName function the same way as any other Get function. Example:
PHP Code: (Select All)
if(GetEnemyStateName("Enemy") == "Hunt")
 {
  
/////insert fancy code here////////////
 
}
if(
GetEnemyStateName("Enemy") == "Investigate")
 {
  
AlertEnemyOfPlayerPresence("Enemy");
 } 

Hopefully, this would allow people to mess around with enemies more and have some interesting encounters.

I'm surprised no-one has talked about this. I would really like to hear people's ideas about this and see what cool stuff they come up with.
(This post was last modified: 08-26-2016, 08:46 PM by Newsman Waterpaper.)
08-26-2016, 08:45 PM
Find


Messages In This Thread
Enemy States - by Newsman Waterpaper - 08-26-2016, 08:45 PM
RE: Enemy States - by Mudbill - 08-26-2016, 08:51 PM



Users browsing this thread: 1 Guest(s)