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.)
|