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
entity items
lothabread Offline
Member

Posts: 106
Threads: 11
Joined: Apr 2012
Reputation: 2
#1
entity items

Hello, i was wondering if anyone could help me with something. i'm trying to use a key that i get when breaking a small box to open a door but don't know how to do that. I've looked around google and youtube but found nothing. if someone could help that would be great. Big Grin
06-22-2012, 10:20 PM
Find
MaZiCUT Offline
Senior Member

Posts: 536
Threads: 31
Joined: Jun 2012
Reputation: 17
#2
RE: entity items

1. Choose a box that you can breake, a breakable box.

2. Put the key inside

3. ???

4. Profit

If there is no key that you can breake just choose a vase or something, there's always options in entity i believe like "contains item" and then you choose an item, or write the name of that item.

Hi.
(This post was last modified: 06-22-2012, 11:18 PM by MaZiCUT.)
06-22-2012, 11:17 PM
Website Find
Cruzore Offline
Senior Member

Posts: 301
Threads: 2
Joined: Jun 2012
Reputation: 37
#3
RE: entity items

So, I am assuming you got no scripting experience at all. There is indeed a wiki, and I'll point the important sites on it out:
http://wiki.frictionalgames.com/hpl2/amn..._functions
the most important one, it contains all functions of hpl2. Since there are many, press ctrl + f to search for a keyword.
On the left side, you can browse through the categories. Make sure you only look in hlp2. There are scripting tutorials and other ones, so look through everything.
The second most important one is the main game itself. You can just freely look at the main game's maps and scripts, and see how it works. This way, you learn to make good level design, cleverly placed lights and efficient scripts.
Also, this forum has tutorials as well. You can just search for them.
Now for your problem, you should use AddUseItemCallback and SetSwingDoorLocked to lock/unlock the door. if it's a level door, use SetlevelDoorLocked instead. Look those names up on the engine scripts page and try your luck in building your script by looking at tutorials and how FG made their maps and scripts. If it doesn't work and gives you an error, and you can't fix it yourself by looking at that error, just ask again and people will help you out. Just make sure not to "command" others to post you a whole script file, try to make it yourself at least. You learn by your mistakes.

If you instead meant how to get an item into a breakable entity, just do as CrazyArts said.
(This post was last modified: 06-22-2012, 11:25 PM by Cruzore.)
06-22-2012, 11:23 PM
Find
lothabread Offline
Member

Posts: 106
Threads: 11
Joined: Apr 2012
Reputation: 2
#4
RE: entity items

actually what ive done is get a container and put a key inside inside it and i would like to know how to use what comes out of it after breaking it, like when breaking the small jar behind the painting in the guess room in the dark descent [Image: photo.php?fbid=379996532059568&set=a.169...=1&theater]
06-22-2012, 11:27 PM
Find
Cruzore Offline
Senior Member

Posts: 301
Threads: 2
Joined: Jun 2012
Reputation: 37
#5
RE: entity items

I still don't get what you want. Do you want to know how to get the key to open the door,or how to get the key inside a bottle?

By the way, I can't see your picture, but a quick description of what exactly you want is enough.
(This post was last modified: 06-22-2012, 11:58 PM by Cruzore.)
06-22-2012, 11:58 PM
Find
lothabread Offline
Member

Posts: 106
Threads: 11
Joined: Apr 2012
Reputation: 2
#6
RE: entity items

i want to do something like in dark descent where you get the key from the bottle to open the door to the machine room but in my case i want to get a key from a wooden box to open a swing door. i hope that makes sense Confused
06-23-2012, 12:03 AM
Find
Cruzore Offline
Senior Member

Posts: 301
Threads: 2
Joined: Jun 2012
Reputation: 37
#7
RE: entity items

I don't know what your problem is. That you don't know how to get the key in the box, or how to get the key to open the door?
06-23-2012, 12:18 AM
Find
lothabread Offline
Member

Posts: 106
Threads: 11
Joined: Apr 2012
Reputation: 2
#8
RE: entity items

getting the key to open the door as well as changing the name, sorry if i'm making this more complicated than it should be
(This post was last modified: 06-23-2012, 12:33 AM by lothabread.)
06-23-2012, 12:29 AM
Find
SilentStriker Offline
Posting Freak

Posts: 950
Threads: 26
Joined: Jul 2011
Reputation: 43
#9
RE: entity items

Guys the easiest way of making a key inside a breakable box or vase is by clicking the box in the level editor then go to the entity tab on the left then ContainedItem I have never used it myself so I don't know how to rename the key etc but it may be the same way as a normal key

(This post was last modified: 06-23-2012, 12:33 AM by SilentStriker.)
06-23-2012, 12:33 AM
Find
lothabread Offline
Member

Posts: 106
Threads: 11
Joined: Apr 2012
Reputation: 2
#10
RE: entity items

(06-23-2012, 12:33 AM)SilentStriker Wrote: Guys the easiest way of making a key inside a breakable box or vase is by clicking the box in the level editor then go to the entity tab on the left then ContainedItem I have never used it myself so I don't know how to rename the key etc but it may be the same way as a normal key
that's what i'm trying to do actually rename it so i can use it with a swing door
06-23-2012, 12:34 AM
Find




Users browsing this thread: 1 Guest(s)