Project

General

Profile

Bug #852

Actor dose not maintain modified Hrev property value

Added by Ronen Malka over 2 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Target version:
Start date:
10/14/2021
Due date:
% Done:

0%

Estimated time:
Affected version:

Description

In the following example I'm trying to control an Arrow with the Left/Right keys.
I added OnChange event listener to modify the correct Hrev of the Actor: Actor "arrow", hrev=(int(X) < previousX)

During the key press the Actor change the Hrev correctly, but as soon as the key release Actor restore the Hrev to the previous value

Full code:

Global previousX

Actor "arrow", Image$="arrow",x=800,y=300, Scale=0.25, \
        Control$="ArrowRight: offsetX = 18; ArrowLeft: offsetX = -18", \
        LeftLimit=400, RightLimit=Screen Width + 60 ,OnChange$="onArrowMove"
do
    Wait Vbl
Loop

Procedure onArrowMove [EVENT$,INDEX$,X]
    if x<>previousX then log "previousX="+str$(previousX)+ Str$(Int(X) < previousX) +" " + EVENT$
    Actor "arrow", hrev= (int(X) < previousX)
    previousX=Int(X)
End Proc

Attached the code with the images.


Files

tst123.zip (8.29 MB) tst123.zip code + images to reproduce. Ronen Malka, 10/14/2021 07:41 PM

No data to display

Also available in: Atom PDF