Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[HELP] Goddamn levers.
Victor Offline
Member

Posts: 83
Threads: 19
Joined: Oct 2011
Reputation: 2
#1
[HELP] Goddamn levers.


I'm getting a lot of problems with this part of the script:


void chand()
{
if (GetLocalVarInt lever_small01_1 == lever_1_state)
(
CompleteQuest("PerformLeverTaskCompleted", "levertask"));
PlaySoundAtEntity("", "quest_completed.snt", "Player", 0, false);
PlaySoundAtEntity("", "general_chain.ogg", "Player", 0, false);
PlaySoundAtEntity("", "door_level_engine_open.ogg", "Player", 0, false);
SetEntityActive("sadchand", false);
SetEntityActive("happychand", true);
CheckPoint ("", "auto1", "", "", "");
SetEntityActive("block_box_3", true);
SetEntityActive("block_box_4", false);
)
}

The thing is, I pull the lever and the chandelier changes. But the crash is saying that I need to express the value of stuff, and to put some '(' in awkward places. Can you help me?
12-07-2011, 01:25 PM
Find
Khyrpa Offline
Senior Member

Posts: 638
Threads: 10
Joined: Apr 2011
Reputation: 24
#2
RE: [HELP] Goddamn levers.


void chand()
{
if (GetLocalVarInt lever_small01_1 == lever_1_state)
{
CompleteQuest("PerformLeverTaskCompleted", "levertask"));
PlaySoundAtEntity("", "quest_completed.snt", "Player", 0, false);
PlaySoundAtEntity("", "general_chain.ogg", "Player", 0, false);
PlaySoundAtEntity("", "door_level_engine_open.ogg", "Player", 0, false);
SetEntityActive("sadchand", false);
SetEntityActive("happychand", true);
CheckPoint ("", "auto1", "", "", "");
SetEntityActive("block_box_3", true);
SetEntityActive("block_box_4", false);
}
}


I just took a quick glance, works?

12-07-2011, 01:26 PM
Find
flamez3 Offline
Posting Freak

Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation: 57
#3
RE: [HELP] Goddamn levers.

(12-07-2011, 01:25 PM)Victor Wrote: I'm getting a lot of problems with this part of the script:


void chand()
{
if (GetLocalVarInt lever_small01_1 == lever_1_state)
(
CompleteQuest("PerformLeverTaskCompleted", "levertask"));
PlaySoundAtEntity("", "quest_completed.snt", "Player", 0, false);
PlaySoundAtEntity("", "general_chain.ogg", "Player", 0, false);
PlaySoundAtEntity("", "door_level_engine_open.ogg", "Player", 0, false);
SetEntityActive("sadchand", false);
SetEntityActive("happychand", true);
CheckPoint ("", "auto1", "", "", "");
SetEntityActive("block_box_3", true);
SetEntityActive("block_box_4", false);
)
}

The thing is, I pull the lever and the chandelier changes. But the crash is saying that I need to express the value of stuff, and to put some '(' in awkward places. Can you help me?

Also, put quotation marks outside of lever_small01_1, that might help.


(This post was last modified: 12-07-2011, 01:35 PM by flamez3.)
12-07-2011, 01:35 PM
Find
Victor Offline
Member

Posts: 83
Threads: 19
Joined: Oct 2011
Reputation: 2
#4
RE: [HELP] Goddamn levers.

Now it says that I need a ';' over here:

P;laySoundAtEntity("", "quest_completed.snt", "Player", 0, false);
awkward
12-09-2011, 06:25 PM
Find
Obliviator27 Offline
Posting Freak

Posts: 792
Threads: 10
Joined: Jul 2011
Reputation: 66
#5
RE: [HELP] Goddamn levers.

If you ask me, it would be easiest just to set up a connectionstatechangecallback.
In the level editor, under the entity tab for the lever, there should be a box with ConnectionStateChangeCallback (or something like that) Just type in whatever you like. As an example, I'll just do LeverPull.
Then, you can do this.
PHP Code: (Select All)
void LeverPull(string &in EntityNameint alState)
{
    if(
alState == 1)
    {
       
//stuff you want done here
    
}


12-10-2011, 12:42 AM
Find
Fanskapi Offline
Junior Member

Posts: 23
Threads: 5
Joined: Nov 2011
Reputation: 0
#6
RE: [HELP] Goddamn levers.

CompleteQuest("PerformLeverTaskCompleted", "levertask"));
PlaySoundAtEntity("", "quest_completed.snt", "Player", 0, false);

Notice the extra ) after "levertask", thats why it says that you need to put an ; there. You actually don't, just delete the ).
Download Notepad++ (or some similiar coding program), it will help you alot.
12-12-2011, 09:35 AM
Find




Users browsing this thread: 1 Guest(s)