Sauron The King
Junior Member
Posts: 42
Threads: 10
Joined: Oct 2011
Reputation:
0
|
Monster keeps disappearing
Hello,
I'm making a custom story. When you come at a new area, a monster will spawn. He will keep patrolling around 30 pathnodes. But after a while he will just disappear. But if I follow him quietly and don't lose my eye on him, he won't dissappear, because than he will just keep following the Pathnodes.
How can I make the monster keep looping his patroll, so he will never stop or dissapear? (until I reach a certain area, but he will disappear already if I reach a certain area early).
I have pasted the part of the patrolling monster right down here. Who can help?
void OnEnter()
{
AddEntityCollideCallback("Player", "Monster_sleepingrooms", "Grunt_Sleepingrooms", true, 1);
}
void Grunt_Sleepingrooms(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("Grunt_Sleepingrooms", true);
PlayMusic("search_grunt.ogg", true, 2, 0, 1, true);
{for (int x = 0; x <= 4; x += 1)
{ AddEnemyPatrolNode("Grunt_Sleepingrooms", "PathNodeArea_1", 2, "");
AddEnemyPatrolNode("Grunt_Sleepingrooms", "PathNodeArea_2", 0, "");
AddEnemyPatrolNode("Grunt_Sleepingrooms", "PathNodeArea_3", 0, "");
AddEnemyPatrolNode("Grunt_Sleepingrooms", "PathNodeArea_4", 0, "");
AddEnemyPatrolNode("Grunt_Sleepingrooms", "PathNodeArea_5", 0, "");
AddEnemyPatrolNode("Grunt_Sleepingrooms", "PathNodeArea_6", 0, "");
AddEnemyPatrolNode("Grunt_Sleepingrooms", "PathNodeArea_7", 0, "");
AddEnemyPatrolNode("Grunt_Sleepingrooms", "PathNodeArea_8", 0, "");
AddEnemyPatrolNode("Grunt_Sleepingrooms", "PathNodeArea_9", 0, "");
AddEnemyPatrolNode("Grunt_Sleepingrooms", "PathNodeArea_10", 0, "");
AddEnemyPatrolNode("Grunt_Sleepingrooms", "PathNodeArea_11", 0, "");
AddEnemyPatrolNode("Grunt_Sleepingrooms", "PathNodeArea_12", 0, "");
AddEnemyPatrolNode("Grunt_Sleepingrooms", "PathNodeArea_13", 0, "");
AddEnemyPatrolNode("Grunt_Sleepingrooms", "PathNodeArea_14", 0, "");
AddEnemyPatrolNode("Grunt_Sleepingrooms", "PathNodeArea_15", 0, "");
AddEnemyPatrolNode("Grunt_Sleepingrooms", "PathNodeArea_16", 2, "");
AddEnemyPatrolNode("Grunt_Sleepingrooms", "PathNodeArea_17", 0, "");
AddEnemyPatrolNode("Grunt_Sleepingrooms", "PathNodeArea_18", 0, "");
AddEnemyPatrolNode("Grunt_Sleepingrooms", "PathNodeArea_19", 0, "");
AddEnemyPatrolNode("Grunt_Sleepingrooms", "PathNodeArea_20", 0, "");
AddEnemyPatrolNode("Grunt_Sleepingrooms", "PathNodeArea_21", 0, "");
AddEnemyPatrolNode("Grunt_Sleepingrooms", "PathNodeArea_22", 0, "");
AddEnemyPatrolNode("Grunt_Sleepingrooms", "PathNodeArea_23", 0, "");
AddEnemyPatrolNode("Grunt_Sleepingrooms", "PathNodeArea_24", 0, "");
AddEnemyPatrolNode("Grunt_Sleepingrooms", "PathNodeArea_25", 0, "");
AddEnemyPatrolNode("Grunt_Sleepingrooms", "PathNodeArea_26", 0, "");
AddEnemyPatrolNode("Grunt_Sleepingrooms", "PathNodeArea_27", 0, "");
AddEnemyPatrolNode("Grunt_Sleepingrooms", "PathNodeArea_28", 0, "");
AddEnemyPatrolNode("Grunt_Sleepingrooms", "PathNodeArea_29", 0, "");
AddEnemyPatrolNode("Grunt_Sleepingrooms", "PathNodeArea_30", 4, "");
}
}
}
|
|
11-02-2011, 01:37 PM |
|
Unearthlybrutal
Posting Freak
Posts: 775
Threads: 12
Joined: May 2011
Reputation:
26
|
RE: Monster keeps disappearing
I think that it disappears when it gets too far away from you
|
|
11-02-2011, 02:09 PM |
|
flamez3
Posting Freak
Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation:
57
|
RE: Monster keeps disappearing
You have like 200 pathnodes so that he follows them
|
|
11-02-2011, 02:11 PM |
|
Unearthlybrutal
Posting Freak
Posts: 775
Threads: 12
Joined: May 2011
Reputation:
26
|
RE: Monster keeps disappearing
... or the grunt just goes to sleep ...
okay, that wasn't a very good joke
|
|
11-02-2011, 02:13 PM |
|
Your Computer
SCAN ME!
Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation:
235
|
RE: Monster keeps disappearing
Monsters automatically deactivate when the player is out of their activation distance. If you edit the monster, you can increase this distance.
|
|
11-02-2011, 03:12 PM |
|
Unearthlybrutal
Posting Freak
Posts: 775
Threads: 12
Joined: May 2011
Reputation:
26
|
RE: Monster keeps disappearing
(11-02-2011, 03:12 PM)Your Computer Wrote: Monsters automatically deactivate when the player is out of their activation distance. If you edit the monster, you can increase this distance. " <Var Name="ActivationDistance" Value="40" /> "
This?
|
|
11-02-2011, 03:38 PM |
|
flamez3
Posting Freak
Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation:
57
|
RE: Monster keeps disappearing
(11-02-2011, 03:38 PM)Unearthlybrutal Wrote: (11-02-2011, 03:12 PM)Your Computer Wrote: Monsters automatically deactivate when the player is out of their activation distance. If you edit the monster, you can increase this distance. " "
This?
No i think he means using the Model Editor?
|
|
11-02-2011, 03:55 PM |
|
Sauron The King
Junior Member
Posts: 42
Threads: 10
Joined: Oct 2011
Reputation:
0
|
RE: Monster keeps disappearing
Thank you guys, the problem is solved
In Modeleditor just change this:
" <Var Name="ActivationDistance" Value="40" /> "
I've changed it to 9999, so it won't be disappearing again even if I went to Tokyo
|
|
11-02-2011, 07:08 PM |
|
Unearthlybrutal
Posting Freak
Posts: 775
Threads: 12
Joined: May 2011
Reputation:
26
|
RE: Monster keeps disappearing
(11-02-2011, 03:55 PM)flamez3 Wrote: (11-02-2011, 03:38 PM)Unearthlybrutal Wrote: (11-02-2011, 03:12 PM)Your Computer Wrote: Monsters automatically deactivate when the player is out of their activation distance. If you edit the monster, you can increase this distance. " "
This?
No i think he means using the Model Editor? It can be changed with both: editing the .ent file or with model editor
(11-02-2011, 07:08 PM)Sauron The King Wrote: Thank you guys, the problem is solved
In Modeleditor just change this:
" "
I've changed it to 9999, so it won't be disappearing again even if I went to Tokyo
No problem
|
|
11-02-2011, 07:11 PM |
|
palistov
Posting Freak
Posts: 1,208
Threads: 67
Joined: Mar 2011
Reputation:
57
|
RE: Monster keeps disappearing
Monsters will only deactivate if they are idle outside of the player's range. If you give them patrol routes they won't deactivate when out of range.
|
|
11-03-2011, 12:07 AM |
|
|