Facebook Twitter YouTube Frictional Games | Forum | Newsletter | Dev Blog | Dev Wiki | Support | Shelf | Store

Privacy Policy


Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
events in an order
Author Message
THE/ILL/WILL Offline
Junior Member

Posts: 11
Joined: Dec 2010
Reputation: 0
Post: #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 all posts by this user Quote this message in a reply
GraphicsKid Offline
Senior Member

Posts: 259
Joined: Dec 2010
Reputation: 1
Post: #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 all posts by this user Quote this message in a reply
THE/ILL/WILL Offline
Junior Member

Posts: 11
Joined: Dec 2010
Reputation: 0
Post: #3
RE: events in an order
wait what? i thought the threads run sequential.
01-17-2011 11:46 PM
Find all posts by this user Quote this message in a reply
Frontcannon Offline
Senior Member

Posts: 538
Joined: Jul 2010
Reputation: 0
Post: #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 all posts by this user Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)