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


Thread Rating:
  • 1 Vote(s) - 1 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script problem
Nice Offline
Posting Freak

Posts: 3,812
Threads: 37
Joined: Jan 2012
Reputation: 153
#3
RE: Script problem

(06-16-2012, 04:27 PM)KillerFlo Wrote: Whats wrong with this Script ? Sad


// Run first time starting map

void OnStart()
{
AddUseItemCallback("", "key_tomb_1", "mansion_1", "UsedKeyOnDoor", true);
SetEntityCallbackFunc("ITEM", "OnPickup");
}
void UsedKeyOnDoor(string &in asitem, string &in asEntity)
{
SetSwingDoorLocked("mansion_1", false, true);
PlaySoundAtEntity("", "unlock_door", "mansion_1", 0, false);
RemoveItem("key-tomb_1");


void OnPickup(string &in asEntity, string &in type)
{
after the RemoveItem line you forgot to close it with bracket...

so it should look like

void UsedKeyOnDoor(string &in asitem, string &in asEntity)
{
SetSwingDoorLocked("mansion_1", false, true);
PlaySoundAtEntity("", "unlock_door", "mansion_1", 0, false);
RemoveItem("key-tomb_1");
}


Sorry but we cannot change your avatar as the new avatar you specified is too big. The maximum dimensions are 80x80 (width x height)
06-16-2012, 05:49 PM
Find


Messages In This Thread
Script problem - by KillerFlo - 06-16-2012, 04:27 PM
RE: Script problem - by MaZiCUT - 06-16-2012, 05:29 PM
RE: Script problem - by Nice - 06-16-2012, 05:49 PM



Users browsing this thread: 1 Guest(s)