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 with making scripts - Amnesia CS !!
BesTCracK Offline
Member

Posts: 60
Threads: 14
Joined: Nov 2011
Reputation: 0
#1
Need help with making scripts - Amnesia CS !!

Well guys I would really enjoy some help from this community on how to make scripts in Amnesia. Well I watched many tutorials and did exactly what they do but still it doesnt work I just pass script area and nothing happens. I checked if is everything correct and yes it is so I would really enjoy some help from you guys because Im making an epic custom story but without scripts it sucks you know Big Grin Anyway thanks for any answers you will give me Smile
11-25-2011, 08:14 PM
Find
Unearthlybrutal Offline
Posting Freak

Posts: 775
Threads: 12
Joined: May 2011
Reputation: 26
#2
RE: Need help with making scripts - Amnesia CS !!

http://wiki.frictionalgames.com/hpl2/tutorials/start
Seen this? Would be helpfulSmile

When Life No Longer Exists
Full-conversion mod
11-25-2011, 08:35 PM
Website Find
BesTCracK Offline
Member

Posts: 60
Threads: 14
Joined: Nov 2011
Reputation: 0
#3
RE: Need help with making scripts - Amnesia CS !!

Yes I seen that , even engine scripts too but still cant imagine how that works Tongue Sad
11-25-2011, 08:52 PM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#4
RE: Need help with making scripts - Amnesia CS !!

AddEntityCollideCallback()

Tutorials: From Noob to Pro
11-25-2011, 09:33 PM
Website Find
flamez3 Offline
Posting Freak

Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation: 57
#5
RE: Need help with making scripts - Amnesia CS !!

If Your computer's suggestion doesn't work; maybe post the script for us?

11-26-2011, 03:42 AM
Find
BesTCracK Offline
Member

Posts: 60
Threads: 14
Joined: Nov 2011
Reputation: 0
#6
RE: Need help with making scripts - Amnesia CS !!

To be honest I watched many tutorials but Your Computer's is really different than all other and I really dont understand it ... I got something with the lever but I try to post the script here so give me some time Smile
11-26-2011, 08:15 AM
Find
BesTCracK Offline
Member

Posts: 60
Threads: 14
Joined: Nov 2011
Reputation: 0
#7
RE: Need help with making scripts - Amnesia CS !!


void OnStart()
{
SetEntityPlayerInteractCallback("lantern_1", "Scare1", true);
}

void OnEnter()
{

}

void OnLeave()
{

}

void Scare1(string &in asEntity)
{
SetEntityActive("servant_grunt_1", true)
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_1", 3, "Idle")
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_2", 0, "Idle")
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_3", 0, "Idle")
SetEntityActive("servant_grunt_1", false)
}


THERE IT IS ! This is what I have exactly in the script file and still it doesnt work Sad((
11-26-2011, 01:59 PM
Find
flamez3 Offline
Posting Freak

Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation: 57
#8
RE: Need help with making scripts - Amnesia CS !!

(11-26-2011, 01:59 PM)BesTCracK Wrote: void OnStart()
{
SetEntityPlayerInteractCallback("lantern_1", "Scare1", true);
}

void OnEnter()
{

}

void OnLeave()
{

}

void Scare1(string &in asEntity)
{
SetEntityActive("servant_grunt_1", true);
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_1", 3, "Idle");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_2", 0, "Idle");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_3", 0, "Idle");
SetEntityActive("servant_grunt_1", false);
}


THERE IT IS ! This is what I have exactly in the script file and still it doesnt work Sad((
You need to put a ; after the end of every line in a function block
And your putting your commands down thinking they will only play after the one above has done its thing. That's not how it works with Angelscript. It will do everything at once. For the servant to deactive after all that stuff has happened (him going to the pathnodes etc) you need to add a timer, like this:

AddTimer("internalnameofthistimer", howlonguntiltimerdoesitswork, "nameofthetimertolinkto");
(I know its hard to understand by the way i set it out ^^)

You put that in the Scare 1 function block, than put this anywhere but the void Onstart place or any other function blocks:

void nameoftimer(string &in asTimer)
{
SetEntityActive("servant_grunt_1", false);
}

Hope that helps

(This post was last modified: 11-26-2011, 03:07 PM by flamez3.)
11-26-2011, 03:03 PM
Find
BesTCracK Offline
Member

Posts: 60
Threads: 14
Joined: Nov 2011
Reputation: 0
#9
RE: Need help with making scripts - Amnesia CS !!


void OnStart()
{
SetEntityPlayerInteractCallback("lantern_1", "Scare1", true);
}
void Scare1(string &in asEntity)
{
SetEntityActive("servant_grunt_1", true);
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_1", 3, "Idle");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_2", 0, "Idle");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_3", 0, "Idle");
}
void OnEnter()
{

}

void OnLeave()
{

}


Man I understand you what you mean by the timer got it but please can you be so helpful and copy this what i have put right now and repair every mistake i have got here ? I would be so thankful to you if i get it working Smile
11-26-2011, 03:19 PM
Find
BesTCracK Offline
Member

Posts: 60
Threads: 14
Joined: Nov 2011
Reputation: 0
#10
RE: Need help with making scripts - Amnesia CS !!

Well anyone who can help me ?
OMG GOD YEAH !!!! FFS !!!! flamez3 I WANNA FUCK YOU !!!! IT WORKS !!!! Thanks EVERYONE helping me figure it out !! Im going to work on my custom story Smile
(This post was last modified: 11-26-2011, 07:02 PM by BesTCracK.)
11-26-2011, 06:04 PM
Find




Users browsing this thread: 1 Guest(s)