The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



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
Switch issues [Solved]
ProyectV Offline
Junior Member

Posts: 19
Threads: 6
Joined: Apr 2014
Reputation: 0
#1
Switch issues [Solved]

Well, this is my headache. For some reason that a i don't understand the switch only reads the case 1 and stays there. It dosen't do the other cases and it's been bothering me for about 5 to 6 hours. Help would be appreciated...

Spoiler below!


void IntroSetUp(bool IntroEscene)
{
if(IntroEscene)
{
FadeOut(0.0f);
SetPlayerRunSpeedMul(0.0f);
SetPlayerMoveSpeedMul(0.0f);
SetPlayerLookSpeedMul(0.03f);
SetPlayerCrouching(true);
SetPlayerCrouchDisabled(true);
SetPlayerJumpDisabled(true);
SetInventoryDisabled(true);
MovePlayerHeadPos(0.5f, -0.3f, 0.0f, 1.0f, 0.1f);

AddTimer("IntroMapa", 2.0f, "IntroMapa");
}
}

void IntroMapa(string &in asTimer) ///////revisar más tarde....
{
bool bPauseAtStep = false;
string sIntro = asTimer;
AddLocalVarInt(sIntro, 1);
float fEventSpeed = 1.0f;

switch(GetLocalVarInt(sIntro))
{
case 1:
PlayGuiSound("justine_wake2.ogg", 1.0f);
FadeIn(4.0f);
SetPlayerLookSpeedMul(0.06f);
SetRadialBlurStartDist(0.3f);
FadeRadialBlurTo(0.1f, 0.1f);
StartPlayerLookAt("IntroArea", 2.0f, 2.0f, "");
fEventSpeed = 2.0f;
break;

case 2:
StartPlayerLookAt("IntroArea_1", 2.0f, 2.0f, "");
break;

case 3:
StartPlayerLookAt("IntroArea_2", 2.0f, 2.0f, "");
FadeOut(3.0f);
break;

case 4:
FadeIn(1.0f);
StartPlayerLookAt("IntroArea_3", 2.0f, 2.0f, "");
fEventSpeed = 6.0f;
break;

case 5:
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_4", 0, "");
AddEnemyPatrolNode("fluttersuitor_NPC_1", "PathNodeArea_5", 0, "");
fEventSpeed = 10.0f;
break;

case 6:
FadeOut(2.0f);
PlaySoundAtEntity("", "player_bodyfall.snt", "Player", 0, false);
TeleportPlayer("StartArea");
break;

case 7:
FadeIn(1.0f);
PlaySoundAtEntity("", "react_sigh.snt", "Player", 0, false);
SetPlayerMoveSpeedMul(0.4f);
SetPlayerLookSpeedMul(0.5f);
MovePlayerHeadPos(0.5, -0.3f, 0.0f, 1.0f, 0.1f);
fEventSpeed = 3.0f;
break;

case 8:
SetPlayerCrouching(false);
PlaySoundAtEntity("", "player_stand.snt", "Player", 0, false);
MovePlayerHeadPos(0, 0, 0.0f, 0.5f, 0.1f);
SetPlayerMoveSpeedMul(0.6f);
SetPlayerLookSpeedMul(0.8f);
fEventSpeed = 1.0f;
break;

case 9:
SetPlayerCrouching(true);
PlaySoundAtEntity("", "step_walk_rock.snt", "Player", 0, false);
MovePlayerHeadPos(0.5, -0.3f, 0.0f, 1.0f, 0.1f);
SetRadialBlurStartDist(0.3f);
FadeRadialBlurTo(0.1f, 0.1f);
fEventSpeed = 1.0f;
break;

case 10:
MovePlayerHeadPos(0, 0, 0.0f, 0.0f, 0.0f);
SetPlayerMoveSpeedMul(0.8f);
SetPlayerLookSpeedMul(1.0f);
SetPlayerCrouchDisabled(false);
SetPlayerJumpDisabled(false);
SetInventoryDisabled(false);
StopPlayerLookAt();
break;

default:
bPauseAtStep = true;
break;
}

if(!bPauseAtStep)
AddTimer("", 5.0f, "StartBreakFree");

}
(This post was last modified: 04-24-2014, 04:00 PM by ProyectV.)
04-20-2014, 11:01 PM
Find


Messages In This Thread
Switch issues [Solved] - by ProyectV - 04-20-2014, 11:01 PM
RE: Switch issues - by Mudbill - 04-20-2014, 11:50 PM
RE: Switch issues - by ProyectV - 04-22-2014, 12:10 AM
RE: Switch issues - by Daemian - 04-22-2014, 02:26 AM
RE: Switch issues - by PutraenusAlivius - 04-22-2014, 08:25 AM
RE: Switch issues - by Mudbill - 04-22-2014, 09:33 AM
RE: Switch issues - by ProyectV - 04-22-2014, 07:20 PM
RE: Switch issues - by Daemian - 04-23-2014, 04:44 AM
RE: Switch issues - by ProyectV - 04-23-2014, 11:08 PM



Users browsing this thread: 4 Guest(s)