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
well..I'm stuck again on doors
noovra Offline
Junior Member

Posts: 9
Threads: 1
Joined: Apr 2013
Reputation: 0
#9
RE: well..I'm stuck again on doors

(04-07-2013, 09:45 AM)BeeKayK Wrote:
(04-07-2013, 09:33 AM)noovra Wrote:
(04-07-2013, 08:58 AM)megsb927 Wrote:
(04-07-2013, 08:02 AM)noovra Wrote: Hm.. try this!

void OnStart()
{
AddUseItemCallback("", "Key3", "castle_1", "UsedKeyOnDoor", true);
AddUseItemCallback("", "Key4","castle_2", "UsedKeyOnDoor", true);
}

void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked(asEntity, false, false);
PlaySoundAtEntity("", "unlock_door", asEntity, 0, false);
RemoveItem(asItem);
}

That was it. Be sure, that in the void funct stay the same, as I wrote.
I hope, It's a solution for your problem Smile.

Hmm that didn't work either:/ I need to be able to have two of the
SetSwingDoorLocked(asEntity, false, false);
PlaySoundAtEntity("","unlock_door", asEntity, 0, false);
RemoveItem(asItem);
But I don't know how it's written and then I need the door to still be locked when I come back into the room

Actually u don't have to write 2 functions.. or what ever. With the function that I've posted it should probably work.
U just want two locked doors and two different keys? Yes?
Like "KeyA" for "DoorA" and "KeyB" for "DoorB".
I don't even found any problems with the script =/.
Maybe u wrote something wrong?

No, it looks like he wants KeyA for DoorA and KeyB for DoorB
Key3 for castle_1
Key4 for castle_2

Exactly what I meant. Both scripts should work fine.
04-07-2013, 10:08 AM
Find


Messages In This Thread
well..I'm stuck again on doors - by megsb927 - 04-07-2013, 05:20 AM
RE: well..I'm stuck again on doors - by megsb927 - 04-07-2013, 07:33 AM
RE: well..I'm stuck again on doors - by noovra - 04-07-2013, 08:02 AM
RE: well..I'm stuck again on doors - by megsb927 - 04-07-2013, 08:58 AM
RE: well..I'm stuck again on doors - by noovra - 04-07-2013, 09:33 AM
RE: well..I'm stuck again on doors - by noovra - 04-07-2013, 10:08 AM
RE: well..I'm stuck again on doors - by megsb927 - 04-07-2013, 01:19 PM
RE: well..I'm stuck again on doors - by colin56 - 04-17-2013, 08:34 AM



Users browsing this thread: 1 Guest(s)