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
Why doesnt my key work?
Putkimato Offline
Junior Member

Posts: 25
Threads: 8
Joined: Jun 2012
Reputation: 0
#1
Why doesnt my key work?

I followed this video: http://www.youtube.com/watch?v=ABI7NUqkX...re=related
and my key doesnt work.

hps file:
////////////////////////////

// Run when entering map

void OnEnter()

{

Haha there was space at my key name Big Grin

AddUseItemCallback("", "key_1", "mansion_1", "KeyOnDoor", true);

}

void KeyOnDoor(string &in asItem, string &in asEntity)

{

SetSwingDoorLocked("mansion_1", false, true);
PlaySoundAtEntity("", "unlock_door", "mansion_1", 0, false);
RemoveItem("key_1");

}

extra english lang:

<LANGUAGE>
<RESOURCES>
</RESOURCES>
<CATEGORY Name="Inventory">
<Entry Name="ItemName_key1">Cellar Key</Entry>
<Entry Name="ItemDesc_key1">This key looks rusty and old.</Entry>
</CATEGORY>
</LANGUAGE>

When i pick up key, it says: "Picked up Cellar key" like it should say, and when i use it door: "Cannot use item this way"

Help please..
(This post was last modified: 06-09-2012, 10:38 AM by Putkimato.)
06-09-2012, 10:26 AM
Find
MaZiCUT Offline
Senior Member

Posts: 536
Threads: 31
Joined: Jun 2012
Reputation: 17
#2
RE: Why doesnt my key work?

(06-09-2012, 10:26 AM)Putkimato Wrote: I followed this video: http://www.youtube.com/watch?v=ABI7NUqkX...re=related
and my key doesnt work.

hps file:
////////////////////////////

// Run when entering map

void OnEnter()

{

Haha there was space at my key name Big Grin

AddUseItemCallback("", "key_1", "mansion_1", "KeyOnDoor", true);

}

void KeyOnDoor(string &in asItem, string &in asEntity)

{

SetSwingDoorLocked("mansion_1", false, true);
PlaySoundAtEntity("", "unlock_door", "mansion_1", 0, false);
RemoveItem("key_1");

}

extra english lang:





Cellar Key
This key looks rusty and old.



When i pick up key, it says: "Picked up Cellar key" like it should say, and when i use it door: "Cannot use item this way"

Help please..


You, just as me are trying to get help right, but i realized one thing when i searched for help that it was way easier to discover the fault myself and it was a good feeling that i was learning to script this without tutorials, you can use tutorials on hard items and then memorize them and then try something new by yourself like i'm doing so i'm glad you solved this by yourself.
06-09-2012, 12:42 PM
Website Find




Users browsing this thread: 1 Guest(s)