Hello, I got a question how to separate commands with the time. For instance:
sound.play();
(then i would like to wait for 3 seconds);
sound2.play();
I tried to use this:
float play = 0;
sound.play();
play += time;
if (play > 3) {sound2.play(); play = 0;}
But this is a cycled thing, and the sound is played each three seconds, I need to do it just once to separate to commands, so how?
Here are some details about what I got:
Windows 10, Visual Studio 2013, sfml 2.4.2
and also these commands:
Clock clock;
while (window.isOpen())
{
float time = clock.getElapsedTime().asMicroseconds();
clock.restart();
time = time / 800;