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
InteractCallback
jessehmusic Offline
Senior Member

Posts: 423
Threads: 102
Joined: Dec 2011
Reputation: 8
#1
InteractCallback

hello my friends ! Heart

i got a problem , my script dosnt gives error but the function dosnt calls :S
any clue --> hps


void OnStart()
{
AddUseItemCallback("", "hollow_needle_1", "Locked_door", "NeedleOnDoor", true);
AddUseItemCallback("", "Key", "locked_door_1", "KeyOnDoor", true);
AddEntityCollideCallback("Player", "Horror_Barrel", "HorrorBarrel", true, 1);
AddEntityCollideCallback("Player", "MusicStart_1", "Music1", true, 1);
AddEntityCollideCallback("Player", "Event_1", "Horror_Event1", true, 0);
SetEntityPlayerInteractCallback("PuzzleOne", "PuzzleOnInteract", true);
SetEntityPlayerInteractCallback("Note_Scream2", "HeadLess", true);
SetEntityPlayerInteractCallback("Note_Scream", "Sound1", true);
}
void HeadLess(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("headless", true);
PlaySoundAtEntity("", "24_iron_maiden.snt", "Player", 0, false);
}

void Sound1(string &in asEntity)
{
PlaySoundAtEntity("", "15_prisoner_scream.snt", "Player", 0.0f, false);
}

void PuzzleOnInteract(string &in asEntity)
{
AddTimer("T1", 4, "Timer1");
}
void Timer1(string &in asTimer)
{
SetMessage("Message", "PuzzleMessage", 0);
}
void NeedleOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("Locked_door", false, true);
PlaySoundAtEntity("", "unlock_door", "Locked_door", 0, false);
RemoveItem("hollow_needle_1");
}
void KeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("locked_door_1", false, true);
PlaySoundAtEntity("", "unlock_door", "locked_door_1", 0, false);
RemoveItem("hollow_needle_1");
}
void HorrorBarrel(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("HorrorBarrel", true);
PlaySoundAtEntity("HorrorBarrel", "24_iron_maiden.snt", "Player", 0, false);
AddPropForce("HorrorBarrel", 20000, 0, 0, "world");
}

void Music1(string &in asParent, string &in asChild, int alState)

{
PlayMusic("ambience_voice.ogg", true, 0.8f, 1, 0, true);
}

void Horror_Event1(string &in asParent, string &in asChild, int alState)

{
SetEntityActive("box", true);
AddPropImpulse("box", 0, 0, 200, "world");
PlaySoundAtEntity("", "03_wind.snt", "Player", 0.0f, false);
}
void OnLeave()
{

}

http://www.moddb.com/mods/jessehmusic - Hospital of horror , WIP
(This post was last modified: 04-06-2012, 04:57 PM by jessehmusic.)
04-06-2012, 03:49 PM
Website Find
Statyk Offline
Schrödinger's Mod

Posts: 4,390
Threads: 72
Joined: Sep 2011
Reputation: 241
#2
RE: InteractCallback

Your syntax is wrong.

void HeadLess(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("headless", true);
PlaySoundAtEntity("", "24_iron_maiden.snt", "Player", 0, false);
}


it should be:

void HeadLess(string &in asEntity)
04-06-2012, 04:46 PM
Find




Users browsing this thread: 1 Guest(s)