Please login or register.

Login with username, password and session length
Advanced search  

News:

Latest WME version: WME 1.9.1 (January 1st, 2010) - download

Author Topic: stop scrolling  (Read 3855 times)

0 Members and 1 Guest are viewing this topic.

eborr

  • Regular poster
  • ***
  • Karma: 4
  • Offline Offline
  • Posts: 196
    • View Profile
stop scrolling
« on: October 11, 2010, 10:34:22 PM »

been pulling my hair out with scrolling today, basically what happens is that objects in a window are scrolling in sympathy to the main screen. I have tried using GoExclusive and all that happens is the objects don't appear.  Currently I am fiddling about with setting the main object to null which sort of works but if the scrolling is still underway the objects move in sympathy with the last move of the main object. Is there a function which just stops the sreen from scrolling ?

The odd thing is that when I used static controls in the window this wasn't an issue, it's only become a problem now that I have moved to entity containers.
Logged

eborr

  • Regular poster
  • ***
  • Karma: 4
  • Offline Offline
  • Posts: 196
    • View Profile
Re: stop scrolling
« Reply #1 on: October 13, 2010, 09:09:45 AM »

More on this I don't think is scrolling is working, is there some attribute to set ?

Using the empty project I have extended the main layer by 1200 to 600 and instered a single region entity called desk.

below is the left click code for desk
Code: [Select]
on "LeftClick"
{
Game.AutoScroll = true;
actor.GoToObject(this);
while (Scene.IsScrolling)

{

Game.Msg("Game scrolling");
Sleep(20);
}
}

It appears that the IsScrolling test is never made .. later if the test is set to a negative, then it appears to work
« Last Edit: October 13, 2010, 09:27:56 AM by eborr »
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: stop scrolling
« Reply #2 on: October 13, 2010, 09:17:46 AM »

You'd have to use GoToObjectAsync. GoToObject waits until the actor reaches the destination.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

eborr

  • Regular poster
  • ***
  • Karma: 4
  • Offline Offline
  • Posts: 196
    • View Profile
Re: stop scrolling
« Reply #3 on: October 13, 2010, 10:10:06 AM »

Thanks I tried that unfortunately it does't have any effect on my core problem which is stated quite badly above. To re-iterate.

I have some code in the actor script which replaces the actor talk function. Basically the text is passed to to a method in the actor script which firstly initiates a window, that window contains an entity container, and it is the contained entity that "talks"

The talking animation is working very nicely and appears to be in an constant position within the window, the problems comes with the subtitles which don't stay in a fixed relationship with the entity or the entity container, but rather want to follow a position which is relative to the scrolling window.

This being the case my strategy was before the talk statement to first test if the window is scrolling, and if that was the case in some way to stop the scrolling process, none of this appears to work.

First Prize would be that the window and all of it's objects are fixed,  whatever scrolling occurs in the background, second prize would be to be able to test for the scrolling condition and if necessary suspend scrolling until such time as it ceases
Code: [Select]
method speak(texti)

{

  var  tempstate = Game.Interactive;
  Game.Interactive= false;
   global dlgWin = Game.LoadWindow("interface\menu\newresponse.window");
   
   dlgWin.GoSystemExclusive;

    dlgWin.InGame = true;
   

    var speaker  = dlgWin.GetControl("robot");
     var talkrobot = speaker.GetEntity();


  talkrobot.SetSprite("theads\ron.png");
  talkrobot.SetTalkSprite("theads\ron.sprite");
      talkrobot.SetFont("fonts\1942.font");
     talkrobot.SubtitlesPosRelative = true;
      talkrobot.SubtitlesPosXCenter = false;
      talkrobot.SubtitlesWidth = 200;
  talkrobot.SubtitlesPosY = 90;
  talkrobot.SubtitlesPosX = 180;

Sleep(10);
      talkrobot.Talk(texti);
  Game.UnloadObject(dlgWin);
 Game.Interactive=tempstate;
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: stop scrolling
« Reply #4 on: October 13, 2010, 10:20:54 AM »

The default speech subtitles are indeed affected by scene scrolling - IF they are relative to actor. I think you should set the SubtitlesPosRelative property to false and set the absolute position of the subtitle (based on the window position).
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

eborr

  • Regular poster
  • ***
  • Karma: 4
  • Offline Offline
  • Posts: 196
    • View Profile
Re: stop scrolling
« Reply #5 on: October 13, 2010, 10:38:30 AM »

That would make sense in terms of the way that the screen is behaving, however, as the "speech" is actually coming from the entity talking, and the subtitles relative is taken from the entity position, then I guess it would be better is that relationship was maintained rather than following the MainObject, ok we are where we are, I will see if there is something I can do in relation to the absolute screen position.
thanks.

That appears to have solved the problem - for the time being at least - until the next time many thanks
« Last Edit: October 13, 2010, 10:43:39 AM by eborr »
Logged
 

Page created in 0.052 seconds with 20 queries.