Frictional Games Forum (read-only)
Beginner help :o - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: Beginner help :o (/thread-12883.html)

Pages: 1 2


RE: Beginner help :o - FinBanana - 01-26-2012

(01-26-2012, 05:22 PM)Tripication Wrote:
(01-26-2012, 05:19 PM)FinBanana Wrote: Yeah, I tried it with

{
AddEntityCollideCallBack("Player","Script_Area1","OpenCabinet",true,1);
}

and it told me about "unexpected token 'if'.


I do have all the needed files because i bought the game at frictionalgames.com
I tried it with and without the spaces between the " and , but still I get the same error. :/
Thanks anyway and thanks in advance.
do exactly that, with nothing else. So remove this


if(ScriptDebugOn())
{
GiveItemFromFile("lantern", "lantern.ent");

for(int i=0;i<10;i++) GiveItemFromFile("tinderbox_"+i, "tinderbox.ent");
}



and have only this in your ENTIRE script for now.


void OnStart()
{
AddEntityCollideCallBack("Player","Script_Area1","OpenCabinet",true,1);
}


void OpenCabinet(string &in asParent, string &in asChild, int alState)
{
SetMoveObjectState("cabinet_nice_1", 1);
}


That should work perfectly assuming all the names of the entities and areas are correct
Code:
void OnStart()
{
AddEntityCollideCallBack("Player","Script_Area1","OpenCabinet",true,1);
}



void OpenCabinet(string &in asParent, string &in asChild, int alState)
{
SetMoveObjectState("cabinet_nice_1", 1);
}

So, my script looks like this now and I still keep getting the same error Confused
I have no idea where the problem could be.
I double-checked all the names for the areas and entities and I see nothing wrong.
Hope somebody could see what is the problem.
Thanks for the help anyway and thanks in advance.




RE: Beginner help :o - Tripication - 01-26-2012

well i'm stumped, and its 3:33 am in Australia, so i'm going to sleep. Good night and good luck


RE: Beginner help :o - FinBanana - 01-26-2012

(01-26-2012, 05:31 PM)Tripication Wrote: well i'm stumped, and its 3:33 am in Australia, so i'm going to sleep. Good night and good luck
Okaay. Thanks anyway and Good night !





RE: Beginner help :o - flamez3 - 01-26-2012

(01-26-2012, 05:31 PM)Tripication Wrote: well i'm stumped, and its 3:33 am in Australia, so i'm going to sleep. Good night and good luck
Lol, its 2:50 for me :3


RE: Beginner help :o - FinBanana - 01-26-2012

Okay, I decided to give up about this part of the script because it's not important for the custom story.
So i guess this is sort of a "solved" case. Unless someone just posts a straight solution. Thanks!


[SOLVED] - FinBanana - 01-30-2012

Ok, I deleted the .hps file and created a new one and now it works fine. Just thought that I should post this that no one thinks I'm still struggling and I need help.

Thanks.