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: AutoScroll followed by mouse.  (Read 3180 times)

0 Members and 1 Guest are viewing this topic.

A.Y.

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 27
    • View Profile
    • http://www.free-lance.ru/users/Yar/info/
AutoScroll followed by mouse.
« on: January 25, 2008, 12:50:35 AM »

Hi, I am again.
Now, I can not change MainObject,
in one scene I need to AutoScroll followed by mouse.

actor = Game.LoadActor("actors\pichem\pichem.actor");
global mouse = Scene.MouseX;

if (Scene.Name != "map")
{
Game.MainObject = actor;
}
else
{
Game.MainObject = mouse;
}
Scene.AutoScroll = true;

Заранее,

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: AutoScroll followed by mouse.
« Reply #1 on: January 25, 2008, 04:25:40 PM »

You would need to make a loop and periodically call the Scene.ScrollTo() method, passing it parameters based on the mouse position (Game.MouseX, Game.MouseY).
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

A.Y.

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 27
    • View Profile
    • http://www.free-lance.ru/users/Yar/info/
Re: AutoScroll followed by mouse.
« Reply #2 on: January 25, 2008, 04:52:00 PM »

Thanks a lot!
 

Page created in 0.036 seconds with 19 queries.