Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- r_interrupt = false;
- r_doLoop = true;
- _started = false;
- _finished = false;
- //////////////
- _position = getPos player; // gets the position [x,y,z]
- _posX = _position select 0; // 1th element -> x
- _posY = _position select 1; // 2nd element -> y
- _counter = 0.0; // animation duration checker
- while {r_doLoop} do {
- _positionCheck = getPos player;
- _newX = _positionCheck select 0; // 1th element -> x
- _newY = _positionCheck select 1; // 2nd element -> y
- _counter = _counter + 0.1; // same as the sleep timer: 0.1 sec
- if (_counter > 1.5) then { // amount of secs the animation takes estimated ? 2 secs?
- r_doLoop = false;
- _counter = 0.0;
- _finished = true;
- };
- if (_newX != _posX || _newY != _posY) then {
- r_doLoop = false;
- };
- sleep 0.1;
- };
- r_doLoop = false;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement