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


Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script Help Adding mementos to locked doors?
The chaser Offline
Posting Freak

Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation: 113
#11
RE: Adding mementos to locked doors?

That means to be that there's a missing bracket, ;, or parenthesis.

THE OTHERWORLD (WIP)
[Image: k6vbdhu]

Aculy iz dolan.
11-05-2012, 02:33 PM
Find
Tiger Away
Posting Freak

Posts: 1,874
Threads: 16
Joined: Nov 2012
Reputation: 55
#12
RE: Adding mementos to locked doors?

(11-05-2012, 02:33 PM)The chaser Wrote: That means to be that there's a missing bracket, ;, or parenthesis.
Ok, thanks. I will check through the script Smile
11-05-2012, 04:03 PM
Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#13
RE: Adding mementos to locked doors?

If you can't find it, post the script here. The whole script

Trying is the first step to success.
11-05-2012, 04:29 PM
Find
Tiger Away
Posting Freak

Posts: 1,874
Threads: 16
Joined: Nov 2012
Reputation: 55
#14
RE: Adding mementos to locked doors?

ok, here it is:

Spoiler below!


void OnStart()
{
AddEntityCollideCallback("Player", "ChangeLevelScript_1", "ChangeMap_1", true, 1);
}

void ChangeMap_1 (string &in asParent, string &in asChild, int alState);
{
ChangeMap("InsideCabin.map", "PlayerStartArea_2, "player_jump6.ogg", "player_bodyfall5.ogg");
}

if(GetSwingDoorLocked("BlockedDoor") == true);
{
AddQuest("BlockedDoorQuest", "BlockedDoorQuest");
}


void OnEnter()
{
SetSkyBoxActive(true);
SetSkyBoxTexture("NightSky.dds");
}

(This post was last modified: 11-05-2012, 05:34 PM by Tiger.)
11-05-2012, 05:34 PM
Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#15
RE: Adding mementos to locked doors?

Is this your full script?

Well the only thing i can find is: void ChangeMap_1 (string &in asParent, string &in asChild, int alState);
There shouldn't be a space

Trying is the first step to success.
11-06-2012, 11:27 AM
Find
Adny Offline
Posting Freak

Posts: 1,766
Threads: 6
Joined: Mar 2012
Reputation: 173
#16
RE: Adding mementos to locked doors?

(11-05-2012, 05:34 PM)Tigerwaw Wrote: ok, here it is:

Spoiler below!


void OnStart()
{
AddEntityCollideCallback("Player", "ChangeLevelScript_1", "ChangeMap_1", true, 1);
}

void ChangeMap_1 (string &in asParent, string &in asChild, int alState);
{
ChangeMap("InsideCabin.map", "PlayerStartArea_2, "player_jump6.ogg", "player_bodyfall5.ogg");
}

if(GetSwingDoorLocked("BlockedDoor") == true);
{
AddQuest("BlockedDoorQuest", "BlockedDoorQuest");
}


void OnEnter()
{
SetSkyBoxActive(true);
SetSkyBoxTexture("NightSky.dds");
}

Hello!

ChangeMap("InsideCabin.map", "PlayerStartArea_2, "player_jump6.ogg", "player_bodyfall5.ogg");


After PlayerStartArea_2, you missed a quotation mark. If you're using notepad++ or geany (which you should be using for scripting) be sure to set the language to C++; this color codes everything and makes mistakes like that easier to point out.

Hope that helped!

I rate it 3 memes.
11-06-2012, 11:30 AM
Find
The chaser Offline
Posting Freak

Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation: 113
#17
RE: Adding mementos to locked doors?

(11-06-2012, 11:27 AM)beecake Wrote: Is this your full script?

Well the only thing i can find is: void ChangeMap_1 (string &in asParent, string &in asChild, int alState);
There shouldn't be a space
Shouldn't it be:

void ChangeMap_1 (string &in asParent, string &in asChild, int alState)

THE OTHERWORLD (WIP)
[Image: k6vbdhu]

Aculy iz dolan.
11-06-2012, 12:34 PM
Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#18
RE: Adding mementos to locked doors?

(11-06-2012, 12:34 PM)The chaser Wrote:
(11-06-2012, 11:27 AM)beecake Wrote: Is this your full script?

Well the only thing i can find is: void ChangeMap_1 (string &in asParent, string &in asChild, int alState);
There shouldn't be a space
Shouldn't it be:

void ChangeMap_1 (string &in asParent, string &in asChild, int alState)
I meant there should be space between 1 and (

Trying is the first step to success.
11-06-2012, 01:36 PM
Find
The chaser Offline
Posting Freak

Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation: 113
#19
RE: Adding mementos to locked doors?

(11-06-2012, 01:36 PM)beecake Wrote:
(11-06-2012, 12:34 PM)The chaser Wrote:
(11-06-2012, 11:27 AM)beecake Wrote: Is this your full script?

Well the only thing i can find is: void ChangeMap_1 (string &in asParent, string &in asChild, int alState);
There shouldn't be a space
Shouldn't it be:

void ChangeMap_1 (string &in asParent, string &in asChild, int alState)
I meant there should be space between 1 and (
It doesn't matter Wink A space doesn't do really anything to the script.

THE OTHERWORLD (WIP)
[Image: k6vbdhu]

Aculy iz dolan.
11-06-2012, 01:53 PM
Find
craven7 Offline
Member

Posts: 50
Threads: 8
Joined: Aug 2012
Reputation: 1
#20
RE: Adding mementos to locked doors?

if(GetSwingDoorLocked("BlockedDoor") == true);

{

AddQuest("BlockedDoorQuest", "BlockedDoorQuest");

}

the semicolon after the condition needs to be removed.
Also (the bigger problem I guess) your if (the code I posted 2 lines above) is not in a function/methode.

If you want to add a memento to a locked door I would do it like this:

SetEntityPlayerInteractCallback("door","interactLockedDoor",true);

void interactLockedDoor(string &in item)
{
    AddQuest("","lockedDoor");
}
(This post was last modified: 11-06-2012, 02:20 PM by craven7.)
11-06-2012, 02:16 PM
Find




Users browsing this thread: 1 Guest(s)