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
Hatch Won't Lock!
RunHideMoFo Offline
Junior Member

Posts: 7
Threads: 1
Joined: Jan 2015
Reputation: 0
#1
Hatch Won't Lock!

So I put a hatch on the ground in my mod, and I have it locked so that the player needs to pry it open with a crowbar in order to advance to the next map. Unfortunately, the damn hatch refuses to lock!!! Every time I enter the level, I can simply open the hatch with no crowbar, even though I have it set to "locked" in the level editor. Hell, I even threw in a "SetSwingDoorLocked" and a "SetSwingDoorClosed" at the beginning of the "void OnStart()" in the scripting, and the freaking thing STILL won't lock!!! And yes, I checked to make sure that it wasn't clipping into the ground and that the floor wasn't keeping it from closing properly. Not the problem. Closes just like it should. Could I have possibly, through sheer s**t luck, have picked the only hatch in the game that can't be locked (hatch_ceiling)?

[Image: 727-computer-reaction-face-gun-shoot-hea...n-hero.png]

Any and all advice would be greatly appreciated, because I'm out of ideas.
(This post was last modified: 03-01-2015, 11:56 AM by RunHideMoFo.)
03-01-2015, 11:51 AM
Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#2
RE: Hatch Won't Lock!

Could it be that you have a .cache file in your maps folder, so that changes you make don't change ingame?

(If so delete the .cache file)

Trying is the first step to success.
03-01-2015, 01:22 PM
Find
Darkfire Offline
Senior Member

Posts: 371
Threads: 22
Joined: May 2014
Reputation: 15
#3
RE: Hatch Won't Lock!

Probably you did. Check what the entity file it is. I had the same problem, because I used drain grate or whatev. I simply used SetPropStaticPhysics so player can't open it and then turned it off so it is possible. Then I also used a block box entity, because it was possible to walk through it (it had no body to collide with).

03-01-2015, 03:02 PM
Find
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#4
RE: Hatch Won't Lock!

Despite having a "Lock" box, they can't be locked. At least not all trapdoors can. I do believe the hatch you're using cannot be locked. I encountered a similar issue myself once upon a time.

(This post was last modified: 03-01-2015, 03:35 PM by Mudbill.)
03-01-2015, 03:35 PM
Find
RunHideMoFo Offline
Junior Member

Posts: 7
Threads: 1
Joined: Jan 2015
Reputation: 0
#5
RE: Hatch Won't Lock!

Thanks you guys! What I eventually did was replace the hatch that I was using with a different one and it started working. I got a new question for you guys now. Is there any way to use a black tile (static objects>technical) as a level door? Or will I just have to use the hatch itself as the level door? Is it possible to have a door that can be opened by a crowbar be a level door?
03-01-2015, 10:01 PM
Find
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#6
RE: Hatch Won't Lock!

You can make anything a level door if you want. You can either make a custom entity for it, or do something simpler by activating an area over it, add an interaction callback that calls ChangeMap(); and add a LevelDoor crosshair icon. The only thing you won't be able to add (if I remember correctly) is the string that tells where this door is leading. You can use the entity method if you need that.

03-01-2015, 10:13 PM
Find
RunHideMoFo Offline
Junior Member

Posts: 7
Threads: 1
Joined: Jan 2015
Reputation: 0
#7
RE: Hatch Won't Lock!

(03-01-2015, 10:13 PM)Mudbill Wrote: You can make anything a level door if you want. You can either make a custom entity for it, or do something simpler by activating an area over it, add an interaction callback that calls ChangeMap(); and add a LevelDoor crosshair icon. The only thing you won't be able to add (if I remember correctly) is the string that tells where this door is leading. You can use the entity method if you need that.

When I go into the model editor, I try to open up the jet black tile (static_objects>technical>plane_black) but the folder is empty and won't load. Suggestions?
03-01-2015, 10:52 PM
Find
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#8
RE: Hatch Won't Lock!

It's a static object, therefore it has no .ent file. Use File > Import Mesh instead. That's how you make a new .ent file. If it has a .dae file, you can import it and make it.

03-01-2015, 11:57 PM
Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#9
RE: Hatch Won't Lock!

(03-01-2015, 10:13 PM)Mudbill Wrote: The only thing you won't be able to add (if I remember correctly) is the string that tells where this door is leading.

With a little more scripting you can easily simulate it.
It'll get more advanced, and seem like a work around, but meh, if you want it, you can do it.

You can either do it by scripting or by level editting.

By scripting you'd use "GetEntityPosX" (for all axises) and check both the area and the player, when looking at the area.

If the distance between them is close enough, show a message.


Or, you could create another area. If the player is inside this area, show the message. (And enable the level-change area, perhaps)

Trying is the first step to success.
(This post was last modified: 03-02-2015, 12:54 AM by FlawlessHappiness.)
03-02-2015, 12:54 AM
Find
Romulator Offline
Not Tech Support ;-)

Posts: 3,628
Threads: 63
Joined: Jan 2013
Reputation: 195
#10
RE: Hatch Won't Lock!

(03-02-2015, 12:54 AM)FlawlessHappiness Wrote:
(03-01-2015, 10:13 PM)Mudbill Wrote: The only thing you won't be able to add (if I remember correctly) is the string that tells where this door is leading.

With a little more scripting you can easily simulate it.
It'll get more advanced, and seem like a work around, but meh, if you want it, you can do it.

You can either do it by scripting or by level editting.

By scripting you'd use "GetEntityPosX" (for all axises) and check both the area and the player, when looking at the area.

If the distance between them is close enough, show a message.


Or, you could create another area. If the player is inside this area, show the message. (And enable the level-change area, perhaps)

Or a simpler, but not as great method, making use of a Sign Script Area.

Discord: Romulator#0001
[Image: 3f6f01a904.png]
03-02-2015, 05:04 AM
Find




Users browsing this thread: 2 Guest(s)