Frictional Games Forum (read-only)

Full Version: enemies are bent
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
when I activate a monster it is wrong, his back to the player. Why?

P.S. the monster in level editor is straight, are in the game is wrong
Use path nodes to influence which direction you want him to go; alternatively, if you want him to instantly chase the player you can use ShowEnemyPlayerPosition. Here are both of those functions:

ShowEnemyPlayerPosition(string& asName);

asName = name of enemy


AddEnemyPatrolNode(string& asName, string& asNodeName, float afWaitTime, string& asAnimation);

asName = name of the enemy
asNodeName = name of the path node (found under 8 in the level editor)
afWaitTime = time the enemy waits at a node (0 will make them wait a default amount of time, if you want the enemy to instantly move to the next, use 0.1f)
asAnimation = the animation to play at each node.


Unless you're making a jumpscare map, I'd advise against spawning an enemy in plain sight of the player; try spawning him in an area where the player can't instantly see him, then use one of the aforementioned functions to bring him to the player.

Hope that helped.
Perfect, now work