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
Locked Hatch found being open by itself?
Radical Batz Offline
Posting Freak

Posts: 953
Threads: 145
Joined: Dec 2013
Reputation: 25
#1
Locked Hatch found being open by itself?

I made a ceiling hatch in my map and I made it locked, so I want the player to solve a puzzle to make it open, but when I tested my map to see the room with the hatch, I found it swinging open, why is this? I made it locked

[Image: JMvYFxB.jpg][/img]
(This post was last modified: 02-02-2014, 04:17 PM by Radical Batz.)
02-02-2014, 04:14 PM
Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#2
RE: Locked Hatch found being open by itself?

Perhaps because it can't be locked when it's upside down. I'm not sure though.
Try turning it around.

Trying is the first step to success.
02-02-2014, 05:09 PM
Find
Radical Batz Offline
Posting Freak

Posts: 953
Threads: 145
Joined: Dec 2013
Reputation: 25
#3
RE: Locked Hatch found being open by itself?

(02-02-2014, 05:09 PM)FlawlessHair Wrote: Perhaps because it can't be locked when it's upside down. I'm not sure though.
Try turning it around.

If I make it upside down then it will not open by itself but it will be not locked and the player can open it without doing the puzzle, then why is it called a ceiling hatch, so not true Angry
(This post was last modified: 02-02-2014, 05:38 PM by Radical Batz.)
02-02-2014, 05:37 PM
Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#4
RE: Locked Hatch found being open by itself?

Hm, maybe it can't be locked.
Or it's being unlocked when the map begins

Trying is the first step to success.
02-02-2014, 05:46 PM
Find
i3670 Offline
Posting Freak

Posts: 1,308
Threads: 74
Joined: Oct 2011
Reputation: 36
#5
RE: Locked Hatch found being open by itself?

Try using a block box that is deactivated when you solve the puzzle.

"What you think is irrelevant" - A character of our time

A Christmas Hunt
02-02-2014, 06:33 PM
Find
Radical Batz Offline
Posting Freak

Posts: 953
Threads: 145
Joined: Dec 2013
Reputation: 25
#6
RE: Locked Hatch found being open by itself?

(02-02-2014, 06:33 PM)i3670 Wrote: Try using a block box that is deactivated when you solve the puzzle.

a what what? what's a black box? and where do I find it?
02-02-2014, 06:50 PM
Find
DnALANGE Offline
Banned

Posts: 1,549
Threads: 73
Joined: Jan 2012
#7
RE: Locked Hatch found being open by itself?

BLOCK box.
Go to entities -> Technical -> Blockbox.
A block box is just a "invicible" box.
Put that box really close underneath your hatch. { also make it a bit small \ thinner to look better if players would try jumping to it. }
SO the hatch is "hanging"on the block box.
WHen the charactor has finished th quest do this :
SetEntityActive("YOURBLOCKBOXNAMEHERE", false);
THEN if you did it correct the hatch will open.
-
Try that and let us know if it works.
(This post was last modified: 02-02-2014, 06:59 PM by DnALANGE.)
02-02-2014, 06:56 PM
Find
Slanderous Offline
Posting Freak

Posts: 1,606
Threads: 78
Joined: Dec 2012
Reputation: 63
#8
RE: Locked Hatch found being open by itself?

As far as I know, block box blocks (C-C-C-combo breaker) only player, not entities. But I can be wrong.
02-02-2014, 07:10 PM
Find
Radical Batz Offline
Posting Freak

Posts: 953
Threads: 145
Joined: Dec 2013
Reputation: 25
#9
RE: Locked Hatch found being open by itself?

No it doesn't work with entities so what am I going to do with the hatch, i really want the player to solve a puzzle to open it, even if I turn it upside down, it's still stays open, even though it's locked. why is this happening?
(This post was last modified: 02-02-2014, 07:30 PM by Radical Batz.)
02-02-2014, 07:24 PM
Find
Slanderous Offline
Posting Freak

Posts: 1,606
Threads: 78
Joined: Dec 2012
Reputation: 63
#10
RE: Locked Hatch found being open by itself?

You can, perhaps, hit "static physics" in the entity tab.
Then do an script area around the hatch, like this:

Spoiler below!
[Image: szg03m.jpg]

Now I guess you want to make player say "it's locked" when touching it. Go to your map script, and paste this code:

void int01(string &in asEntity)
{
SetMessage("Messages", "name_of_the_message_to_show", 5);
}

Put the "int01" here:

Spoiler below!
[Image: 14soaci.jpg]

(Tick also "item_interaction" in the same window, below)

Of course "Messages" is the category in your extra_english.lang file, and "name_of_the_message_to_show" is the entry name of the message to appear.

When you do script, simply make the key or everything else you want to be used on the script area, like this:

Spoiler below!
PHP Code: (Select All)
void OnStart()
{
AddUseItemCallback("""key_name""ScriptArea_1""UnlockHatch"true);
}
void UnlockHatch(string &in asItemstring &in asEntity)
{
  
SetPropStaticPhysics("hatch_ceiling_1"false);
  
SetEntityActive("ScriptArea_1"false);
  
PlaySoundAtEntity("""unlock_door.snt""hatch_ceiling_1"0false);
  
RemoveItem("key_name");



It should work fine, if you do this correctly.

EDIT: Forgot to put one thing, fixed.
(This post was last modified: 02-02-2014, 07:54 PM by Slanderous.)
02-02-2014, 07:48 PM
Find




Users browsing this thread: 4 Guest(s)