TheDavenia
Member
Posts: 223
Threads: 38
Joined: Jun 2011
Reputation:
0
|
RE: Fatal error help please
(06-28-2011, 11:10 PM)Kyle Wrote: Try this:
void OnStart()
{
AddEntityCollideCallback("korv_foreal", "korven", "BreakDoor", true, 1);
AddUseItemCallback("UseCrowbar", "crowbar_1", "korv_use_crowbar", "UseCrowbar", true);
SetLocalVarInt("CrowbarUsed", 0);
AddEntityCollideCallback("Player", "ScriptArea_1", "RollCredits", true, 1);
AddEntityCollideCallback("Player", "MonsterArea", "Spawn_Monster", true, 1);
}
void UseCrowbar(string &in asItem, string &in asEntity)
{
SetEntityActive("crowbar_joint_1", true);
RemoveItem(asItem);
AddLocalVarInt("CrowbarUsed", 1);
}
void BreakDoor(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("korv_foreal", false);
SetSwingDoorLocked("korven_door", false, true);
SetPropHealth("korven_door", 0);
SetSwingDoorClosed("korven_door", false, false);
PlaySoundAtEntity("break","break_wood_metal", "AreaBreakEffect", 0, false);
CreateParticleSystemAtEntity("breakps", "ps_hit_wood", "AreaBreakEffect", false);
SetEntityActive("broken_korv", true);
GiveSanityBoostSmall();
}
void RollCredits(string &in asParent, string &in asChild, int alState)
{
StartCredits("", true, "Ending", "MainCredits", 0);
}
void Spawn_Monster(string &in entity)
{
SetEntityActive("Korven", true);
ShowEnemyPlayerPosition("Korven");
SetMessage("Korv", "Korv2", 5.0f);
GiveSanityDamage(9.0f, true);
StartPlayerLookAt("Korven", 10, 50, "");
AddTimer("", 1.0f, "TimerStopPlayerLookAtKorven");
}
void TimerStopPlayerLookAtKorven(string &in asTimer)
{
StopPlayerLookAt();
}
void OnEnter()
{
}
void OnLeave()
{
}
Error is gone but this whole thing just doesent work now:
void Spawn_Monster(string &in entity)
{
SetEntityActive("Korven", true);
ShowEnemyPlayerPosition("Korven");
SetMessage("Korv", "Korv2", 5.0f);
GiveSanityDamage(9.0f, true);
StartPlayerLookAt("Korven", 10, 50, "");
AddTimer("", 1.0f, "TimerStopPlayerLookAtKorven");
}
void TimerStopPlayerLookAtKorven(string &in asTimer)
{
StopPlayerLookAt();
}
Thanks for trying anyways
Current Project: Nightmare's End(Project Director, Scripter, boss >:D)
|
|