How to make things happen when you return hub after picking up item?
Okay my big problem my custom story trying to fix it. I have already project released but noticed this when final testing my map.
Basicly this is have to happen.
I have Item to pick that up in "Dark Storage" but when I came back from "Dark Storage" to the hub "Areas triggers many slimes, and atmosphere changes. but when I came back this not happens. Now where is the problem? This is my script:
Last area trigger when I pick up that item and go back:
void Leaving_events(string &in entity)
{
PlaySoundAtEntity("", "guardian_activated", "Player", 0, false);
SetPlayerActive(false);
SetEntityActive("Falling_grunt", true);
SetEntityActive("Falling_grunt_2", true);
StartEffectFlash(0.2f, 1.0f, 1.0f);
SetLampLit("hanging_lantern_ceiling_1", true, true);
SetLampLit("hanging_lantern_ceiling_2", true, true);
SetPropActiveAndFade("slime_egg_1", true, 1.5);
SetPropActiveAndFade("slime_egg_2", true, 1.5);
SetPropActiveAndFade("slime_pile_large_1", true, 1.5);
SetPropActiveAndFade("slime_pile_large_2", true, 1.5);
SetPropActiveAndFade("slime_pile_large_3", true, 1.5);
SetPropActiveAndFade("slime_pile_1", true, 1.5);
SetPropActiveAndFade("slime_pile_2", true, 1.5);
SetPropActiveAndFade("slime_pile_3", true, 1.5);
SetPropActiveAndFade("slime_6way_1", true, 1.5);
CreateParticleSystemAtEntity("", "ps_guardian_appear_explosion", "slime_egg_1", false);
CreateParticleSystemAtEntity("", "ps_guardian_appear_explosion", "slime_egg_2", false);
CreateParticleSystemAtEntity("", "ps_guardian_appear_explosion", "slime_pile_large_1", false);
CreateParticleSystemAtEntity("", "ps_guardian_appear_explosion", "slime_pile_large_2", false);
CreateParticleSystemAtEntity("", "ps_guardian_appear_explosion", "slime_pile_large_3", false);
CreateParticleSystemAtEntity("", "ps_guardian_appear_explosion", "slime_pile_1", false);
CreateParticleSystemAtEntity("", "ps_guardian_appear_explosion", "slime_pile_2", false);
CreateParticleSystemAtEntity("", "ps_guardian_appear_explosion", "slime_pile_3", false);
CreateParticleSystemAtEntity("", "ps_guardian_appear_explosion", "slime_6way_1", false);
SetEntityActive("corpse_pile2_2", true);
SetEntityActive("corpse_pile2_3", true);
SetEntityActive("corpse_pile2_4", true);
SetEntityActive("corpse_pile2_5", true);
SetEntityActive("corpse_pile2_6", true);
SetEntityActive("corpse_pile2_7", true);
SetEntityActive("corpse_pile2_8", true);
SetEntityActive("corpse_pile2_9", true);
SetEntityActive("hanging_prisoner_1", true);
StartPlayerLookAt("hanging_prisoner_1", 15.5f, 15.5f, "");
AddTimer("Stopstare", 3, "Stoplook_corpse");
}
void Stoplook_corpse(string &in asTimer)
{
SetEntityActive("hanging_prisoner_1", false);
SetPlayerActive(true);
StopPlayerLookAt();
}
Map where "Strange things have to happen" :
{
AddEntityCollideCallback("Player", "Slimespawn", "noback", true, 1);
AddEntityCollideCallback("Player", "Slimespawn2", "noback2", true, 1);
}
void noback(string &in asParent, string &in asChild, int alState)
{
if(HasItem("Underground Tunnel Key"))
{
PlayMusic("14_elevator_falls", true, 3, 3, 10, true);
StartScreenShake(0.008, 0.5f, 0.1f,0.3f);
RemoveEntityCollideCallback("Player", "Slimespawn");
SetEntityActive("SlimeDamageArea_1", true);
SetEntityActive("slime_6way_1", true);
StartScreenShake(0.1, 3, 0.3, 2);
PlaySoundAtEntity("", "04_scream.snt", "Player", 0, false);
}
}
void noback2(string &in asParent, string &in asChild, int alState)
{
if(HasItem("Underground Tunnel Key"))
{
StartEffectFlash(0.2f, 1.0f, 1.0f);
StartScreenShake(0.008, 0.5f, 0.1f,0.3f);
PlaySoundAtEntity("", "guardian_ontop.snt", "slime_6way_3", 0, false);
RemoveEntityCollideCallback("Player", "Slimespawn");
SetPropActiveAndFade("slime_pile_large_1", true, 1.5);
SetPropActiveAndFade("slime_anim_wall_1", true, 1.5);
SetPropActiveAndFade("slime_anim_wall_2", true, 1.5);
SetPropActiveAndFade("slime_pile_large_2", true, 1.5);
SetPropActiveAndFade("slime_pile_large_3", true, 1.5);
SetPropActiveAndFade("slime_6way_3", true, 1.5);
SetPropActiveAndFade("slime_6way_4", true, 1.5);
SetEntityActive("fountain_childsnake_blood_1", true);
SetEntityActive("fountain_childsnake_blood_2", false);
SetEntityActive("slime_6way_3", true);
SetEntityActive("slime_6way_4", true);
SetEntityActive("slime_pile_large_1", true);
SetEntityActive("slime_pile_large_2", true);
SetEntityActive("slime_pile_large_3", true);
SetEntityActive("slime_anim_wall_1", true);
SetEntityActive("slime_anim_wall_2", true);
StartScreenShake(0.1, 3, 0.3, 2);
}
}
These scripts are not activating why? What I am doing wrong ?
Help is quickly appreciated. Thanks.
“Life is a game, play it”
(This post was last modified: 08-09-2011, 01:33 PM by HumiliatioN.)
|