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
Sequence (i.e. switch) Question
Kreekakon Offline
Pick a god and pray!

Posts: 3,063
Threads: 70
Joined: Mar 2012
Reputation: 124
#2
RE: Sequence (i.e. switch) Question

AddLocalVarInt("iIntroPart", 1);

This will boost up the int each time the function is called again, taking it to the next step.


This:

partSpeed = 21.0f;

and this:

if (GetLocalVarInt("iIntroPart") <2)
{
AddTimer("tmrIntro", partSpeed, "introSequence");
}

...will determine that if the sequence is not yet finished then it will play the entire thing again after the time that was set in partSpeed in the previous one.

When time is up, and the function fires again AddLocalVarInt("iIntroPart", 1); will activate allowing the next step in the sequence to play out.

[Image: Tv0YgQb.gif]
Image by BandyGrass
12-04-2013, 04:56 PM
Find


Messages In This Thread
Sequence (i.e. switch) Question - by RaideX - 12-04-2013, 03:59 PM
RE: Sequence (i.e. switch) Question - by Kreekakon - 12-04-2013, 04:56 PM
RE: Sequence (i.e. switch) Question - by RaideX - 12-04-2013, 05:10 PM



Users browsing this thread: 1 Guest(s)