Project

General

Profile

Bug #683

Unexpected behavior of the Actor's movement in a loop

Added by Stéphane VINCENT about 3 years ago. Updated about 3 years ago.

Status:
New
Priority:
Normal
Assignee:
AOZ Studio Team
Target version:
-
Start date:
03/05/2021
Due date:
% Done:

0%

Estimated time:
Affected version:

Description

Please consider the following code:

Actor "magicien", X=0, Y=0, Image$="lucie.png", EndX=1920, loopmove=True
Do
    A$ = Inkey$
    If A$ = "p" or A$="P" Then Actor "magicien", ActionMove$="pause"
    If A$ = " " Then Actor "magicien", ActionMove$="play"
Loop

If the Actor's movement is interrupted and restored, the movement will start from the interruption point and not from the initial start.
For instance, if the position is X=700 when "pause" is activated, the movement loop will be between x=700 and x=1920, instead of the expected range (0 - 1920).
This can be really confusing.

Also available in: Atom PDF