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 callback and scripting issues! :(
G510s Offline
Banned

Posts: 58
Threads: 32
Joined: Jun 2014
#3
RE: callback and scripting issues! :(

oid OnStart()
{
PlayMusic("10_amb", true, 4.3, 7, 2, true);


AddUseItemCallback("", "Key_01", "Door_01", "DoorUnlock", true);


AddEntityCollideCallback("Player", "Script", "Music", true, 1);
}

void DoorUnlock(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked(asEntity, false, true);
PlaySoundAtEntity("", "Unlock_Door.snt", asEntity, 0, false);
RemoveItem(asItem);
}

void Music(string &in asParent, string &in asChild, int alState)
{
PlayMusic("dan_Brute", true, 3.2, 8, 1, true);
}




void OnEnter()
{

}







void OnLeave()
{

}

void OnStart()
{
PlayMusic("10_amb", true, 4.3, 7, 2, true);


AddUseItemCallback("", "Key_01", "Door_01", "DoorUnlock", true);


AddEntityCollideCallback("Player", "Script", "Music", true, 1);
}

void DoorUnlock(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked(asEntity, false, true);
PlaySoundAtEntity("", "Unlock_Door.snt", asEntity, 0, false);
RemoveItem(asItem);
}

void Music(string &in asParent, string &in asChild, int alState)
{
PlayMusic("dan_Brute", true, 3.2, 8, 1, true);
}




void OnEnter()
{

}







void OnLeave()
{

}




-------------------------------------
srry i messed up i forgot to highlight the "V" on void on start.
(This post was last modified: 06-16-2014, 09:11 AM by G510s.)
06-16-2014, 09:10 AM
Find


Messages In This Thread
callback and scripting issues! :( - by G510s - 06-16-2014, 05:04 AM
RE: callback and scripting issues! :( - by G510s - 06-16-2014, 09:10 AM
RE: callback and scripting issues! :( - by Neelke - 06-16-2014, 10:24 AM



Users browsing this thread: 1 Guest(s)