Frictional Games Forum (read-only)

Full Version: script dosen't work!!!
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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;
}
}
Moved to CS&M section
(08-04-2011, 09:36 PM)plutomaniac Wrote: [ -> ]Movex to CS&M section

??? sorry kind of new to this stuff
Moved to Custom Stories and Modifications section as this is a custom story development question.
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
The spacing doesn't realy matter I guess.

Double check names and see if there's any misstypings.
(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
(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
(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