09-17-2010, 03:08 AM
Right, so I was just wondering what scripting language Frictional used for Amnesia. Is it an in-house (built from scratch) language or is it based on some other language such as C and its counterparts? I've been trying to get into the scripting part of modding and I've done well this far but I've hit a snag it seems due to my inexperience in scripting
so I'm creating an encounter with a grunt that triggers when you try to open a door to an area
this is what I have in the OnStart() function. Some of the default stuff is from the Tools wiki and most of the actual encounter code I borrowed off of this post http://www.frictionalgames.com/forum/thr...l#pid36726
It looks fine to me however when I try to compile/recompile the script in-game I get an "ERR: (3,1) Expected ',' or ";"" error. An answer to my question and to my problem would be appreciated, thanks.
so I'm creating an encounter with a grunt that triggers when you try to open a door to an area
this is what I have in the OnStart() function. Some of the default stuff is from the Tools wiki and most of the actual encounter code I borrowed off of this post http://www.frictionalgames.com/forum/thr...l#pid36726
Quote:void OnStart()
SetEntityPlayerInteractCallback("castle_02", "FunctionToCall", true);
void FunctionToCall()
{
PlaySoundAtEntity("grunt_encounter", "/sounds/enemy/grunt/enabled02.ogg", castle, 0, false);
SetEntityActive("servant_grunt", true);
if(ScriptDebugOn())
{
GiveItemFromFile("lantern", "lantern.ent");
for(int i=0;i<10;i++) GiveItemFromFile("tinderbox_"+i, "tinderbox.ent");
}
}
void OnEnter()
{
}
void OnLeave()
{
}
It looks fine to me however when I try to compile/recompile the script in-game I get an "ERR: (3,1) Expected ',' or ";"" error. An answer to my question and to my problem would be appreciated, thanks.