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
Need help!
Projektamensia Offline
Junior Member

Posts: 16
Threads: 3
Joined: Oct 2012
Reputation: 0
#11
RE: Need help!

And how can I increase that range then?
11-27-2012, 04:17 PM
Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#12
RE: Need help!

If YC doesn't mention in the video then i would guess either in the .ent or it's not possible.

Though, if you watch the video, YC put's a line inside the .ent file that makes the monster not disappear... Try doing that... Remember this is a custom monster, so it should be in your custom story folder...

Trying is the first step to success.
11-27-2012, 04:30 PM
Find
Projektamensia Offline
Junior Member

Posts: 16
Threads: 3
Joined: Oct 2012
Reputation: 0
#13
RE: Need help!

Nice, I got it working now, thanks for all the help!

Now I just need to fix the loop since I saw it did not worked...
My code is like this:

void OnStart()
{

AddEntityCollideCallback("Player", "monact", "startmonster", false, -1);
AddEntityCollideCallback("Enemy_Grunt", "PNScriptArea", "MonsterFunction2", false, 1);
}


void startmonster(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("Enemy_Grunt", true);
AddTimer("", 1, "MonsterFunction2");
}

void MonsterFunction2(string &in asTimer)
{
for (int i = 1; i <40; i++)
{
AddEnemyPatrolNode("Enemy_Grunt", "PathNodeArea_"+i, 0, "");
}
}




The last pathnode(Pathnode nr. 39) is behind the script box PNScriptArea so he walks through the script box to trigger the loop again but this does not seems to work. Any suggestions? Smile
11-27-2012, 05:09 PM
Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#14
RE: Need help!

(string &in asTimer) This means it's a timer..

When you make a collide function like AddEntityCollideFunction, it will not work with a timer function.
I would do it like this:


Spoiler below!

void OnStart()
{
AddEntityCollideCallback("Player", "monact", "startmonster", false, -1);
AddEntityCollideCallback("Enemy_Grunt", "PNScriptArea", "startmonster", false, 1);
}



void startmonster(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("Enemy_Grunt", true);

for (int i = 1; i <40; i++)AddEnemyPatrolNode("Enemy_Grunt", "PathNodeArea_"+i, 0, "");
}



Are you sure you want this:
AddEntityCollideCallback("Player", "monact", "startmonster", false, -1);

To be false? This means that if the player leaves the area "monact" the monster will go active again.. Maybe you should set it to true?

Trying is the first step to success.
(This post was last modified: 11-27-2012, 05:22 PM by FlawlessHappiness.)
11-27-2012, 05:20 PM
Find
Projektamensia Offline
Junior Member

Posts: 16
Threads: 3
Joined: Oct 2012
Reputation: 0
#15
RE: Need help!

I have watched it like 20 times now and as I can see it is impossible to fix my problem. Sad
11-27-2012, 08:05 PM
Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#16
RE: Need help!

Don't lose hope! Smile Just make it another way than the first idea you got.
You can do as FG already did in the sewers.
A brute that is in the way, out of the entrance, and you have to lure it away with sounds, while running for your life.

Trying is the first step to success.
11-27-2012, 08:16 PM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#17
RE: Need help!

If you've seen the video, then you know that constantly adding path nodes to the monster is not required, since the monster is designed to patrol. The question is whether or not you've set up and added the path nodes to the monster in some kind of circular formation (e.g. 1,2,3... 39,38,37... 1). If they are set up in some kind of linear fashion (e.g. 1,2,3... 39,1,2,3... 39) then going from node 39 to node 1 may be an issue for the monster. The monster is designed to take the shortest path to its next destination, even if there are walls or other objects in the way. If it gets stuck, the game may decide there's no way to reach the beginning node (assuming getting stuck is a condition looked for by the game), which may deactivate the monster.

Tutorials: From Noob to Pro
11-27-2012, 08:48 PM
Website Find
Projektamensia Offline
Junior Member

Posts: 16
Threads: 3
Joined: Oct 2012
Reputation: 0
#18
RE: Need help!

Okay guys, I got it!


I got it working now Tongue Thanks for all your help!!!

You can download our latest alpha here
http://www.moddb.com/mods/the-horrors-of...ersion-310


Notice that it is still in the alpha stage and this update you guys helped me with is not in the alpha you can download there. Our custom story is a really good one since we got a couple of persons who made some game plays with/without commentary and uploaded it to youtube and we got over 2 thousand downloads in total.

Again guys, THANK YOU FOR ALL YOUR HELP and please try our custom story out and give us some feedback(it is our last alpha before the beta realese).
11-28-2012, 09:37 PM
Find




Users browsing this thread: 1 Guest(s)