Please login or register.

Login with username, password and session length
Advanced search  

News:

For WME related articles and tutorials visit WME Resource Center.

Author Topic: a little problem  (Read 1886 times)

0 Members and 1 Guest are viewing this topic.

shuin

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 51
    • View Profile
a little problem
« on: April 30, 2006, 03:49:24 PM »

Hiya!!

Hope someone can help with a little problem.
I have a background image with the height larger than the scene's height. The bkg image scrolls down(dunno why, but since i wanted it to scroll it's great :P.
Also i made an invisible entity that talks (i wanted the effect of text appearing over the scrolling background).
My problem is this: the background scrolls a bit down, but when the first line of text appears (when the entity begins to talk) it stops scrolling. How can i make it continue its scrolling? I tried making the entity StickToRegion("floor"), but it doesn't work. Is there anyway to let the background continue scroll while the entity talks, and let the entity scroll with the bkg so that the writting will always be in the center of the screen?

10x in advance!
Logged
Untitled project status: production

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5681
    • View Profile
    • Dead:Code Site
Re: a little problem
« Reply #1 on: May 01, 2006, 07:27:05 AM »

Make sure you set the main scene layer dimensions in SceneEdit. You should set them to the size of your background image, otherwise the scene scrolling won't work as expected. Other than that, talking doesn't affect scene scrolling at all, it must be caused by the wrong layer dimensions.
As for changing the subtitles position, the actor/entity provides a couple of attributes for that, namely:

SubtitlesPosX
SubtitlesPosY
SubtitlesWidth
SubtitlesPosXCenter
SubtitlesPosRelative

So to move the subtitle to the center of the screen you'd call this, preferrably somewhere in game.script, after loading the actor:

actor.SubtitlesPosRelative = false; // we want absolute positioning
actor.SubtitlesPosX = Game.ScreenWidth / 2;
actor.SubtitlesPosY = Game.ScreenHeight / 2;
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

shuin

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 51
    • View Profile
Re: a little problem
« Reply #2 on: May 01, 2006, 08:41:52 PM »

Well, first of all thanx for the reply.
Second i'm really sorry to bother u guys.. after documenting myself i found out about those attributes, and i managed to put the subtitles where i want on screen with the following code:

ghost.SubtitlesPosRelative = false;
ghost.SubtitlesPosX = 300;
ghost.SubtitlesPosY = 240;

Now i have another problem. My scene is 640X480. The background image is 640X2740 :D
I set the dimensions of the scene in SceneEdit to 640X2740. The problem is that when testing the game, the scene only scrolls to 635 (Y mouse position). It then stops, it doesn't scroll further down even though there's still a lot of background. Maybe i'm doing smth wrong?

Also a new question: how do i bold a certain word in a sentence? In the font definition file the bold attribute is set to false. Where do I set it on, and how?

Sorry again for these stupid questions, but i'm not very good as u might have quessed.

Logged
Untitled project status: production

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5681
    • View Profile
    • Dead:Code Site
Re: a little problem
« Reply #3 on: May 02, 2006, 07:44:31 AM »

Quote
The problem is that when testing the game, the scene only scrolls to 635 (Y mouse position). It then stops, it doesn't scroll further down even though there's still a lot of background. Maybe i'm doing smth wrong?
The question is, how do you want your scene to scroll? Based on what? Typically the scenes scroll as the actor walks around. But if I understand it correctly, your game doesn't have a visible actor, right? So you want to scroll the scene with mouse or...?

Quote
how do i bold a certain word in a sentence?
You can't, the engine doesn't support changing font/style on-the-fly in a single sentence.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave
 

Page created in 0.229 seconds with 23 queries.