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


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

Posts: 2,718
Threads: 85
Joined: Mar 2011
Reputation: 81
#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
Website Find
Viperdream Offline
Member

Posts: 124
Threads: 16
Joined: Jan 2011
Reputation: 0
#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
Danny Boy Offline
Posting Freak

Posts: 2,718
Threads: 85
Joined: Mar 2011
Reputation: 81
#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
Website Find
Viperdream Offline
Member

Posts: 124
Threads: 16
Joined: Jan 2011
Reputation: 0
#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
Danny Boy Offline
Posting Freak

Posts: 2,718
Threads: 85
Joined: Mar 2011
Reputation: 81
#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
Website Find
Viperdream Offline
Member

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

Yay Big Grin

03-13-2011, 08:40 PM
Find
Danny Boy Offline
Posting Freak

Posts: 2,718
Threads: 85
Joined: Mar 2011
Reputation: 81
#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
Website Find
Hooumeri Offline
Member

Posts: 57
Threads: 11
Joined: Oct 2010
Reputation: 0
#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
Danny Boy Offline
Posting Freak

Posts: 2,718
Threads: 85
Joined: Mar 2011
Reputation: 81
#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
Website Find
Danny Boy Offline
Posting Freak

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

help me please Sad
03-19-2011, 04:43 PM
Website Find




Users browsing this thread: 2 Guest(s)