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


Cant load to next map!!.
Jumpman Offline
Junior Member

Posts: 31
Threads: 10
Joined: May 2011
Reputation: 0
#1
Cant load to next map!!.

I need some help with the leveldoor. I have a map where I have set the leveldoor locked, and when I use the key to open it, It wont load to the next map, it's still just locked. But if I dont set it on locked and click on it (with or without the key) It will load to the next level. Plz help.
Thx Smile
05-09-2011, 01:04 PM
Find
Roenlond Offline
Senior Member

Posts: 331
Threads: 3
Joined: Apr 2011
Reputation: 0
#2
RE: Cant load to next map!!.

Post the script you're using - the key is not unlocking the door properly. There's probably an error somewhere.
05-09-2011, 01:13 PM
Find
Jumpman Offline
Junior Member

Posts: 31
Threads: 10
Joined: May 2011
Reputation: 0
#3
RE: Cant load to next map!!.

This is the script Im useing:

void OnEnter()
{
AddUseItemCallback("","ReddoorKey_1", "Reddoor", "UsedReddoorKey_1", true);
}
void UsedReddoorKey_1(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("Reddoor", false, true);
RemoveItem("ReddoorKey_1");
}
void InteractReddoor(string &in asEntity)
{
if(GetSwingDoorLocked("Reddoor")== true)
SetMessage("mapone", "ReddoorMessage", 5.0f);
}
05-09-2011, 01:31 PM
Find
Fomzo Offline
Senior Member

Posts: 351
Threads: 13
Joined: Mar 2011
Reputation: 4
#4
RE: Cant load to next map!!.

Eeeee, I suppose it's Technical Support or Custom Stories and Modifications' issue??
05-09-2011, 02:23 PM
Find
Jumpman Offline
Junior Member

Posts: 31
Threads: 10
Joined: May 2011
Reputation: 0
#5
RE: Cant load to next map!!.

aah.. sorry, my first time on this site.. but plz help if you know the problem Smile
05-09-2011, 02:41 PM
Find
Roenlond Offline
Senior Member

Posts: 331
Threads: 3
Joined: Apr 2011
Reputation: 0
#6
RE: Cant load to next map!!.

Level doors are not unlocked using SetSwingDoorLocked, but rather SetLevelDoorLocked(string& asName, bool abLocked);

so: SetLevelDoorLocked("Reddoor", false);
05-09-2011, 03:58 PM
Find
Jumpman Offline
Junior Member

Posts: 31
Threads: 10
Joined: May 2011
Reputation: 0
#7
RE: Cant load to next map!!.

Thx. I know now that is was part of the problem.. But when I start the map I get an error...

ERR: No matching signature to 'SetSwingDoorLocked(string@&)'
ERR: No conversion from 'bool' to 'int' available


plz help Smile thx
05-09-2011, 06:58 PM
Find
Roenlond Offline
Senior Member

Posts: 331
Threads: 3
Joined: Apr 2011
Reputation: 0
#8
RE: Cant load to next map!!.

Post the script you're using, from what I can see you're still using SetSwingDoorLocked - unless you have a normal door script somewhere else in your script file, that's your problem.
05-09-2011, 07:00 PM
Find
Jumpman Offline
Junior Member

Posts: 31
Threads: 10
Joined: May 2011
Reputation: 0
#9
RE: Cant load to next map!!.

Im sorry... the error is

ERR: No matching signature to 'SetSwingDoorLocked(string@&')

but here is the whole script..

void OnStart()
{


AddEntityCollideCallback("Player", "GruntTrigger", "CollideGruntTrigger", true, 0);
}



//===========================================
// This runs when the player enters the map
void OnEnter()
{

SetEntityPlayerInteractCallback("Reddoor", "InteractReddoor", true);

AddUseItemCallback("","StorageKey_1", "StorageDoor", "UsedStorageKey_1", true);

AddUseItemCallback("","UpperDoorKey_1", "UpperDoor", "UsedUpperDoorKey_1", true);

AddUseItemCallback("","ChestCrowbar_1", "DoorChest", "UsedChestCrowbar_1", true);

AddUseItemCallback("","EasterEggKey_1", "EasterEggDoor", "UsedEasterEggKey_1", true);

AddUseItemCallback("","ReddoorKey_1", "Reddoor", "UsedReddoorKey_1", true);
}

void CollideGruntTrigger(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("servantgrunt", true);
GiveSanityDamage(20, true);
}


