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
The last thing of all! FROM ME!
Pandachoko Offline
Junior Member

Posts: 47
Threads: 14
Joined: Aug 2012
Reputation: 0
#1
The last thing of all! FROM ME!

I fixed almost everything on my custom story except one thing.
Here is a short description after the description I will show you my codes and some Pictures.:
------------------

Description: So you will find this secret key that will unlock this secret door. you can't miss the door but you can miss the key, if you don't pay enough attention. The door is a LEVEL door that will bring you to Libary.map. Here comes the codes:

-------------------------------

Name on Door: secret
Name on key: keycloset2 (don't ask why it's called keycloset2)

Here is the HPS from the level realfloor:

void OnStart()
{
AddUseItemCallback("", "keycloset2", "secret", "KeyOnDoor", true);
}

void KeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("secret", false, true);
PlaySoundAtEntity("", "unlock_door", "secret", 0, false);
RemoveItem("keycloset2");
}



--------------------------------
The key is working, what I mean with that is when I use the key on the door, the key will dissapear from my Inventory... And the door is still locked Smile








And one last thing, when making maps. does every caps need to be small or? is it okay to call a map: Libary.map and the same with some of my notes is also with Capital like: Miner1

I am posting some Pictures Down below


Attached Files
.jpg   Untitled3.jpg (Size: 302.17 KB / Downloads: 151)
.jpg   Untitled2.jpg (Size: 318.22 KB / Downloads: 146)
.jpg   Untitled.jpg (Size: 215.06 KB / Downloads: 135)
.jpg   Untitled1.jpg (Size: 201.36 KB / Downloads: 155)
12-07-2013, 10:34 PM
Find
Kurton Offline
Senior Member

Posts: 533
Threads: 8
Joined: Oct 2010
Reputation: 16
#2
RE: The last thing of all! FROM ME!

You'll want to use SetLevelDoorLocked if it is indeed a level door, not SetSwingDoorLocked.

12-07-2013, 10:41 PM
Find
Pandachoko Offline
Junior Member

Posts: 47
Threads: 14
Joined: Aug 2012
Reputation: 0
#3
RE: The last thing of all! FROM ME!

Now it wont load the map. It will freeze and show an error window about that code line don't Work, and crash my pc

this is how I set it up:
void OnStart()
{
AddUseItemCallback("", "keycloset2", "secret", "KeyOnDoor", true);
}
void KeyOnDoor(string &in asItem, string &in asEntity)
{
SetLevelDoorLocked("secret", false, true);
PlaySoundAtEntity("", "unlock_door", "secret", 0, false);
RemoveItem("keycloset2");
}


I am newbie, and I may miss a Little detail.. Sad
12-07-2013, 10:47 PM
Find
Traggey Offline
is mildly amused

Posts: 3,257
Threads: 74
Joined: Feb 2012
Reputation: 185
#4
RE: The last thing of all! FROM ME!

Wrong forum, use the support section for this.

Moved.
12-07-2013, 10:54 PM
Find
DnALANGE Offline
Banned

Posts: 1,549
Threads: 73
Joined: Jan 2012
#5
RE: The last thing of all! FROM ME!

Can you please give us youur .HPS file.
It is located here :
Mydouments\Amnesia\YOURSTORY\hpl.log
We need that.
THank you, overall it looks good.
Be 100% sure the NEXT map = PRECISELY the same name in your level-editor as in your maps folder.
+ check if the startear is also the same.
12-07-2013, 11:02 PM
Find
Pandachoko Offline
Junior Member

Posts: 47
Threads: 14
Joined: Aug 2012
Reputation: 0
#6
RE: The last thing of all! FROM ME!

Hi DnALANGE. There is really nothing special about my HPS to realfloor.map
Actually only that code. As I gave just above, that's it.
As I said I am newbie (also to scripting). I just wanted a engine to tell my story, and Amnesia had the best
level design and was fiting perfect to my story and I wanted to make maps for fun. didn't think I got sucked into making my own custom story that is almost done. I can admit there could have been more scripting in the map, but I am moving over to unity when this project is done. I have to many ideas I can't make all, xD and I been stuck on this custom for 2 years, Manly because I needed to focus on my Web-school and my youtube channel. But DnLANGE you are the best, I mean it. You have been helping me alot, I appreciate that.

