The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



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
still having script problem and a simple question
zecuro Offline
Member

Posts: 162
Threads: 33
Joined: Jul 2011
Reputation: 3
#1
still having script problem and a simple question

this is a 2 question
hey everyone heres my hole hps file....when i try to run amnesia they tell me that there still something wrong my my hps file well one of my script
can someone check it out
void OnStart()
{
AddEntityCollideCallback("Player", "explode_scare", "Explode", true, 1);
AddUseItemCallback("", "key_1", "mansion_3", "FUNCTION", true);
}
void FUNCTION(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked(asEntity, false, true);
PlaySoundAtEntity("", "unlock_door", asEntity, 0, false);
RemoveItem(asItem);
}
void Explode(string &in asParent, string &in asChild, int alState)
{
SetPropHealth("pot_explode", 0);
}
void OnEnter()
{
AddEntityCollideCallback("Player", "bang", "func_slam", true, 1);
}
void OnLeave()
{
}
void func_slam(string &in asParent, string &in asChild, int alState)
{
SetSwingDoorClosed("mansion_2", true, true);
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 OnStart()
{
FadeOut(0);
FadeIn(5);
SetPlayerActive(false);
SetPlayerCrouching(true);
SetInventoryDisabled(true);
MovePlayerHeadPos(0, -2, 0, 2, -2);
StartPlayerLookAt("ScriptArea_1", 10, 10, "");
AddTimer("T1", 5.5, "TimerFunc");
AddTimer("T2", 10, "TimerFunc");
AddTimer("T3", 13.5, "TimerFunc");
AddTimer("T4", 16, "TimerFunc");
}
void TimerFunc(string &in asTimer)
{
string x = asTimer;
if (x == "T1")
{
FadeOut(4);
PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false);
}
else if (x == "T2")
{
FadeIn(3);
}
else if (x == "T3")
{
FadeOut(2);
StopPlayerLookAt();
PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false);
MovePlayerHeadPos(0, 2, 0, 2, 2);
}
else if (x == "T4")
{
FadeIn(2);
SetPlayerActive(true);
SetPlayerCrouching(false);
SetInventoryDisabled(false);
PlaySoundAtEntity("", "react_breath.snt", "Player", 0, false);
}
}
and the second question is is there a tutorial on how to add a sound effect when picking up a note ot an item
PLZ HElP
07-24-2012, 02:44 AM
Find


Messages In This Thread
still having script problem and a simple question - by zecuro - 07-24-2012, 02:44 AM



Users browsing this thread: 1 Guest(s)