Timer Problems
In the beginning of a custom story im making will be a cut scene that brings up text on the screen which is explaining the story, then changes the map, but the only thing that comes up is the first line, here is what i got.
void OnStart()
{
}
void OnEnter()
{
PlayMusic("10_paper_daniel01", true, 1.3f, 0.0f, 5, true);
SetPlayerActive(false);
SetMessage("PersonalThoughts", "intro-a", 3);
AddTimer("movea",4.0f,"MessageB");
}
void OnLeave()
{
}
void MessageB(string& asTextCategory, string& asTextEntry, float afTime)
{
SetMessage("PersonalThoughts", "intro-b", 3);
AddTimer("moveb",4.0f,"MessageC");
}
void MessageC(string& asTextCategory, string& asTextEntry, float afTime)
{
SetMessage("PersonalThoughts", "intro-c", 3);
AddTimer("movec",4.0f,"MessageD");
}
void MessageD(string& asTextCategory, string& asTextEntry, float afTime)
{
SetMessage("PersonalThoughts", "intro-d", 3);
AddTimer("moved",4.0f,"MessageE");
}
void MessageE(string& asTextCategory, string& asTextEntry, float afTime)
{
SetMessage("PersonalThoughts", "intro-e", 3);
AddTimer("movee",4.0f,"MessageF");
}
void MessageF(string& asTextCategory, string& asTextEntry, float afTime)
{
SetMessage("PersonalThoughts", "intro-f", 3);
AddTimer("movef",4.0f,"MessageG");
}
void MessageG(string& asTextCategory, string& asTextEntry, float afTime)
{
SetMessage("PersonalThoughts", "intro-g", 3);
AddTimer("moveg",4.0f,"Change");
}
void Change(string& asMapName, string& asStartPos, string& asStartSound, string& asEndSound)
{
ChangeMap("S-1.map", "PlayerStartArea_1", "", "");
}
(This post was last modified: 12-27-2011, 06:47 AM by Nomad923.)
|