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
[Solved] Scripting in need of help:/
flamez3 Offline
Posting Freak

Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation: 57
#4
RE: Scripting in need of help:/

Use this:

void OnStart()
{
AddEntityCollideCallback("Player", "ScriptArea_1", "MonsterFunction", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_2", "dust", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_3", "LightFade", true, 1);

}
void MonsterFunction(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("servant_brute_1", true);
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_1", 2, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_2", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_3", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_4", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_5", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_6", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_7", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_8", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_9", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_10", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_11", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_12", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_13", 0, "");
}
void dust(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("ParticleSystem_2", true);
}
void LightFade(string &in asParent, string &in asChild, int alState)
{
SetLightVisible("pointlight_0", false);
SetLightVisible("pointlight_1", false);
SetLightVisible("pointlight_2", false);
SetLightVisible("pointlight_3", false);
SetLightVisible("pointlight_4", false);
SetLightVisible("pointlight_5", false);
SetLightVisible("pointlight_6", false);
SetLightVisible("pointlight_7", false);
SetLightVisible("pointlight_8", false);
SetLightVisible("pointlight_9", false);
SetLightVisible("pointlight_10", false);
SetLightVisible("pointlight_11", false);
SetLightVisible("pointlight_12", false);
SetLightVisible("pointlight_13", false);
SetLightVisible("pointlight_14", false);
SetLightVisible("pointlight_15", false);
SetLightVisible("pointlight_16", false);
SetLightVisible("pointlight_17", false);
SetLightVisible("pointlight_18", false);
SetLightVisible("pointlight_19", false);
SetLightVisible("pointlight_20", false);
SetLightVisible("pointlight_21", false);
SetLightVisible("pointlight_22", false);
SetLightVisible("pointlight_23", false);
SetLightVisible("pointlight_24", false);
SetLightVisible("pointlight_25", false);
CreateParticleSystemAtEntity("ps", "ps_dust_whirl.ps", "ScriptAreaParticle", true);
SetLightVisible("torch_static01_1", true);
SetLightVisible("torch_static01_2", true);
SetLightVisible("torch_static01_3", true);
SetLightVisible("torch_static01_4", true);
SetLightVisible("torch_static01_5", true);
SetLightVisible("torch_static01_6", true);
SetLightVisible("torch_static01_7", true);
SetLightVisible("torch_static01_8", true);
SetLightVisible("torch_static01_9", true);
SetLightVisible("torch_static01_10", true);
SetLightVisible("torch_static01_11", true);
SetLightVisible("torch_static01_12", true);
SetLightVisible("torch_static01_13", true);
SetLightVisible("torch_static01_14", true);
SetLightVisible("torch_static01_15", true);
SetLightVisible("torch_static01_16", true);
SetLightVisible("torch_static01_17", true);
SetLightVisible("torch_static01_18", true);
SetLightVisible("torch_static01_19", true);
SetLightVisible("torch_static01_20", true);
SetLightVisible("torch_static01_21", true);
SetLightVisible("torch_static01_22", true);
SetLightVisible("torch_static01_23", true);
PlaySoundAtEntity("", "sound3", "ScriptAreaParticle", 0, true);
}

////////////////////////////
// Run when entering map
void OnEnter()
{
}

////////////////////////////
// Run when leaving map
void OnLeave()
{
}

On PlaySoundAtEntity in the last function you didn't use the " on the end of sound3.

(This post was last modified: 03-02-2012, 05:44 AM by flamez3.)
03-02-2012, 05:41 AM
Find


Messages In This Thread
[Solved] Scripting in need of help:/ - by Froggit - 03-02-2012, 03:16 AM
RE: Scripting in need of help:/ - by flamez3 - 03-02-2012, 03:53 AM
RE: flamez3 - by Froggit - 03-02-2012, 04:40 AM
RE: Scripting in need of help:/ - by flamez3 - 03-02-2012, 05:41 AM
RE: flamez3 - by Froggit - 03-02-2012, 02:25 PM
RE: Scripting in need of help:/ - by flamez3 - 03-02-2012, 03:10 PM
RE: flamez3 - by Froggit - 03-02-2012, 11:08 PM
RE: Scripting in need of help:/ - by flamez3 - 03-03-2012, 03:13 AM
RE: flamez3 - by Froggit - 03-03-2012, 03:39 AM
RE: Scripting in need of help:/ - by flamez3 - 03-03-2012, 05:01 AM
RE: Scripting in need of help:/ - by Froggit - 03-03-2012, 05:10 AM
RE: Scripting in need of help:/ - by flamez3 - 03-03-2012, 07:11 AM
RE: flamez3 - by Froggit - 03-03-2012, 03:41 PM
RE: Scripting in need of help:/ - by flamez3 - 03-03-2012, 03:54 PM
RE: Scripting in need of help:/ - by Froggit - 03-04-2012, 02:20 AM
RE: Scripting in need of help:/ - by flamez3 - 03-04-2012, 02:42 AM



Users browsing this thread: 3 Guest(s)