Please login or register.

Login with username, password and session length
Advanced search  

News:

This forum provides RSS feed. To query recent posts use this url. More...


Author Topic: Scene.ScrollTo() not working  (Read 2862 times)

0 Members and 1 Guest are viewing this topic.

Azrael

  • Regular poster
  • ***
  • Karma: 9
  • Offline Offline
  • Gender: Male
  • Posts: 155
    • View Profile
    • Mad Orange
Scene.ScrollTo() not working
« on: October 27, 2009, 11:23:53 AM »

I have a scene with a resolution of 1500x768. The actor is at the right of the scene and i want the scene to scroll to a point on the left.
The problem is that the scene don't scroll. Scene.SkipTo(); work but ScrollTo(); no (i tried with X,Y and with an entity).

As written in the docs Scene.AutoScroll is set to true.
The script is something like that:

Code: [Select]
Game.Interactive = false;
Scene.AutoScroll = true;
Scene.ScrollTo(164, 511);
Game.Interactive = true;

The game become non interactive and wait forever for the scene scrolling :(
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: Scene.ScrollTo() not working
« Reply #1 on: October 27, 2009, 11:41:25 AM »

You will want to set Scene.MainObject to null, otherwise the scene will keep trying to focus on it.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

Azrael

  • Regular poster
  • ***
  • Karma: 9
  • Offline Offline
  • Gender: Male
  • Posts: 155
    • View Profile
    • Mad Orange
Re: Scene.ScrollTo() not working
« Reply #2 on: October 27, 2009, 01:30:16 PM »

Tnx Mnemonic, setting the Game.MainObject to null it works :)
Logged
 

Page created in 0.083 seconds with 20 queries.