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
Scripting help needed please, fatal error...
Unearthlybrutal Offline
Posting Freak

Posts: 775
Threads: 12
Joined: May 2011
Reputation: 26
#2
RE: Scripting help needed please, fatal error...

Try thisSmile
Spoiler below!

void OnStart()
{
AddEntityCollideCallback("Player", "BruteSpawn", "ActivateBrute", true, 1);
MonsterPath();
MonsterPath1();
AddEntityCollideCallback("servant_brute_1", "ScriptArea_3", "BruteDisable", true, 1);
AddEntityCollideCallback("servant_grunt_1", "GruntDisable", "GruntDisable", true, 1);
SetEntityPlayerInteractCallback("prison_1", "LockCheck", false);
}

void LockCheck(string &in asEntity)
{
if(GetSwingDoorLocked("prison_1") == true)
{
PlaySoundAtEntity("GruntSlash", "attack_claw_hit.snt", "Scream", 1, true);
AddTimer("", 0.5f, "Scream");
SetPlayerActive(true);
StartPlayerLookAt("LookAtGrunt", 10, 50, "");
}
}

void Scream(string &in asTimer)
{
PlaySoundAtEntity("HumanScream", "21_intro_scream.snt", "Scream", 1, true);
AddTimer("", 1.0f, "Grunt");
}

void Grunt(string &in asTimer)
{
SetEntityActive("servant_grunt_1", true);
}

void MonsterPath1()
{
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_1", 0.0f, "");
}

void GruntDisable(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("servant_grunt_1", false);
SetPlayerActive(false);
StopPlayerLookAt();
}

void ActivateBrute(string &in asParent, string &in asChild, int alState)
{
StartPlayerLookAt("LookAtWall", 10, 50, "");
AddTimer("", 0.1f, "TimerStopPlayerLookAtWall");
SetPlayerActive(true);
}

void TimerStopPlayerLookAtWall(string &in asTimer)
{
StartPlayerLookAt("LookAtWall", 10, 50, "");
StopPlayerLookAt();
AddTimer("", 0.0f, "FalconPunch");
}

void MonsterPath()
{
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_2", 0.0f, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_3", 0.0f, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_4", 0.0f, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_5", 0.0f, "");
}

void FalconPunch(string &in asTimer)
{
PlaySoundAtEntity("HitWall", "attack_claw_hit.snt", "SlashSound", 1, true);
CreateParticleSystemAtEntity("WallSlash", "ps_break_cavein.ps", "LookAtWall", false);
AddTimer("", 0.3f, "BreakWall");
}

void BreakWall(string &in asTimer)
{
PlaySoundAtEntity("WallBreak", "03_break_wall.snt", "LookAtWall", 1, true);
CreateParticleSystemAtEntity("Smoke", "ps_area_fog_xlarge.ps", "Smoke", false);
CreateParticleSystemAtEntity("Smoke", "ps_area_fog_xlarge.ps", "Smoke_1", false);
CreateParticleSystemAtEntity("Smoke", "ps_area_fog_moving.ps", "SmokePush", false);
CreateParticleSystemAtEntity("Smoke", "ps_area_fog_moving.ps", "SmokePush_1", false);
CreateParticleSystemAtEntity("Smoke", "ps_area_fog_moving.ps", "SmokePush_2", false);
CreateParticleSystemAtEntity("Smoke", "ps_area_fog_moving.ps", "SmokePush_3", false);
SetEntityActive("BreakWall_1", false);
SetEntityActive("BrokenWall_1", true);
SetEntityActive("rock_debris01_1", true);
SetEntityActive("rock_debris01_2", true);
SetEntityActive("rock_debris01_3", true);
SetEntityActive("rock_debris01_4", true);
SetEntityActive("rock_debris01_5", true);
SetEntityActive("rock_debris01_6", true);
SetEntityActive("servant_brute_1", true);
StopPlayerLookAt();
StartPlayerLookAt("servant_brute_1", 10, 50, "");
}

void BruteDisable(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("servant_brute_1", false);
StopPlayerLookAt();
SetPlayerActive(false);
}


When Life No Longer Exists
Full-conversion mod
11-17-2011, 06:25 PM
Website Find


Messages In This Thread
RE: Scripting help needed please, fatal error... - by Unearthlybrutal - 11-17-2011, 06:25 PM



Users browsing this thread: 1 Guest(s)