The Picture illustrate how the in level editor is have been put up. or else
the code for my HPS to realfloor is only:

void OnStart()
{
AddUseItemCallback("", "keycloset2", "secret", "KeyOnDoor", true);
}
void KeyOnDoor(string &in asItem, string &in asEntity)
{
SetLevelDoorLocked("secret", false, true);
PlaySoundAtEntity("", "unlock_door", "secret", 0, false);
RemoveItem("keycloset2");
}
and I went into document/Amnesia/Main/myname/custom/shelter and it went into a empty folder there is no HPS. FOLDER. O_O

Sorry I can't help more than that.

Sorry grammar
(This post was last modified: 12-07-2013, 11:16 PM by Pandachoko.)
12-07-2013, 11:12 PM
Find
Romulator Offline
Not Tech Support ;-)

Posts: 3,628
Threads: 63
Joined: Jan 2013
Reputation: 195
#7
RE: The last thing of all! FROM ME!

Here is your problem Smile

SetLevelDoorLocked("secret", false, true);

Assuming you want it unlocked when you use the key, use this instead:
PHP Code: (Select All)
SetLevelDoorLocked("secret"false); 

The reason for this is:
Spoiler below!


Level doors cannot be unlocked with effects Smile Because of this, the code is not present in the syntax.

The syntax for the coding is different as well!
Wiki Wrote:void SetLevelDoorLocked(string& asName, bool abLocked);

Locks a level door. Note that level doors are NOT swing doors.


void SetSwingDoorLocked(string& asName, bool abLocked, bool abEffects);


Edit: Ninja'd two users by 3 minutes ;D

Discord: Romulator#0001
[Image: 3f6f01a904.png]
(This post was last modified: 12-07-2013, 11:25 PM by Romulator.)
12-07-2013, 11:16 PM
Find
Kurton Offline
Senior Member

Posts: 533
Threads: 8
Joined: Oct 2010
Reputation: 16
#8
RE: The last thing of all! FROM ME!

SetLevelDoorLocked("secret", false, true);

should just be

SetLevelDoorLocked("secret", false);

Since it's a different function with only two variables. Giving it three is what made it crash.
beat to it

(This post was last modified: 12-07-2013, 11:19 PM by Kurton.)
12-07-2013, 11:19 PM
Find
DnALANGE Offline
Banned

Posts: 1,549
Threads: 73
Joined: Jan 2012
#9
RE: The last thing of all! FROM ME!

SetLevelDoorLocked(string& asName, bool abLocked);
Meaning
SetLevelDoorLocked("YOURDOORNAME", true); //Will LOCK the door
SetLevelDoorLocked("YOURDOORNAME", false); //Will UNLOCK the door,witch YOU need. try this.
DnALANGE
12-07-2013, 11:19 PM
Find
Pandachoko Offline
Junior Member

Posts: 47
Threads: 14
Joined: Aug 2012
Reputation: 0
#10
RE: The last thing of all! FROM ME!

Kurton, Romulator and DnLANGE, I would Like to thank you all. for the support. To finish my custom story. It is done, my custom story is done. Thank you. Now I only need a voice acting, where are voice shall be played at the end in the credits, which I will do tomorrow with one of my friend.

THANK YOU !!! and if you ever interested in the custom story, someday, and it will be downloadable,
Look in the credits, your name are there also others that helped me through this forum.
Your name will be at the end so won't miss them! BUT THANK YOU!. and I will not take any more of your time Smile Thanks for all the support. This is what I can call a community!
And DnLANGE can't wait to try out you new Custom Story!

CHEERS AND HAVE A NICE DAY!

And you DnLANGE you explantion at the end gave sense, I was blind xD
12-07-2013, 11:40 PM
Find




Users browsing this thread: 1 Guest(s)