Actor loses its "LeftLimit" & "RightLimit" when it is modified in event procedure
In the following example I'm trying to control an Arrow with the Left/Right keys.
The Actor behaved as expected and was limited correctly.
OnChange event listener to modify the correct Hrev of the Actor:
Actor "arrow", hrev= (int(X) < previousX)
Now the limits does not work anymore.
I also tried adding the limits strictly in the event procedure:
Actor "arrow", hrev= (int(X) < previousX),LeftLimit=400, RightLimit=Screen Width + 60
but this also did not work.
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 [X] Actor "arrow", hrev= (int(X) < previousX) previousX=Int(X) End Proc
Attached the code with the images.
No data to display