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:/
Froggit Offline
Junior Member

Posts: 20
Threads: 4
Joined: Feb 2012
Reputation: 0
#9
RE: flamez3

(03-03-2012, 03:13 AM)flamez3 Wrote: Ah sorry, wrong event. c:

Replace the SetLightVisible("torch_static_01, true); with


SetLampLit("torch_static01_1", false, true);


All the way down to torch_static_23
Wooohhh!!! It workedBig Grin . But the sound and the particle system didnt work. Did I have to change that stuff also? And I dont have a particle system in level editor just the 2 script areas, one for lights and a small box for particle i think. Here is my script updated. And im really sorry if this is stressing you out because I dont know scripting for sh*t Tongue
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);
SetLampLit("torch_static01_1", false, true);
SetLampLit("torch_static01_2", false, true);
SetLampLit("torch_static01_3", false, true);
SetLampLit("torch_static01_4", false, true);
SetLampLit("torch_static01_5", false, true);
SetLampLit("torch_static01_6", false, true);
SetLampLit("torch_static01_7", false, true);
SetLampLit("torch_static01_8", false, true);
SetLampLit("torch_static01_9", false, true);
SetLampLit("torch_static01_10", false, true);
SetLampLit("torch_static01_11", false, true);
SetLampLit("torch_static01_12", false, true);
SetLampLit("torch_static01_13", false, true);
SetLampLit("torch_static01_14", false, true);
SetLampLit("torch_static01_15", false, true);
SetLampLit("torch_static01_16", false, true);
SetLampLit("torch_static01_17", false, true);
SetLampLit("torch_static01_18", false, true);
SetLampLit("torch_static01_19", false, true);
SetLampLit("torch_static01_20", false, true);
SetLampLit("torch_static01_21", false, true);
SetLampLit("torch_static01_22", false, true);
SetLampLit("torch_static01_23", false, true);
PlaySoundAtEntity("", "sound3", "ScriptAreaParticle", 0, true);
}

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

////////////////////////////
// Run when leaving map
void OnLeave()
{
}
03-03-2012, 03:39 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: 1 Guest(s)