zecuro
Member
Posts: 162
Threads: 33
Joined: Jul 2011
Reputation:
3
|
script dosen't work!!!
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;
}
}
|
|
08-04-2011, 04:58 PM |
|
plutomaniac
Super Moderator
Posts: 6,368
Threads: 45
Joined: May 2011
Reputation:
183
|
RE: script dosen't work!!!
Moved to CS&M section
(This post was last modified: 08-05-2011, 09:37 AM by plutomaniac.)
|
|
08-04-2011, 09:36 PM |
|
zecuro
Member
Posts: 162
Threads: 33
Joined: Jul 2011
Reputation:
3
|
RE: script dosen't work!!!
(08-04-2011, 09:36 PM)plutomaniac Wrote: Movex to CS&M section
??? sorry kind of new to this stuff
|
|
08-04-2011, 09:39 PM |
|
Tanshaydar
From Beyond
Posts: 3,085
Threads: 17
Joined: Mar 2009
Reputation:
67
|
RE: script dosen't work!!!
Moved to Custom Stories and Modifications section as this is a custom story development question.
|
|
08-04-2011, 09:43 PM |
|
GreyFox
Member
Posts: 162
Threads: 23
Joined: Jul 2011
Reputation:
2
|
RE: script dosen't work!!!
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
Current Project
Forgotten
|
|
08-04-2011, 09:59 PM |
|
xtron
Senior Member
Posts: 402
Threads: 37
Joined: May 2011
Reputation:
2
|
RE: script dosen't work!!!
The spacing doesn't realy matter I guess.
Double check names and see if there's any misstypings.
|
|
08-04-2011, 11:57 PM |
|
zecuro
Member
Posts: 162
Threads: 33
Joined: Jul 2011
Reputation:
3
|
RE: script dosen't work!!!
(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 |
|
xtron
Senior Member
Posts: 402
Threads: 37
Joined: May 2011
Reputation:
2
|
RE: script dosen't work!!!
(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:
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
(This post was last modified: 08-05-2011, 11:10 AM by xtron.)
|
|
08-05-2011, 10:48 AM |
|
zecuro
Member
Posts: 162
Threads: 33
Joined: Jul 2011
Reputation:
3
|
RE: script dosen't work!!!
(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:
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
|
|
08-05-2011, 07:05 PM |
|
|