Adny
Posting Freak
Posts: 1,766
Threads: 6
Joined: Mar 2012
Reputation:
173
|
RE: enemies are bent
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.
I rate it 3 memes.
|
|
08-11-2012, 02:06 PM |
|