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


Thread Rating:
  • 2 Vote(s) - 3 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Stupid monster...
christopher231 Offline
Junior Member

Posts: 26
Threads: 4
Joined: Jul 2011
Reputation: 0
#1
Stupid monster...

Hey.
i made this small water part in my level and added a water lurker, but it has to be stupid and it gets stuck on things...
so i wanted to add some path nodes for it to follow so it doesn't get stuck, i found the code for it, but i dont know how to make it follow more then one and continue its rounds.
can some one help me with this one.
07-14-2011, 05:01 AM
Find
waqas12346 Offline
Senior Member

Posts: 352
Threads: 38
Joined: Nov 2010
Reputation: 1
#2
RE: Stupid monster...

Try using this:-
AddEnemyPatrolNode("NameOfTheEnemy", "PathNodeArea_1", 0, "");
AddEnemyPatrolNode("NameOfTheEnemy", "PathNodeArea_2", 0, "");
AddEnemyPatrolNode("NameOfTheEnemy", "PathNodeArea_3", 0, "");

- NameOfTheEnemy= Put a name of the enemy that you have in level editor. Smile
- PathNodeArea= Make sure that you added pathnode close to the others. Sometimes they get stuck and blind Tongue. If your pathnode is up then Enemy may roll round and round like a Dumb. Big Grin
(This post was last modified: 07-14-2011, 10:01 AM by waqas12346.)
07-14-2011, 09:58 AM
Website Find
palistov Offline
Posting Freak

Posts: 1,208
Threads: 67
Joined: Mar 2011
Reputation: 57
#3
RE: Stupid monster...

From my experience, water lurkers don't patrol like grunts do. They just sit still and wait for their prey. To avoid your creepy little fishy friend getting stuck, you need to add patrol nodes at its level around your map. These will help the AI navigate said fishy friend around things like rocks, walls, pipes, corners, etc.

Place them with the area tool (press 8) and make sure they're 1-2.5 meters apart. Any further seems to break the link between the nodes, and the monster won't travel between unliked nodes.

In your debug menu, activate the entity info option. While an enemy is active, you'll see the patrol nodes and their linked edge nodes, allowing you to judge whether the monsters path will make sense.

Good look schooling those water lurkers. Smile

07-14-2011, 11:07 AM
Find
christopher231 Offline
Junior Member

Posts: 26
Threads: 4
Joined: Jul 2011
Reputation: 0
#4
RE: Stupid monster...

ok cool thanks Big Grin
i got an idea tonight where you walk down a hallway and a monster appears in front of you and runs at you and goes in to spoke when it comes near you.
I know these codes for me to use.

void ShowEnemyPlayerPosition(string& asName);
Makes the enemy run to the player, no matter where he is.

void SetEnemyIsHallucination(string& asName, bool abX);
Makes an enemy a hallucination. Hallucinations fade to smoke when they get near the player.

but i don't know what code I use to make the monster appear when i want it to.
void SetEnemyDisabled(string& asName, bool abDisabled); is it this one !?!?!?!
07-14-2011, 03:31 PM
Find
palistov Offline
Posting Freak

Posts: 1,208
Threads: 67
Joined: Mar 2011
Reputation: 57
#5
RE: Stupid monster...

SetEntityActive(string &in name, bool disabled);

Use this function to control entities such as monsters

07-14-2011, 03:42 PM
Find
Hardarm Offline
Posting Freak

Posts: 891
Threads: 39
Joined: Apr 2011
Reputation: 43
#6
RE: Stupid monster...

Just don't use ShowEnemyPlayerPosition. If it spawns right in front of you he anyways see you, And if he doesnt see you anymore he will search. Just add LOTS of pathnodes in the map, A LOT. EVERYWHERE. then you add a patrol node in the HPS and he will reach your position just by going through all these pathnodes you placed Wink

That makes your life easier and makes the enemy more smart and patrolling everywhere.

listen to boards of canada
(This post was last modified: 07-14-2011, 03:58 PM by Hardarm.)
07-14-2011, 03:56 PM
Website Find
christopher231 Offline
Junior Member

Posts: 26
Threads: 4
Joined: Jul 2011
Reputation: 0
#7
RE: Stupid monster...

i just found out with the grunt he has a box to tick next to hallucination!
does that mean i don't need to use the hallucination code ?
07-14-2011, 04:35 PM
Find
Roenlond Offline
Senior Member

Posts: 331
Threads: 3
Joined: Apr 2011
Reputation: 0
#8
RE: Stupid monster...

(07-14-2011, 04:35 PM)christopher231 Wrote: i just found out with the grunt he has a box to tick next to hallucination!
does that mean i don't need to use the hallucination code ?

Yes. Neither do you need to disable triggers if you check the other box. (Monster will never notice you if it's checked)
07-14-2011, 04:54 PM
Find
christopher231 Offline
Junior Member

Posts: 26
Threads: 4
Joined: Jul 2011
Reputation: 0
#9
RE: Stupid monster...

How do i get a monster to appear after i pick up a note ?
This would be helpful, and if you can, can you link me to a vid about it Big Grin
07-16-2011, 03:45 AM
Find
palistov Offline
Posting Freak

Posts: 1,208
Threads: 67
Joined: Mar 2011
Reputation: 57
#10
RE: Stupid monster...

Add a callback function for the note:

void OnStart() { SetEntityCallbackFunc("yournote", "NoteCallback"); }


void NoteCallback(string &in entity, string &in type)
{
if(type == "OnPickup") { //do cool stuff here }
}



07-16-2011, 05:33 AM
Find




Users browsing this thread: 4 Guest(s)