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
how do I use global variables concept? [Solved]
Acies Offline
Posting Freak

Posts: 1,643
Threads: 60
Joined: Feb 2011
Reputation: 73
#2
RE: how do I use global variables concept?

This should probably be placed in developement support. Secondly I'm not the best scripter :>

I would do it like this:

To each of the events you described insert a;

AddGlobalVarInt("TasksDone", 1);

The value starts at 0, so for each "task" done it adds one to it. After all of the 20(?) tasks are done; the variable "TasksDone" should be = 20.

Then at the end (going to bed):

void ToBedFunc()
{
if (GetLocalVarInt("TasksDone") == 20)

{
FadeOut(4);
//And so forth
}
else
SetMessage("Tips", "AllTasksAreNotDone", 0.0f);

}


[Image: mZiYnxe.png]


12-04-2011, 10:32 PM
Find


Messages In This Thread
RE: how do I use global variables concept? - by Acies - 12-04-2011, 10:32 PM



Users browsing this thread: 1 Guest(s)