Froggit
Junior Member
Posts: 20
Threads: 4
Joined: Feb 2012
Reputation:
0
|
RE: flamez3
(03-02-2012, 05:41 AM)flamez3 Wrote: 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.
My map worked but the flamez3 didn't fade. Should I fit the script area to the size of the room maby? I dont know but thank you tons for helping me bro.
|
|