Frictional Games Forum (read-only)
script dosen't work!!! - 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: script dosen't work!!! (/thread-9592.html)



script dosen't work!!! - zecuro - 08-04-2011

hey need some help on a script its a script i took from frictionalwiki and well its suppose to open a book shelf with a lever wellhere the script and a video
http://www.mediafire.com/?gjz7gf6u8mog4pa



void OnStart()
{
SetEntityConnectionStateChangeCallback("lever", "func_shelf");
}


void func_shelf(string &in asEntity, int alState)
{
if (alState == 1)
{
SetMoveObjectState("secret_door",1.0f);
PlaySoundAtEntity("", "quest_completed.snt", "secret_door_move_1", 0, false);
return;
}
}


RE: script dosen't work!!! - plutomaniac - 08-04-2011

Moved to CS&M section


RE: script dosen't work!!! - zecuro - 08-04-2011

(08-04-2011, 09:36 PM)plutomaniac Wrote: Movex to CS&M section

??? sorry kind of new to this stuff



RE: script dosen't work!!! - Tanshaydar - 08-04-2011

Moved to Custom Stories and Modifications section as this is a custom story development question.


RE: script dosen't work!!! - GreyFox - 08-04-2011

I'm not very good at this stuff so this probably won't work but....

SetMoveObjectState("secret_door",1.0f);

Should there be a space inbetween "secret_door", 1.0f);

Right now you don't have a space, thats just what i've seen out of the ordinary.

Hopefully that'll fix it for you.

-GreyFox


RE: script dosen't work!!! - xtron - 08-04-2011

The spacing doesn't realy matter I guess.

Double check names and see if there's any misstypings.


RE: script dosen't work!!! - zecuro - 08-05-2011

(08-04-2011, 11:57 PM)xtron Wrote: The spacing doesn't realy matter I guess.

Double check names and see if there's any misstypings.

did you check the video its a desktop recorder iand i show you exactly what i've done its a short video


RE: script dosen't work!!! - xtron - 08-05-2011

(08-05-2011, 01:16 AM)zecuro Wrote:
(08-04-2011, 11:57 PM)xtron Wrote: The spacing doesn't realy matter I guess.

Double check names and see if there's any misstypings.

did you check the video its a desktop recorder iand i show you exactly what i've done its a short video

aaaaah, I were too lazy yesterday but I can do it now.
I tried your code and it worked pretty damn good.

Script:
Code:
void OnStart()
{
SetEntityConnectionStateChangeCallback("lever", "func_shelf");
}

void func_shelf(string &in asEntity, int alState)
{
if (alState == 1)
{
SetMoveObjectState("shelf",1.0f);
PlaySoundAtEntity("", "quest_completed.snt", "secret_door_move_1", 0, false);
return;
}
}

Click here to download the map


RE: script dosen't work!!! - zecuro - 08-05-2011

(08-05-2011, 10:48 AM)xtron Wrote:
(08-05-2011, 01:16 AM)zecuro Wrote:
(08-04-2011, 11:57 PM)xtron Wrote: The spacing doesn't realy matter I guess.

Double check names and see if there's any misstypings.

did you check the video its a desktop recorder iand i show you exactly what i've done its a short video

aaaaah, I were too lazy yesterday but I can do it now.
I tried your code and it worked pretty damn good.

Script:
Code:
void OnStart()
{
SetEntityConnectionStateChangeCallback("lever", "func_shelf");
}

void func_shelf(string &in asEntity, int alState)
{
if (alState == 1)
{
SetMoveObjectState("shelf",1.0f);
PlaySoundAtEntity("", "quest_completed.snt", "secret_door_move_1", 0, false);
return;
}
}

Click here to download the map
after all that complication i must say i rather just push a bookshelf is i more easy