#1, by CrossSunday, 10. March 2013, 08:55 8 years ago
I'd like to scroll my scene through a mouseover-action. It should stop scrolling, when the cursor leaves the action area. I can make the scene scroll using the "scroll to"-command, but can't make it stop before it reaches the end of the backgroundimage. Any ideas how to solve this problem? The video-link shows, how it's supposed to look in the game. Here i'm using the auto-scroll-function of the engine, but that's no real solution.
Ich würde meine Kulisse gerne zur Seite scrollen lassen, wenn die Maus über ein Aktionsfeld fährt und das Scrollen wieder beenden, wenn sie das Aktionsfeld verlässt. Dabei sollen dann auch jeweils noch andere Aktionen ausgelöst werden. Ich bekomme es mit dem Befehl "scroll to" hin, dass die Kulisse sich bewegt, kann dieses Scrollen aber nicht abbrechen. Hat jemand eine Idee? Wie das im Spiel aussehen soll, kann man in dem Video oben sehen, wo ich die Auto-Scroll-Funktion der Engine dafür verwende. Diese ist aber keine dauerhafte Lösung, weil ich das Scrollen gezielt an- und abschalten können muss und außerdem der Scrollbereich rechts schon auf dem Charakterpanel beginnen soll.
#3, by CrossMonday, 11. March 2013, 15:48 8 years ago
Thanks for your effort, AFRLme, i meanwhile found indeed a simple lua-solution for this. I use the normal "scroll to" command as a mouseover-action on an object and set the scrollspeed to zero (game:setValue(VGameScrollSpeed, 0)) when the cursor leaves the objectarea. The speed is of course set back to normal, when entering the area. Works fine for me. Once again, thanks for your help.