Problem with scrolling

  • #1, by CrossSunday, 10. March 2013, 08:55 12 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.

    confuse cry confuse
    http://youtu.be/f47ACki6tI8

    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.

    Newbie

    92 Posts


  • #2, by afrlmeSunday, 10. March 2013, 14:46 12 years ago
    hmm it should technically be possible using lua ... (according to the data structure)
    but everything I've tried thus far causes the player to crash! roll

    Imperator

    7278 Posts

  • #3, by CrossMonday, 11. March 2013, 15:48 12 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.

    Newbie

    92 Posts

  • #4, by afrlmeMonday, 11. March 2013, 16:24 12 years ago
    nice one wink

    I was trying some of the other scroll commands/properties ...
    but I didn't really have my thinking cap on yesterday mind razz

    Imperator

    7278 Posts