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
Pandachoko Offline
Junior Member

Posts: 47
Threads: 14
Joined: Aug 2012
Reputation: 0
#1
Closet script

Can someone help me. I am fully making my custom story. And I am trying to make. so that if you pick up a key you can open a closet. Can someone tell what the script is called... Please help Smile XD I hope that is the same as open a door with a key script... But I don't what to write in the function Smile Smile
08-01-2012, 04:41 PM
Find
Pandachoko Offline
Junior Member

Posts: 47
Threads: 14
Joined: Aug 2012
Reputation: 0
#2
Closet script!!! Help!.?!!?!?

Can someone help me. I am fully making my custom story. And I am trying to make. so that if you pick up a key you can open a closet. Can someone tell what the script is called... Please help [Image: smile.gif] XD I hope that is the same as open a door with a key script... But I don't what to write in the function [Image: smile.gif] [Image: smile.gif]
08-01-2012, 05:10 PM
Find
Kazakarumariou Away
An angry man.

Posts: 283
Threads: 8
Joined: Jul 2012
Reputation: 14
#3
RE: Closet script!!! Help!.?!!?!?

First put an entity over the closet. (this entity is invisible and it won't let you open the door. You find it Technical > Block box)

Okay name the block box "ClosetLock"

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");
}
08-01-2012, 05:24 PM
Find
Kazakarumariou Away
An angry man.

Posts: 283
Threads: 8
Joined: Jul 2012
Reputation: 14
#4
RE: Closet script

Why do you make two threads? an admin will usually move it
I have my answer in the other one.
08-01-2012, 05:26 PM
Find
Pandachoko Offline
Junior Member

Posts: 47
Threads: 14
Joined: Aug 2012
Reputation: 0
#5
RE: Closet script!!! Help!.?!!?!?

Okay thanks Smile You just saved miy day, now I will not be stuck with it Smile

But. The block box should it be around the closet or?.. and one last thing. Is it okay to name the closet after needs?
(This post was last modified: 08-01-2012, 06:29 PM by Pandachoko.)
08-01-2012, 05:33 PM
Find
Pandachoko Offline
Junior Member

Posts: 47
Threads: 14
Joined: Aug 2012
Reputation: 0
#6
RE: Closet script

I am a beginner on this website Smile that is why
08-01-2012, 05:44 PM
Find
lolmaster Offline
Member

Posts: 170
Threads: 9
Joined: Jul 2012
Reputation: 6
#7
RE: Closet script

(08-01-2012, 05:44 PM)Pandachoko Wrote: I am a beginner on this website Smile that is why
That's not a very good excuse...


08-01-2012, 06:07 PM
Find
Pandachoko Offline
Junior Member

Posts: 47
Threads: 14
Joined: Aug 2012
Reputation: 0
#8
RE: Closet script

Well I just made my profile 3 hours. So that is pretty true

it dosn't work Sad put the scripting directly into the hps. file. Don't know what I done wrong Smile
(This post was last modified: 08-01-2012, 06:38 PM by Pandachoko.)
08-01-2012, 06:18 PM
Find
Kazakarumariou Away
An angry man.

Posts: 283
Threads: 8
Joined: Jul 2012
Reputation: 14
#9
RE: Closet script

Rename the name of the key to "KeyCloset"
08-01-2012, 08:31 PM
Find
Pandachoko Offline
Junior Member

Posts: 47
Threads: 14
Joined: Aug 2012
Reputation: 0
#10
RE: Closet script

already did Sad

already did Sad how can I show you're mine hps. Smile
(This post was last modified: 08-01-2012, 08:51 PM by Pandachoko.)
08-01-2012, 08:50 PM
Find




Users browsing this thread: 1 Guest(s)