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
Monster keeps disappearing
Sauron The King Offline
Junior Member

Posts: 42
Threads: 10
Joined: Oct 2011
Reputation: 0
#1
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, "");
    }
}
}
(This post was last modified: 11-02-2011, 01:40 PM by Sauron The King.)
11-02-2011, 01:37 PM
Find
Unearthlybrutal Offline
Posting Freak

Posts: 775
Threads: 12
Joined: May 2011
Reputation: 26
#2
RE: Monster keeps disappearing

I think that it disappears when it gets too far away from you

When Life No Longer Exists
Full-conversion mod
(This post was last modified: 11-02-2011, 02:10 PM by Unearthlybrutal.)
11-02-2011, 02:09 PM
Website Find
flamez3 Offline
Posting Freak

Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation: 57
#3
RE: Monster keeps disappearing

You have like 200 pathnodes so that he follows them Big Grin

11-02-2011, 02:11 PM
Find
Unearthlybrutal Offline
Posting Freak

Posts: 775
Threads: 12
Joined: May 2011
Reputation: 26
#4
RE: Monster keeps disappearing

... or the grunt just goes to sleepBig Grin...

okay, that wasn't a very good joke

When Life No Longer Exists
Full-conversion mod
11-02-2011, 02:13 PM
Website Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#5
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.

Tutorials: From Noob to Pro
11-02-2011, 03:12 PM
Website Find
Unearthlybrutal Offline
Posting Freak

Posts: 775
Threads: 12
Joined: May 2011
Reputation: 26
#6
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?

When Life No Longer Exists
Full-conversion mod
11-02-2011, 03:38 PM
Website Find
flamez3 Offline
Posting Freak

Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation: 57
#7
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
Find
Sauron The King Offline
Junior Member

Posts: 42
Threads: 10
Joined: Oct 2011
Reputation: 0
#8
RE: Monster keeps disappearing

Thank you guys, the problem is solved Smile
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
Find
Unearthlybrutal Offline
Posting Freak

Posts: 775
Threads: 12
Joined: May 2011
Reputation: 26
#9
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 Smile
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 problemSmile

When Life No Longer Exists
Full-conversion mod
(This post was last modified: 11-02-2011, 07:12 PM by Unearthlybrutal.)
11-02-2011, 07:11 PM
Website Find
palistov Offline
Posting Freak

Posts: 1,208
Threads: 67
Joined: Mar 2011
Reputation: 57
#10
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
Find




Users browsing this thread: 3 Guest(s)