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
Key doens´t work...
thephoenix1860 Offline
Junior Member

Posts: 33
Threads: 4
Joined: Sep 2011
Reputation: 0
#1
Key doens´t work...

Hello,
Im new in doing Custom-Stories and could need some help, because i have a problem with my key:
in my leveleditor the key has under the right subject the name of the door.
in the hps:
void OnStart()
{
AddUseItemCallback("", "key_study_1", "mansion_1", "UsedKeyOnDoor", true);
}

void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("mansion_1", false, false);
PlaySoundAtEntity("", "unlock_key_study_1.snt", "mansion_1", 0, false);
RemoveItem("key_study_1");
AddDebugMessage("KeyOnDoor", false);
}
////////////////////////////
// Run when leaving map
void OnLeave()
{

}


but it doesn´t work and im very sorry, if it already exists a thread about it!

im happy about each comment Smile
02-14-2012, 02:06 PM
Find
flamez3 Offline
Posting Freak

Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation: 57
#2
RE: Key doens´t work...

I'm sorry, but what isn't working?

02-14-2012, 03:29 PM
Find
onv Offline
Member

Posts: 51
Threads: 12
Joined: Feb 2012
Reputation: 2
#3
RE: Key doens´t work...

PlaySoundAtEntity("", "unlock_key_study_1.snt", "mansion_1", 0, false); should be :
PlaySoundAtEntity("", "unlock_door", "mansion_1", 0, false);


(This post was last modified: 02-14-2012, 03:46 PM by onv.)
02-14-2012, 03:43 PM
Find
thephoenix1860 Offline
Junior Member

Posts: 33
Threads: 4
Joined: Sep 2011
Reputation: 0
#4
RE: Key doens´t work...

errh...it doens´t work, onv Sad
i have it of a tutorial on youtube, and by the player and some viewers it works...I have to write the name of the door in the box "CustomSubItemTypeName", right?

@flamez3
well, the key^^ It stays in the title
02-14-2012, 04:24 PM
Find
flamez3 Offline
Posting Freak

Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation: 57
#5
RE: Key doens´t work...

Yes it does say it in the title but it also says

"in my leveleditor the key has under the right subject the name of the door"


I have no idea what that means.

02-14-2012, 04:28 PM
Find
thephoenix1860 Offline
Junior Member

Posts: 33
Threads: 4
Joined: Sep 2011
Reputation: 0
#6
RE: Key doens´t work...

well, i thought, that this sentence will be strong to understand^^
i mean, when you klick on the key, and klick right to "entity" under "CustomSubItemTypeName" (that is the right box, to write the door´s name)
02-14-2012, 04:32 PM
Find
flamez3 Offline
Posting Freak

Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation: 57
#7
RE: Key doens´t work...

Why would you need to write the doors name in CustomSubItemTypeName?

02-14-2012, 04:38 PM
Find
thephoenix1860 Offline
Junior Member

Posts: 33
Threads: 4
Joined: Sep 2011
Reputation: 0
#8
RE: Key doens´t work...

errh....because so it stays ?
a guy on youtube has done this and by him it works xD
02-14-2012, 04:50 PM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#9
RE: Key doens´t work...

CustomSubItemTypeName can be whatever you want so long as it is reflected in the .lang file.

Tutorials: From Noob to Pro
02-14-2012, 04:55 PM
Website Find
flamez3 Offline
Posting Freak

Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation: 57
#10
RE: Key doens´t work...

(02-14-2012, 04:50 PM)thephoenix1860 Wrote: errh....because so it stays ?
a guy on youtube has done this and by him it works xD
Are you trying to name the key?



02-14-2012, 05:00 PM
Find




Users browsing this thread: 1 Guest(s)