void UsedStorageKey_1(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("StorageDoor", false, true);
PlaySoundAtEntity("", "unlock_door.snt", "StorageDoor", 0.0f, true);
RemoveItem("StorageKey_1");
}

void UsedUpperDoorKey_1(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("UpperDoor", false, true);
PlaySoundAtEntity("", "unlock_door.snt", "UpperDoor", 0.0f, true);
RemoveItem("UpperDoorKey_1");
}

void UsedChestCrowbar_1(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("DoorChest", false, true);
PlaySoundAtEntity("", "unlock_door.snt", "DoorChest", 0.0f, true);
RemoveItem("ChestCrowbar_1");
}

void UsedEasterEggKey_1(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("EasterEggDoor", false, true);
PlaySoundAtEntity("", "unlock_door.snt", "EasterEggDoor", 0.0f, true);
RemoveItem("EasterEggKey_1");
}

void UsedReddoorKey_1(string &in asItem, string &in asEntity)
{
SetLevelDoorLocked("Reddoor", false);

RemoveItem("ReddoorKey_1");
}
void InteractReddoor(string &in asEntity)
{
if(SetLevelDoorLocked("Reddoor")== true)
SetMessage("mapone", "ReddoorMessage", 5.0f);
}

//===========================================
// This runs when the player leaves the map
void OnLeave()
{

}
(This post was last modified: 05-09-2011, 07:12 PM by Jumpman.)
05-09-2011, 07:12 PM
Find
Roenlond Offline
Senior Member

Posts: 331
Threads: 3
Joined: Apr 2011
Reputation: 0
#10
RE: Cant load to next map!!.

The only thing wrong that I found is that you didn't have {}'s for the if statement at the bottom.

Spoiler below!

void OnStart()
{


AddEntityCollideCallback("Player", "GruntTrigger", "CollideGruntTrigger", true, 0);
}



//===========================================
// This runs when the player enters the map
void OnEnter()
{

SetEntityPlayerInteractCallback("Reddoor", "InteractReddoor", true);

AddUseItemCallback("","StorageKey_1", "StorageDoor", "UsedStorageKey_1", true);

AddUseItemCallback("","UpperDoorKey_1", "UpperDoor", "UsedUpperDoorKey_1", true);

AddUseItemCallback("","ChestCrowbar_1", "DoorChest", "UsedChestCrowbar_1", true);

AddUseItemCallback("","EasterEggKey_1", "EasterEggDoor", "UsedEasterEggKey_1", true);

AddUseItemCallback("","ReddoorKey_1", "Reddoor", "UsedReddoorKey_1", true);
}

void CollideGruntTrigger(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("servantgrunt", true);
GiveSanityDamage(20, true);
}


void UsedStorageKey_1(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("StorageDoor", false, true);
PlaySoundAtEntity("", "unlock_door.snt", "StorageDoor", 0.0f, true);
RemoveItem("StorageKey_1");
}

void UsedUpperDoorKey_1(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("UpperDoor", false, true);
PlaySoundAtEntity("", "unlock_door.snt", "UpperDoor", 0.0f, true);
RemoveItem("UpperDoorKey_1");
}

void UsedChestCrowbar_1(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("DoorChest", false, true);
PlaySoundAtEntity("", "unlock_door.snt", "DoorChest", 0.0f, true);
RemoveItem("ChestCrowbar_1");
}

void UsedEasterEggKey_1(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("EasterEggDoor", false, true);
PlaySoundAtEntity("", "unlock_door.snt", "EasterEggDoor", 0.0f, true);
RemoveItem("EasterEggKey_1");
}

void UsedReddoorKey_1(string &in asItem, string &in asEntity)
{
SetLevelDoorLocked("Reddoor", false);

RemoveItem("ReddoorKey_1");
}
void InteractReddoor(string &in asEntity)
{
if(SetLevelDoorLocked("Reddoor")== true)
{
SetMessage("mapone", "ReddoorMessage", 5.0f);
}
}


//===========================================
// This runs when the player leaves the map
void OnLeave()
{

}



If you're still getting an error, please post the complete error report (there is usually (always?) some numbers in parentheses showing what row and column that is causing the error (15, 6 for example)).
(This post was last modified: 05-09-2011, 07:22 PM by Roenlond.)
05-09-2011, 07:21 PM
Find




Users browsing this thread: 3 Guest(s)