KingCrimson
Junior Member
Posts: 45
Threads: 14
Joined: Jul 2012
Reputation:
0
|
RE: Picking up an item gets a music played
I think it works. But now i get these two errors:
1- "main (42,1): INFO : Compiling void Onpickup(string&in, string&in, int)
2- "main (45,27) : ERR : Expected "(""
Here you've my .hps file's copy:
Quote:////////////////////////////
// Run when the map starts
void OnStart()
{
AddUseItemCallback("", "llave1", "puerta1", "unlock", true);
AddEntityCollideCallback("Player", "paso1", "ActivarArea", true, 1);
AddEntityCollideCallback("Player", "paso2", "Explotar", true, 1);
SetEntityCallbackFunc("linterna", "OnPickup");
}
void ActivarArea(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("paso2", true);
}
void unlock(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked(asEntity, false, true);
PlaySoundAtEntity("", "unlock_door", asEntity, 0, false);
RemoveItem(asItem);
}
void Explotar(string &in asParent, string &in asChild, int alState)
{
SetPropHealth("explosive", 0.0f);
PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false);
PlaySoundAtEntity("", "react_scare", "Player", 0, false);
PlaySoundAtEntity("", "close_door.snt", "Player", 0, false);
GiveSanityDamage(5.0f, true);
}
void OnPickup(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("agrippa", true);
PlaySoundAtEntity(string& asSoundName, string& girl_scream.snt, string& agrippa, float afFadeTime, bool false);
}
////////////////////////////
// Run when entering map
void OnEnter()
{
}
////////////////////////////
// Run when leaving map
void OnLeave()
{
}
Current Projects:
DADDY - 10%
(This post was last modified: 07-29-2012, 06:29 AM by KingCrimson.)
|
|