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


Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ShowEnemyPlayerPosition
Hardarm Offline
Posting Freak

Posts: 891
Threads: 39
Joined: Apr 2011
Reputation: 43
#1
ShowEnemyPlayerPosition

When I use this command to an enemy, will he follow pathnodes to reach wherever the player is?
When this command is active I command the enemy to reach one pathnode, that can be reached following some pathnodes, and this is where the player is supposed to go. but will the Patrol node work if ShowEnemyPlayerPosition is activated? so the enemy wont hit a wall but at the same time he will run to the player

listen to boards of canada
(This post was last modified: 07-02-2011, 04:13 PM by Hardarm.)
07-02-2011, 04:03 PM
Website Find
Hardarm Offline
Posting Freak

Posts: 891
Threads: 39
Joined: Apr 2011
Reputation: 43
#2
RE: ShowEnemyPlayerPosition

Hello? Please I'd want an answer as soon as possible Sad

listen to boards of canada
07-02-2011, 07:13 PM
Website Find
WatzUpzPeepz Offline
Member

Posts: 106
Threads: 12
Joined: May 2011
Reputation: 0
#3
RE: ShowEnemyPlayerPosition

Uhh...Well I dont exactly understand what you mean but I think that when that command is activated the enemy will run to where the player is, overiding the pathnodes just as if the enemy has actually seen the player and when the enemy has lost sight of the player it will return to its path,well at least I think so I'm not familiar with the ShowEnemyPlayerPosition command

07-02-2011, 10:17 PM
Find
JenniferOrange Offline
Senior Member

Posts: 424
Threads: 43
Joined: Jun 2011
Reputation: 33
#4
RE: ShowEnemyPlayerPosition

ShowEnemyPlayerPosition does not use pathnodes, making this true is like putting a beacon on the player; no matter where he runs the monster will always find him. If you want your monster to follow a certain path, use the command AddEnemyPatrolNode. Which is
void AddEnemyPatrolNode(string& asName, string& asNodeName, float afWaitTime, string& asAnimation);
The first parameter is the internal name of the enemy, the second parameter is the name of the pathnode, the third parameter is the time in seconds that the monster waits at the pathnode until he continues, and the last parameter is the animation played when the enemy reaches the pathnode. I'm not an expert on this because I don't use monsters in my custom stories, but I'd assume it'd look like this:
AddEnemyPatrolNode("monster_name", "pathnode_name", 5, "animation_name");
To add multiple pathnodes, I think you just duplicate that command for as many times as you need it. When you're done with the monster and he doesn't need to use his patrol path anymore, use the command ClearEnemyPatrolNodes(string& asEnemyName); Enemy name being obviously the name of the enemy. I hope this works for you, tell me if you get any errors and I'll try my best to help you!

Ba-da bing, ba-da boom.
07-02-2011, 10:29 PM
Find
palistov Offline
Posting Freak

Posts: 1,208
Threads: 67
Joined: Mar 2011
Reputation: 57
#5
RE: ShowEnemyPlayerPosition

Path nodes don't need to be assigned for the monster to use them. The AI will take care of that. If the monster's path is blocked, it will use nearby patrol nodes which provide a path around whatever is in the way, regardless of whether it is hunting the player or simply patrolling. As long as there are path nodes along the path the player runs the monster will not derp in the corner.

Short answer: Yes.

07-02-2011, 10:36 PM
Find
JenniferOrange Offline
Senior Member

Posts: 424
Threads: 43
Joined: Jun 2011
Reputation: 33
#6
RE: ShowEnemyPlayerPosition

(07-02-2011, 10:36 PM)palistov Wrote: ..the monster will not derp in the corner.

Lmao. Derp in the corner. XD I like that.


Ba-da bing, ba-da boom.
07-02-2011, 10:49 PM
Find
Hardarm Offline
Posting Freak

Posts: 891
Threads: 39
Joined: Apr 2011
Reputation: 43
#7
RE: ShowEnemyPlayerPosition

@JenniferOrange

I know how patrol nodes works, thank you anyways Big Grin

@Palistov

So you mean if I use that command the monster will always check for pathnodes if it is stuck?
And they say Amnesia's Monster's AI is bad... bleaf.

listen to boards of canada
(This post was last modified: 07-03-2011, 12:24 AM by Hardarm.)
07-03-2011, 12:23 AM
Website Find
palistov Offline
Posting Freak

Posts: 1,208
Threads: 67
Joined: Mar 2011
Reputation: 57
#8
RE: ShowEnemyPlayerPosition

It isn't bad it's just very simple. It's only bad when there are no path nodes, or poorly placed paths.

07-03-2011, 01:08 AM
Find




Users browsing this thread: 1 Guest(s)