Frictional Games Forum (read-only)
events in an order - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods (https://www.frictionalgames.com/forum/forum-35.html)
+--- Thread: events in an order (/thread-6254.html)



events in an order - THE/ILL/WILL - 01-17-2011

hay guys im messing around with in game cut scenes and i have a few bits of cannibalized code that isent working for my haha anyone have any pointers on what im not understanding? the problem is its not switching to the next else if Sad

void Time_Tele(string &in asTimer)
{

int lState = GetLocalVarInt("Teleport");
AddLocalVarInt("Teleport",1);
float fNextEventTime = 1.0f;
bool bPause = true;
//--------------------------------------------
//#1
if(lState ==0)
{
FadeIn(3.0f);
SetPlayerMoveSpeedMul(0.35f);
SetPlayerRunSpeedMul(0);
FadeSepiaColorTo(1,1);
fNextEventTime = 5.0f;
}
//----------------------------------------------
//#2
else if(lState ==1)
{
FadeOut(2.0);
}

if(bPause==false)
AddTimer("Teleport", fNextEventTime, "TimeTele");
}

///////////////
nm i solved my problem i just put in a tun of timers for each one


RE: events in an order - GraphicsKid - 01-17-2011

You're setting the variable to another variable before the latter is declared.


RE: events in an order - THE/ILL/WILL - 01-17-2011

wait what? i thought the threads run sequential.


RE: events in an order - Frontcannon - 01-17-2011

(01-17-2011, 08:25 PM)GraphicsKid Wrote: You're setting the variable to another variable before the latter is declared.

AFAIK undeclared variables are always 0.