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!
The chaser Offline
Posting Freak

Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation: 113
#2
RE: Need help!

(11-26-2012, 01:32 PM)Projektamensia Wrote: Hello there guys!


Me and my three friends are currently working on a school project and of course we chosen an Amnesia Mod.
Right now we are stuck in the programming and we need your help!


Problem:

We have just picked up the grunt and placed him on the map, programmed him to follow some waypoints in a circle and now we want it to loop. I have been looking all over the internet for some guides but I can not get it working...
I also want to know if you know where to place the grunt because when the player enters the area "monact" the grunt activates but he does not start to walk. The grunt just stands still.

We have 39 waypoints on the map and two script boxes.
Script box nr. 1: monact, activates the monster when the player touches it.
Script box nr. 2: PNScriptArea, SHOULD make the grunt loop when he touches it and make the grunt walk the same waypoints as before.

Hope you can give me some tips on the area boxes placement or/and some programming.
SORRY FOR MY BAD ENGLISH!

Code:

void OnStart()
{

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




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



void MonsterFunction2(string &in asParent, string &in asChild, int alState)
{
for (int i = 1; i <40; i++)
{
AddEnemyPatrolNode("grunt", "PathNodeArea_"+i, 0, "");
}
}
I think it would be way more better if:



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




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



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

It's the only thing I can help in. If there's a .map_cache delete it.

This web may be useful for you:

http://wiki.frictionalgames.com/hpl2/start

THE OTHERWORLD (WIP)
[Image: k6vbdhu]

Aculy iz dolan.
11-26-2012, 02:43 PM
Find


Messages In This Thread
Need help! - by Projektamensia - 11-26-2012, 01:32 PM
RE: Need help! - by The chaser - 11-26-2012, 02:43 PM
RE: Need help! - by Projektamensia - 11-26-2012, 11:17 PM
RE: Need help! - by Damascus - 11-27-2012, 02:33 AM
RE: Need help! - by Projektamensia - 11-27-2012, 02:01 PM
RE: Need help! - by The chaser - 11-27-2012, 02:06 PM
RE: Need help! - by Projektamensia - 11-27-2012, 02:19 PM
RE: Need help! - by FlawlessHappiness - 11-27-2012, 02:33 PM
RE: Need help! - by Projektamensia - 11-27-2012, 04:00 PM
RE: Need help! - by FlawlessHappiness - 11-27-2012, 04:12 PM
RE: Need help! - by Projektamensia - 11-27-2012, 04:17 PM
RE: Need help! - by FlawlessHappiness - 11-27-2012, 04:30 PM
RE: Need help! - by Projektamensia - 11-27-2012, 05:09 PM
RE: Need help! - by FlawlessHappiness - 11-27-2012, 05:20 PM
RE: Need help! - by Projektamensia - 11-27-2012, 08:05 PM
RE: Need help! - by FlawlessHappiness - 11-27-2012, 08:16 PM
RE: Need help! - by Your Computer - 11-27-2012, 08:48 PM
RE: Need help! - by Projektamensia - 11-28-2012, 09:37 PM



Users browsing this thread: 8 Guest(s)