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


Thread Rating:
  • 1 Vote(s) - 3 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Key! WHY YOU NO WORK!
Obliviator27 Offline
Posting Freak

Posts: 792
Threads: 10
Joined: Jul 2011
Reputation: 66
#3
RE: Key! WHY YOU NO WORK!

(08-21-2011, 01:12 AM)JetlinerX Wrote: Keys are the one of the most easy things I know how to script, but why the hell is it saying "Cannot Use Item This Way!" Here is my code, and I hawk-eyed it, saw nothing wrong, and someone else looked at it and ALSO saw nothing wrong! The key/door names are all correct, and the key has a subitemtext.

        AddUseItemCallback("", "key_firstfloor", "firstfloordoor", "UsedKeyOnDoor", true);

---------------------------
void UsedKeyOnDoor(string &in asParent , string &in asChild , int alState)
{
        SetLevelDoorLocked("firstfloordoor", false);
        SetLevelDoorLockedSound("firstfloordoor", "door_level_wood_locked.snt");
        RemoveItem("key_firstfloor");
}

Improper Syntax. (string &in asItem, string &in asEntity) is what you want to use.
08-21-2011, 01:45 AM
Find


Messages In This Thread
Key! WHY YOU NO WORK! - by JetlinerX - 08-21-2011, 01:12 AM
RE: Key! WHY YOU NO WORK! - by Elven - 08-21-2011, 01:45 AM
RE: Key! WHY YOU NO WORK! - by Obliviator27 - 08-21-2011, 01:45 AM
RE: Key! WHY YOU NO WORK! - by JenniferOrange - 08-21-2011, 04:00 AM
RE: Key! WHY YOU NO WORK! - by Obliviator27 - 08-21-2011, 04:14 AM
RE: Key! WHY YOU NO WORK! - by Elven - 08-21-2011, 01:46 AM
RE: Key! WHY YOU NO WORK! - by JetlinerX - 08-21-2011, 04:17 AM
RE: Key! WHY YOU NO WORK! - by Juby - 08-21-2011, 05:37 AM



Users browsing this thread: 1 Guest(s)