Queuing functions
#1

Okay, I want to create a series of "InterpolateCameraPos" and "InterpolateCameraLookAt" functions using timers and textdraws to create cutscenes similar to singleplayer. my question is, do they queue? For Example

pawn Код:
if(cutsceneid == 1)
    {
        TextDrawShowForPlayer(playerid, WIDESCREEN_TOP[playerid]);
        TextDrawShowForPlayer(playerid, WIDESCREEN_BOTTOM[playerid]);
        TogglePlayerSpectating(playerid, 1);
        if(CutsceneScene[playerid] == 0)
        {
            CutsceneScene[playerid] = 1;
            InterpolateCameraPos(playerid, -2170.9817, -400.8776, 130.2300, -2176.4348, 1360.3551, 130.6170, 100000, CAMERA_MOVE);
            InterpolateCameraLookAt(playerid, -2176.4348, 1360.3551, 55.6170, -2176.4348, 1360.3551, 130.6170, 100000, CAMERA_MOVE);
        }
    }
    return 1;
Is my current script for the first scene of a cutscene, how can I add a second set of InterplateCameraPos inside that function? Can I queue them or?
Reply
#2

By queue I mean, schedule one function to execute after another one has finished.
Reply
#3

I was thinking timers, but how would I create them without having One or two timers per scene. And, what are wrapper functions?
Reply
#4

Alright, I've got a way of doing it but it's quite cockhanded, thanks for the help ^^
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)