MaZiCUT
Senior Member
Posts: 536
Threads: 31
Joined: Jun 2012
Reputation:
17
|
RE: SetPlayerActive(false) Help!
(06-08-2012, 04:45 PM)P44RTHURN4X Wrote: Hmm, that's weird...
Why does you have no names in your timer? for example:
SetPlayerActive(false);
AddTimer("game_timer", 10.0f, "freeze_end");
SetPlayerActive(true);
1. You have to put 10.0f not 10 in the timer
2. you have to continue the timer, for example:
void Freeze(string &in asParent, string &in asChild, int alState)
{
SetPlayerActive(false);
AddTimer("game_timer", 10.0f, "freeze_end");
}
void freeze_end(string &in asTimer)
{
SetPlayerActive(true);
}
Try this and then tell me what happens then...
GReeZe' P44 The player still is able to walk normally right through and nothing happends
i can post the full script:
void OnStart()
{
wakeUp();
AddEntityCollideCallback("Player", "KillTheLights", "LightsOut", true, 1);
AddEntityCollideCallback("Player", "KillTheLights", "Freeze", true, 1);
}
void Freeze(string &in asParent, string &in asChild, int alState)
{
SetPlayerActive(false);
AddTimer("game_timer", 10.0f, "freeze_end");
}
void freeze_end(string &in asTimer)
{
SetPlayerActive(true);
}
void wakeUp()
{
FadeOut(0);
FadeIn(30);
FadeImageTrailTo(2, 2);
FadeSepiaColorTo(100, 4);
SetPlayerActive(false);
FadePlayerRollTo(90, 15, 180);
FadeRadialBlurTo(0.15, 2);
SetPlayerCrouching(true);
AddTimer("trig1", 11.0f, "beginStory");
}
void beginStory(string &in asTimer){
ChangePlayerStateToNormal();
SetPlayerActive(true);
FadePlayerRollTo(0, 33, 33);
FadeRadialBlurTo(0.0, 1);
FadeSepiaColorTo(0, 4);
SetPlayerCrouching(false);
FadeImageTrailTo(0,1);
}
void LightsOut(string &in asParent, string &in asChild, int alState)
{
SetLampLit("lamp_1", false, true);
AddTimer("", 2, "Out2");
}
void Out2(string &in asTimer)
{
SetLampLit("lamp_2", false, true);
AddTimer("", 2, "Out3");
}
void Out3(string &in asTimer)
{
SetLampLit("lamp_3", false, true);
AddTimer("", 2, "Out4");
}
void Out4(string &in asTimer)
{
SetLampLit("lamp_4", false, true);
AddTimer("", 2, "Out5");
}
void Out5(string &in asTimer)
{
SetLampLit("lamp_5", false, true);
AddTimer("", 2, "Out6");
}
void Out6(string &in asTimer)
{
SetLampLit("lamp_6", false, true);
}
void OnEnter()
{
}
void OnLeave()
{
}
|
|