Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Why is the key to door script not working to me?
The chaser Offline
Posting Freak

Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation: 113
#2
RE: Why is the key to door script not working to me?

void OnStart()

{

AddUseItemCallback("", "key", "locked_door1", "UsedKeyOnDoor", true);

SetEntityCallbackFunc("key", "OnPickup");

}

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

{

SetSwingDoorLocked("locked_door1", false, true);

PlaySoundAtEntity("", "unlock_door.snt", "locked_door1", 0, false);

RemoveItem("key");

}

void OnPickup(string &in asEntity, string &in type)

{

SetEntityActive("servant_grunt_1", true);

ShowEnemyPlayerPosition("servant_grunt_1");

}

There, I think it should work now.

THE OTHERWORLD (WIP)
[Image: k6vbdhu]

Aculy iz dolan.
08-04-2013, 10:53 AM
Find


Messages In This Thread
RE: Why is the key to door script not working to me? - by The chaser - 08-04-2013, 10:53 AM



Users browsing this thread: 1 Guest(s)