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


Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[ok not that Solved] How to make enemys patrol
Author Message
Danny Boy Offline
Posting Freak

Posts: 2,718
Joined: Mar 2011
Reputation: 81
Post: #1
[ok not that Solved] How to make enemys patrol

Hi hmm does eny one knows how to make a grunt or brute to patrol? i have read many stuff mentioning it but i don't know how to use them =/

btw iff you also know how to make a monster to spawn wend i open a door or cabinet that would be awsome Big Grin

[EDIT] ok i am realy not happy about my patrol monster -_- if he doesn't see me it works just fine but iff i does see me he beaves like some pathnodes do not exist if you want to see that youself downloa my testmap in the showcas its called super alpha

heres the code if it helps you

void PickupKey(string &in entity)
{
PlayMusic("11_event_dog", false, 5, 5, 10, true);
SetEntityActive("servant_grunt_1", true);
AddEnemyPatrolNode("servant_grunt_1","PathNodeArea_1",0,"");
{
AddEnemyPatrolNode("servant_grunt_1","PathNodeArea_2",4,"");
{
AddEnemyPatrolNode("servant_grunt_1","PathNodeArea_3",10,"");
{
AddEnemyPatrolNode("servant_grunt_1","PathNodeArea_4",0,"");
{
AddEnemyPatrolNode("servant_grunt_1","PathNodeArea_5",4,"");
{
AddEnemyPatrolNode("servant_grunt_1","PathNodeArea_6",4,"");
{
AddEnemyPatrolNode("servant_grunt_1","PathNodeArea_7",4,"");
{
AddEnemyPatrolNode("servant_grunt_1","PathNodeArea_8",4,"");
{
AddEnemyPatrolNode("servant_grunt_1","PathNodeArea_9",4,"");
{
AddEnemyPatrolNode("servant_grunt_1","PathNodeArea_10",4,"");

}
}
}

}

}
}
}
}
}
}
(This post was last modified: 03-19-2011 04:41 PM by Danny Boy.)
03-13-2011 06:27 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Viperdream Offline
Member

Posts: 124
Joined: Jan 2011
Reputation: 0
Post: #2
RE: How to make enemys patrol

For the patrolling thing? You can just do this:
AddEnemyPatrolNode("tai_1", "PathNodeArea_1", 10000.0f, "IdleExtra3");

But then he just stands there and I don't think that's what you are looking for :<
Anyway, if the player is close enough. Then he will return to his first path node after reaching the last one though.
You could try something with that.

For the spawn, do this:
SetEntityPlayerInteractCallback("cabinet", "monsterspawn", true);

The cabinet is the entity the player has to interact with to activate the function. "monsterspawn" is the function.
And then add a script for the function
void monsterspawn(string &in entity)
{
SetEntityActive("monster", true);
}

(This post was last modified: 03-13-2011 06:35 PM by Viperdream.)
03-13-2011 06:34 PM
Find all posts by this user Quote this message in a reply
Danny Boy Offline
Posting Freak

Posts: 2,718
Joined: Mar 2011
Reputation: 81
Post: #3
RE: How to make enemys patrol

Hey the spawn thing works! thank you

although the the patrol thingy its not like i wanted =/

but still thank you... Btw... how can i make a door open? i know how to close them and lock them... but i don't know how to open =/
03-13-2011 07:27 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Viperdream Offline
Member

Posts: 124
Joined: Jan 2011
Reputation: 0
Post: #4
RE: [still unsolved] How to make enemys patrol

SetSwingDoorClosed("door", false, true);

"door" is the entity, false means that the door will open and not close, and the last true means that it has effects.

Same goes to unlock them.
SetSwingDoorLocked("door", false, true);

03-13-2011 08:10 PM
Find all posts by this user Quote this message in a reply
Danny Boy Offline
Posting Freak

Posts: 2,718
Joined: Mar 2011
Reputation: 81
Post: #5
RE: [still unsolved] How to make enemys patrol

Thank you very much!

you will be in the "thanks to:" section of my custom's story end credits ^_^
03-13-2011 08:32 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Viperdream Offline
Member

Posts: 124
Joined: Jan 2011
Reputation: 0
Post: #6
RE: [still unsolved] How to make enemys patrol

Yay Big Grin

03-13-2011 08:40 PM
Find all posts by this user Quote this message in a reply
Danny Boy Offline
Posting Freak

Posts: 2,718
Joined: Mar 2011
Reputation: 81
Post: #7
RE: [still unsolved] How to make enemys patrol

Waaa i still can't make Mr. face to patrol xC i have done a patrol node and he looks too glishy is animation looks very odd.... and he sometimes desapears! please some one explain to me how to make them patrol... or tell me were i can learn it.
03-16-2011 06:58 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Hooumeri Offline
Member

Posts: 57
Joined: Oct 2010
Reputation: 0
Post: #8
RE: [still unsolved] How to make enemys patrol

Did you use path or pos nodes? Please include that section of the script here.
03-16-2011 09:24 PM
Find all posts by this user Quote this message in a reply
Danny Boy Offline
Posting Freak

Posts: 2,718
Joined: Mar 2011
Reputation: 81
Post: #9
RE: [still unsolved] How to make enemys patrol

i have used the path ones... but never mind i figure it out by my self.
03-16-2011 09:31 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Danny Boy Offline
Posting Freak

Posts: 2,718
Joined: Mar 2011
Reputation: 81
Post: #10
RE: [ok not that Solved] How to make enemys patrol

help me please Sad
03-19-2011 04:43 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)