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
Multiple Issues Help Using Keys on locked Level doors
HoldMyUnicornGames Offline
Junior Member

Posts: 5
Threads: 1
Joined: Jul 2012
Reputation: 0
#1
Using Keys on locked Level doors

( I'm really sorry if there was a site i did not see that told me how to do so, i am making a custom story for my friend to play since it is my first.)

I am trying to have my player unlock a level door and then go through to the next map. But i keep getting an error. I looked on the wiki and it said to show a level door locked that it wasn't a swing door so i changed it to look like this.

void UsedKeyOnleveldoor(string& asItem, string& asEntity)
{
SetLevelDoorLocked("level_cistern_1", false, true);
PlaySoundAtEntity("", "unlock_door", "level_cistern_1", 0, false);
RemoveItem("MysteriousRoomKey");
}

I'm not totally sure what i did wrong... Another thing, is it possible to have the penumbra overture spiders to work on your map? For some reason mine are always glitched. They show the spider on the ground but it doesn't move yet there is an imaginary spider jumping and hitting the player...

(Again i am making this just for a friend since it is my first. I am very sorry if i didn't look properly. Seems to be a real annoying problem in this forum...)
07-06-2012, 12:16 AM
Find
Cruzore Offline
Senior Member

Posts: 301
Threads: 2
Joined: Jun 2012
Reputation: 37
#2
RE: Using Keys on locked Level doors

for the first rpoblem, which kind of error? What does it say? When does the error occur, when you try to start the custom story or when you used the level door to change the map?
For the second problem, importing those spiders will take a huge amount of work I have no idea of. Goood luck with that.

Think, before you speak Google, before you post
07-06-2012, 12:20 AM
Find
Adny Offline
Posting Freak

Posts: 1,766
Threads: 6
Joined: Mar 2012
Reputation: 173
#3
RE: Using Keys on locked Level doors

The function SetLevelDoorLocked doesn't have a second boolean (true/false) part, because it doesn't have any effects to use like some swing doors; replace it with this:

SetLevelDoorLocked("level_cistern_1", false);


Hope that helped!

I rate it 3 memes.
07-06-2012, 12:20 AM
Find
HoldMyUnicornGames Offline
Junior Member

Posts: 5
Threads: 1
Joined: Jul 2012
Reputation: 0
#4
RE: Using Keys on locked Level doors

(07-06-2012, 12:20 AM)andyrockin123 Wrote: The function SetLevelDoorLocked doesn't have a second boolean (true/false) part, because it doesn't have any effects to use like some swing doors; replace it with this:

SetLevelDoorLocked("level_cistern_1", false);


Hope that helped!
Thanks so very much now it opens Big Grin
New problem... Fatal Error...
ExecuteString (1,1) :ERR : No matching signatures to 'level_cistern_1)string@&)'
Do i need to connect the playerstartarea_1 with the level door?... The level door is already connected to the playerstartarea but.. I really don't know what's going on...
(This post was last modified: 07-06-2012, 01:40 AM by HoldMyUnicornGames.)
07-06-2012, 12:30 AM
Find
Cruzore Offline
Senior Member

Posts: 301
Threads: 2
Joined: Jun 2012
Reputation: 37
#5
RE: Using Keys on locked Level doors

When you select the level door, you will see under Entity that you have to specify the StartPos of the next map and the map file of the next map. Make sure to browse the map file, so you make no mistake in writing it.
EDIT: Might want to paste the updated script file again.

Think, before you speak Google, before you post
(This post was last modified: 07-06-2012, 12:38 AM by Cruzore.)
07-06-2012, 12:36 AM
Find
Adny Offline
Posting Freak

Posts: 1,766
Threads: 6
Joined: Mar 2012
Reputation: 173
#6
RE: Using Keys on locked Level doors

And that error occurs when you try to use the level door, right? If so, tell me all of the information you have on the level door (entity tab when you select it); all it needs to function is the name of the next map and and the player start area. Make 100% sure the next map is in the same folder, and that everything's named the same thing in the level door's settings, and in the next level.

If all of those things are correct, it should work properly.

(Edit)
You truly are the FastHunteR when it comes to scripting errors ^.^

I rate it 3 memes.
(This post was last modified: 07-06-2012, 12:42 AM by Adny.)
07-06-2012, 12:41 AM
Find
HoldMyUnicornGames Offline
Junior Member

Posts: 5
Threads: 1
Joined: Jul 2012
Reputation: 0
#7
RE: Using Keys on locked Level doors

(07-06-2012, 12:41 AM)andyrockin123 Wrote: And that error occurs when you try to use the level door, right? If so, tell me all of the information you have on the level door (entity tab when you select it); all it needs to function is the name of the next map and and the player start area. Make 100% sure the next map is in the same folder, and that everything's named the same thing in the level door's settings, and in the next level.

If all of those things are correct, it should work properly.

(Edit)
You truly are the FastHunteR when it comes to scripting errors ^.^
Entity Tab for the level door:


StartPos: PlayerStartarea_1
MapFile: 00_water.map
LockSound: door_prison_locked
I don't have anything in the next level's hps.... it's just a default level script... Do i need something posted there too?

(07-06-2012, 12:36 AM)FastHunteR Wrote: When you select the level door, you will see under Entity that you have to specify the StartPos of the next map and the map file of the next map. Make sure to browse the map file, so you make no mistake in writing it.
EDIT: Might want to paste the updated script file again.

void UsedKeyOnleveldoor(string& asItem, string& asEntity)
{
SetLevelDoorLocked("level_cistern_1", false);
PlaySoundAtEntity("", "unlock_door", "level_cistern_1", 0, false);
RemoveItem("MysteriousRoomKey");
}
I updated it so it looks like this... the error code is saying something about the next level map that it could not find the cistern level door... the other map has just a default level script nothing written in it.
(This post was last modified: 07-06-2012, 01:33 AM by HoldMyUnicornGames.)
07-06-2012, 01:32 AM
Find
Adny Offline
Posting Freak

Posts: 1,766
Threads: 6
Joined: Mar 2012
Reputation: 173
#8
RE: Using Keys on locked Level doors

"PlayerStartarea_1" isn't the standard name that is generated when you place this area in the level editor; the word Area must also be capitalized. It may seem like a bit of a stretch for a fix, but try this for the entry in the entity tab:

PlayerStartArea_1


Unless you specifically renamed it to have the A lower case, then that may be the fix.

I rate it 3 memes.
07-06-2012, 01:40 AM
Find
HoldMyUnicornGames Offline
Junior Member

Posts: 5
Threads: 1
Joined: Jul 2012
Reputation: 0
#9
RE: Using Keys on locked Level doors

(07-06-2012, 01:40 AM)andyrockin123 Wrote: "PlayerStartarea_1" isn't the standard name that is generated when you place this area in the level editor; the word Area must also be capitalized. It may seem like a bit of a stretch for a fix, but try this for the entry in the entity tab:

PlayerStartArea_1


Unless you specifically renamed it to have the A lower case, then that may be the fix.
Now it's giving me an error saying there is something with my water map's hps... Saying that there is something wrong with the script...
07-06-2012, 01:47 AM
Find
Adny Offline
Posting Freak

Posts: 1,766
Threads: 6
Joined: Mar 2012
Reputation: 173
#10
RE: Using Keys on locked Level doors

(07-06-2012, 01:47 AM)HoldMyUnicornGames Wrote: Now it's giving me an error saying there is something with my water map's hps... Saying that there is something wrong with the script...
I will see this problem through to the end! Please show your entire water map script (oh, and can you tell me exactly what the error says?).

I rate it 3 memes.
(This post was last modified: 07-06-2012, 01:50 AM by Adny.)
07-06-2012, 01:49 AM
Find




Users browsing this thread: 1 Guest(s)