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
events in an order
THE/ILL/WILL Offline
Junior Member

Posts: 11
Threads: 4
Joined: Dec 2010
Reputation: 0
#1
events in an order

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
(This post was last modified: 01-17-2011, 10:41 AM by THE/ILL/WILL.)
01-17-2011, 10:21 AM
Find
GraphicsKid Offline
Senior Member

Posts: 258
Threads: 34
Joined: Dec 2010
Reputation: 3
#2
RE: events in an order

You're setting the variable to another variable before the latter is declared.
01-17-2011, 08:25 PM
Find
THE/ILL/WILL Offline
Junior Member

Posts: 11
Threads: 4
Joined: Dec 2010
Reputation: 0
#3
RE: events in an order

wait what? i thought the threads run sequential.
01-17-2011, 11:46 PM
Find
Frontcannon Offline
Senior Member

Posts: 538
Threads: 10
Joined: Jul 2010
Reputation: 2
#4
RE: events in an order

(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.


╔═════════════════╗
☺ Smoke weed everyday ☺
╚═════════════════╝
01-17-2011, 11:48 PM
Find




Users browsing this thread: 1 Guest(s)