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
[Help Needed] Key found in one level used on Door in another.
Jeeper Offline
Junior Member

Posts: 5
Threads: 2
Joined: Dec 2012
Reputation: 0
#1
[Help Needed] Key found in one level used on Door in another.

Hello!

As the title says, i wonder how to make a key that you find in one level open a door in another level. In what Hpl File should it be in? The one with the door? The one with the key? Or maybe both?

Thanks a lot!
12-28-2012, 02:13 AM
Find
Adny Offline
Posting Freak

Posts: 1,766
Threads: 6
Joined: Mar 2012
Reputation: 173
#2
RE: [Help Needed] Key found in one level used on Door in another.

As long as you don't try to duplicate key/door names, it should work fine with a regular script when you transfer it from level to level. Just be sure to put the callback/function in the same level as the door

I rate it 3 memes.
(This post was last modified: 12-28-2012, 02:15 AM by Adny.)
12-28-2012, 02:15 AM
Find
The chaser Offline
Posting Freak

Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation: 113
#3
RE: [Help Needed] Key found in one level used on Door in another.

The key you find in the level 1 is named "Key". The door in the 2 level is named "Door".

Code for level 2:

void OnStart()
{
AddUseItemCallback("", "Key", "Door", "Opendadoor", true);
}

void Opendadoor (string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("Door", false, true);
}

THE OTHERWORLD (WIP)
[Image: k6vbdhu]

Aculy iz dolan.
12-28-2012, 01:42 PM
Find




Users browsing this thread: 1 Guest(s)