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
Scripting Problem
Bridge Offline
Posting Freak

Posts: 1,971
Threads: 25
Joined: May 2012
Reputation: 128
#2
RE: Scripting Problem

You have to use the } character to designate the end of your function declarations.

////////////////////////////

// Run first time starting map

void OnStart()

{

    AddUseItemCallback("", "Key", "Mansion_door", "UsedKeyonDoor", true);

    AddUseItemCallback("", "Key2", "Door2", "UsedKeyOnDoor", true);

}


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

{

    SetSwingDoorLocked("Mansion_door", false, true);

    PlaySoundAtEntity("", "unlock_door", "Mansion", 0, false);

    SetSwingDoorLocked("Door2", false, true);

    PlaySoundAtEntity("", "unlock_door", "Door2", 0, false);



    RemoveItem("Key");

    RemoveItem("Key2");

}
05-20-2013, 07:31 PM
Find


Messages In This Thread
Scripting Problem - by amnesiaplayer321 - 05-20-2013, 07:19 PM
RE: Scripting Problem - by Bridge - 05-20-2013, 07:31 PM
RE: Scripting Problem - by amnesiaplayer321 - 05-20-2013, 07:40 PM
RE: Scripting Problem - by Bridge - 05-20-2013, 07:42 PM
RE: Scripting Problem - by amnesiaplayer321 - 05-20-2013, 07:44 PM
RE: Scripting Problem - by Tomato Cat - 05-20-2013, 07:59 PM
RE: Scripting Problem - by amnesiaplayer321 - 05-20-2013, 08:06 PM
RE: Scripting Problem - by OriginalUsername - 05-20-2013, 08:27 PM
RE: Scripting Problem - by amnesiaplayer321 - 05-20-2013, 08:45 PM
RE: Scripting Problem - by Bridge - 05-20-2013, 10:01 PM
RE: Scripting Problem - by PutraenusAlivius - 05-21-2013, 02:24 AM
RE: Scripting Problem - by Bonehead - 05-21-2013, 02:27 AM
RE: Scripting Problem - by amnesiaplayer321 - 05-21-2013, 04:07 AM
RE: Scripting Problem - by Tomato Cat - 05-21-2013, 05:55 AM
RE: Scripting Problem - by Your Computer - 05-21-2013, 11:48 AM
RE: Scripting Problem - by Tomato Cat - 05-21-2013, 03:17 PM
RE: Scripting Problem - by amnesiaplayer321 - 05-21-2013, 01:04 PM



Users browsing this thread: 1 Guest(s)