(08-27-2013, 06:56 PM)Arbies Wrote: Hello guys, in my CS, at the beggining, I want to tell the custom story's story with messages.
I make the screen black with FadeOut. Now, I want to tell the story with 8 messages.
I want to do something like this:
When I used FadeOut, First message will appear for 10 seconds, after 10 seconds, it will dissappear. The second message will appear for 10 seconds again. I want to repeat this till the last message.
I tried but I'm stuck right now. Can you guys show me an example?
switch(GetLocalVarInt("IntroVar"))
{
case 1:
SetMessage("MessageCategory","MessageText1",10);
break;
case 2:
SetMessage("MessageCategory","MessageText2",10);
break;
case 3:
SetMessage("MessageCategory","MessageText3",10);
break;
}
if(GetLocalVarInt("IntroVar") < 4) AddTimer("IntroSequence", CaseSpeed, "IntroSequence");
}
This is how I'd do it - using a switch case to run through a set of cases, one for each message. This is good as you can easily add more cases and edit current ones.