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
Looping? (Still need help)
SiderealStop Offline
Junior Member

Posts: 32
Threads: 3
Joined: Jun 2012
Reputation: 0
#21
RE: Looping?

Mm I had no problem with hiding. I'd hide until it was almost all the way around then go find it and it was still there. It was only at the end of the path that it would go away.

Anyway, tested it. So far it doesn't follow any path. I did get into its view and if followed me out around the corner but when I hid and it lost sight of me, it just stood there, not going anywhere. @-@

*edit*
At least it's not crashing! 8D
(This post was last modified: 06-24-2012, 09:02 PM by SiderealStop.)
06-24-2012, 09:02 PM
Find
Cruzore Offline
Senior Member

Posts: 301
Threads: 2
Joined: Jun 2012
Reputation: 37
#22
RE: Looping?

No idea then Sad Someone else has to help you, sorry.
06-24-2012, 09:05 PM
Find
SiderealStop Offline
Junior Member

Posts: 32
Threads: 3
Joined: Jun 2012
Reputation: 0
#23
RE: Looping?

Thanks so much for your help though! =D I'll keep looking at it-

Anyone else have any idea? =3
06-24-2012, 09:07 PM
Find
Cruzore Offline
Senior Member

Posts: 301
Threads: 2
Joined: Jun 2012
Reputation: 37
#24
RE: Looping? (Still need help)

Okay, 1 more idea though: Place as many patrol nodes as you need, and set them active in the script, as you did before. However, use a different grunt:
open the grunt .ent file at the model editor, go to settings>user defined variables.
the 8th one should be activation distance. set it high(there was a way to check how long you need it, but I forgot. Just set it high and experiment) and save as>into the "entities" folder in your custom story folder(make sure it's a different name though, it can be anything). then, place a normal grunt and use import mesh or something, and browse to your new made grunt. That should work. If not, delete all path nodes in the level editor, save the map, delete the path node file in your maps folder, and place new path nodes again.

http://wiki.frictionalgames.com/hpl2/tut...rpathnodes This might help you understand it. You need the area, in this site you can refer it to the PNscriptarea one, at 1 end of the loop and...yeah. Somehow you'll make it.
(This post was last modified: 06-24-2012, 09:31 PM by Cruzore.)
06-24-2012, 09:21 PM
Find
SiderealStop Offline
Junior Member

Posts: 32
Threads: 3
Joined: Jun 2012
Reputation: 0
#25
RE: Looping? (Still need help)

Haha thanks for all the help! I'll take a look at that. Also tried what you said, still not working ;A;
06-24-2012, 10:00 PM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#26
RE: Looping? (Still need help)

Eh, it'd much easier if i just referred you to http://www.youtube.com/watch?v=xWPU6frXm...8&index=19

Tutorials: From Noob to Pro
06-25-2012, 12:51 AM
Website Find
Damascus Offline
Senior Member

Posts: 646
Threads: 118
Joined: Mar 2012
Reputation: 29
#27
RE: Looping? (Still need help)

Here's the script mentioned earlier that I ususally refer to, with some explanation added. For loops are fairly advanced scripting, though, so it takes some studying.

It repeats the function multiple times, and the second number (9 in my script) should be one more than the number of pathnodes. All your pathnodes should be numbered in order in the route you want your monster to take.

PHP Code: (Select All)
for (int i 09i++)  //repeats function for values of i from 1 to 9
    
{
        if (
== 9)
        {
            
0;    //when i reaches 9, it resets to 0 instead, restarting the counter
        
}
        
AddEnemyPatrolNode("servant_grunt_1""PathNodeArea_"+i0.001f"");  //adds patrol nodes for enemy looping from 1 to 8
    


Your enemy will still deactivate if you hide from it, though, even if it hasn't finished its loop.

(This post was last modified: 06-25-2012, 08:09 AM by Damascus.)
06-25-2012, 08:08 AM
Find
SiderealStop Offline
Junior Member

Posts: 32
Threads: 3
Joined: Jun 2012
Reputation: 0
#28
RE: Looping? (Still need help)

Oh cool o3o Trying that out. Though...I have 13 path nodes, would I replace 9 with 14?

*edit*
And thanks Your Computer ^^ I'll take a look at that! =3

*edit 2*
I tried the script, replaced the 9 with 14 and it works - at least doesn't crash - but I want the player to be able to hide on the opposite side of the room and the grunt still patrols. Do you know any way to make it so it doesn't deactivate if you hide from it? =3

Would changing the 'activation distance' in the model editor help with that or is that only for when it first starts patrolling/first gets activated?
(This post was last modified: 06-25-2012, 06:03 PM by SiderealStop.)
06-25-2012, 05:51 PM
Find
Damascus Offline
Senior Member

Posts: 646
Threads: 118
Joined: Mar 2012
Reputation: 29
#29
RE: Looping? (Still need help)

Unfortunately I haven't found any way to keep the grunt from disappearing. :/ Seems to be hard wired into the game.

06-25-2012, 06:51 PM
Find
Cruzore Offline
Senior Member

Posts: 301
Threads: 2
Joined: Jun 2012
Reputation: 37
#30
RE: Looping? (Still need help)

changing the activation distance to a higher number should prevent the grunt from dissapearing, but I am not sure about that.
06-25-2012, 07:00 PM
Find




Users browsing this thread: 1 Guest(s)