Please login or register.

Login with username, password and session length
Advanced search  

News:

IRC channel - server: waelisch.de  channel: #wme (read more)

Author Topic: Scene.SkipTo() not working on vertical scrolling scene  (Read 4768 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.SkipTo() not working on vertical scrolling scene
« on: October 20, 2009, 09:09:25 AM »

In a game with a resolution of 1024x768 we have a scene in 1024x850.
Entering from another location the actor is placed vertically at the middle of the scene so, when the actor enter in the scene, the scene scroll up a bit.
With another position for the actor at the top of the scene it do the same.

I have tried "Scene.SkypTo(X, Y);" and also "Scene.SkypTo(actor);" but the scene always scroll down to the actor's position.

In horizontal scrolling scene i have no problem, it works perfectly. But in this scene it doesn't seem to want to work  :-\
Logged

metamorphium

  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 12
  • Offline Offline
  • Gender: Male
  • Posts: 1511
  • Vampires!
    • View Profile
    • CBE  software s.r.o.
Re: Scene.SkipTo() not working on vertical scrolling scene
« Reply #1 on: October 20, 2009, 06:32:01 PM »

um, should be Scene.SkipTo no SkypTo
Logged
J.U.L.I.A. Enhanced Edition, Vampires!, J.U.L.I.A., J.U.L.I.A. Untold, Ghost in the Sheet

Azrael

  • Regular poster
  • ***
  • Karma: 9
  • Offline Offline
  • Gender: Male
  • Posts: 155
    • View Profile
    • Mad Orange
Re: Scene.SkipTo() not working on vertical scrolling scene
« Reply #2 on: October 20, 2009, 08:15:14 PM »

Sorry, it's Skip not Skyp yes :P . But in the scripts it is write in the right way ;)
Logged

lacosaweb

  • Regular poster
  • ***
  • Karma: 1
  • Offline Offline
  • Posts: 111
    • View Profile
Re: Scene.SkipTo() not working on vertical scrolling scene
« Reply #3 on: January 19, 2010, 11:17:02 AM »

Try this before Scene.Skipto:

Game.MainObject(null);

Because if the Main Object is the actor, the game always scrolls to the x,y of main object.
Logged

Azrael

  • Regular poster
  • ***
  • Karma: 9
  • Offline Offline
  • Gender: Male
  • Posts: 155
    • View Profile
    • Mad Orange
Re: Scene.SkipTo() not working on vertical scrolling scene
« Reply #4 on: January 19, 2010, 01:12:56 PM »

No, it didn't work.

Changing the main object to null works for Scene.ScrollTo but not for SkipTo.
Scene.SkipTo still works perfectly in horizontal scrolling scene, but not with this vertical scrolling.

But i found the problem. The coordinates where wrong.
In a horizontal scrolling scene i set the same coordinates of the main actor and it works. In vertical scrolling i have to found the coordinates manually  :(

For example if the actor is skipped to 490, 516 i have to write 490, 410 for the Scene.SkipTo method.
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5673
    • View Profile
    • Dead:Code Site
Re: Scene.SkipTo() not working on vertical scrolling scene
« Reply #5 on: January 19, 2010, 01:17:56 PM »

There's one thing to remember, the SkipTo / ScrollTo methods try to focus onto the middle point of the actor. Perhaps that's the disproportion you need to add, half the height of the actor? Just a guess.
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.SkipTo() not working on vertical scrolling scene
« Reply #6 on: January 19, 2010, 05:43:33 PM »

It seem to be the height of the actor, anyway solved.
Sorry for the error in reporting this, it's not a bug :P
Logged
 

Page created in 0.175 seconds with 23 queries.