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
Script Help a funtion with the same name and parameter already exists
chweaw Offline
Junior Member

Posts: 4
Threads: 1
Joined: Apr 2012
Reputation: 0
#8
RE: a funtion with the same name and parameter already exists

(04-25-2012, 12:19 PM)TeamSD Wrote: Here you go. This should do the trick! Smile

////////////////////////////
// Run first time starting map
void OnStart()
{
AddEntityCollideCallback("Player" , "ScriptArea_1" , "DoorCloseFunc1" , true , 1);
PreloadSound("00_laugh.snt");
AddEntityCollideCallback("Player", "ScriptArea_1", "Sound", true, 1);
}


void DoorCloseFunc1(string &in asParent , string &in asChild , int alState)
{
SetSwingDoorClosed("door_1", true, true);
}

void Sound(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("sound", "00_laugh.snt", "ScriptArea_1", 0.0, false);
}

////////////////////////////
// Run when entering map
void OnEnter()
{
AddUseItemCallback("", "key_1", "door_1", "UsedKeyOnDoor", true);
}


void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("door_1", false, true);
PlaySoundAtEntity("", "Unlock_door", "door_1", 0, false);
RemoveItem("keyl_1");
}

////////////////////////////
// Run when leaving map
void OnLeave()
{

}
Thank you! i really appreciate the help Blush
04-25-2012, 04:10 PM
Find


Messages In This Thread
RE: a funtion with the same name and parameter already exists - by chweaw - 04-25-2012, 04:10 PM



Users browsing this thread: 1 Guest(s)