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
Closet script need help !!! :)
Pandachoko Offline
Junior Member

Posts: 47
Threads: 14
Joined: Aug 2012
Reputation: 0
#1
Closet script need help !!! :)

I am fully working on my custom story but now I am stuck in one of my script(Key to closet) and this is my script:



////////////////////////////
// Run first time starting map
void OnStart()
{
AddUseItemCallback("", "KeyCloset", "ClosetLock", "UnlockCloset", true);
}

void UnlockCloset(string &in asItem, string &in asEntity)
{
SetEntityActive("ClosetLock", false);
GiveSanityBoost();
PlaySoundAtEntity("", "unlock_door", "Player", 0, false);
RemoveItem("KeyCloset");
}
////////////////////////////
// Run when entering map
void OnEnter()
{

}

////////////////////////////
// Run when leaving map
void OnLeave()
{

}

This is my lang file:



<CATEGORY Name="Inventory">
<Entry Name="ItemDesc_KeyCloset">This is a hidden key for a closet in the basement </Entry>
<Entry Name="ItemName_KeyCloset">Double spare key</Entry>
</CATEGORY>

My key name is: Keycloset

And my blockbox is named: ClosetLock

Can you see what I am during wrong!! Smile

PLease help
(This post was last modified: 08-10-2012, 04:42 PM by Pandachoko.)
08-10-2012, 04:41 PM
Find
Lizard Offline
Member

Posts: 174
Threads: 23
Joined: Jul 2012
Reputation: 5
#2
RE: Closet script need help !!! :)

My key name is: Keycloset


Your name of the key has a small c "c" and in your .hps and .lang file you are writting it with a capital c "C"

CURRENT PROJECT:
A Fathers Secret == Just started
08-10-2012, 04:53 PM
Find
Adny Offline
Posting Freak

Posts: 1,766
Threads: 6
Joined: Mar 2012
Reputation: 173
#3
RE: Closet script need help !!! :)

Can you please specify what you're trying to accomplish with your script? I'm not quite sure I follow what you're trying to do with a key and a block box. Also, why did you post your lang?

I rate it 3 memes.
08-10-2012, 04:55 PM
Find
Pandachoko Offline
Junior Member

Posts: 47
Threads: 14
Joined: Aug 2012
Reputation: 0
#4
RE: Closet script need help !!! :)

the lang I don't know, and all this. I made this because. When you pick up this secret key(not in the storyline, just free roam) you can open a closet to pick up a key that will lead to a huge secret area(libary) and there you will able to pick up alot of stuff Smile
08-10-2012, 06:20 PM
Find
Kazakarumariou Away
An angry man.

Posts: 283
Threads: 8
Joined: Jul 2012
Reputation: 14
#5
RE: Closet script need help !!! :)

(08-10-2012, 04:55 PM)andyrockin123 Wrote: Can you please specify what you're trying to accomplish with your script? I'm not quite sure I follow what you're trying to do with a key and a block box. Also, why did you post your lang?
There's a block box covering the front of the closet. when you use the key on the block box it rids of itself
(This post was last modified: 08-10-2012, 06:41 PM by Kazakarumariou.)
08-10-2012, 06:39 PM
Find
Adny Offline
Posting Freak

Posts: 1,766
Threads: 6
Joined: Mar 2012
Reputation: 173
#6
RE: Closet script need help !!! :)

Why not just lock it ._.

I rate it 3 memes.
08-10-2012, 06:48 PM
Find
Pandachoko Offline
Junior Member

Posts: 47
Threads: 14
Joined: Aug 2012
Reputation: 0
#7
RE: Closet script need help !!! :)

because you can't use the door function on it(if it is that you mention) Big Grin
08-10-2012, 07:01 PM
Find
Adny Offline
Posting Freak

Posts: 1,766
Threads: 6
Joined: Mar 2012
Reputation: 173
#8
RE: Closet script need help !!! :)

You can use setswingdoorlocked on cabinets 0.o
I am 100% at least one of the cabinet types allows it (but I'm 90% the rest of them are compatible with the function as well).

The options under the entity tab of each cabinet is exactly the same as a swing door; I can confirm that mansion set cabinet does in fact work in game.

I rate it 3 memes.
08-10-2012, 08:35 PM
Find
Kazakarumariou Away
An angry man.

Posts: 283
Threads: 8
Joined: Jul 2012
Reputation: 14
#9
RE: Closet script need help !!! :)

(08-10-2012, 08:35 PM)andyrockin123 Wrote: You can use setswingdoorlocked on cabinets 0.o
I am 100% at least one of the cabinet types allows it (but I'm 90% the rest of them are compatible with the function as well).

The options under the entity tab of each cabinet is exactly the same as a swing door; I can confirm that mansion set cabinet does in fact work in game.
you serious? ive been doing it a more complicated way this entire time. xD
08-10-2012, 09:51 PM
Find
Pandachoko Offline
Junior Member

Posts: 47
Threads: 14
Joined: Aug 2012
Reputation: 0
#10
RE: Closet script need help !!! :)

Can you make me an script function?! to it Smile
08-10-2012, 10:22 PM
Find




Users browsing this thread: 1 Guest(s)