Please login or register.

Login with username, password and session length
Advanced search  

News:

Forum rules - please read before posting, it can save you a lot of time.

Author Topic: foreground layer  (Read 4209 times)

0 Members and 1 Guest are viewing this topic.

adonf

  • Regular poster
  • ***
  • Karma: 0
  • Offline Offline
  • Posts: 124
    • View Profile
foreground layer
« on: September 12, 2006, 03:08:32 PM »

Hi,

I thought that free entities and actors lived in the main layer (as confirmed by this thread) but when I tried to play a video in the foreground it got hidden by a free entity.

Here's what I did: I created a foreground layer (same dimensions as main layer, not set as 'close-up' and placed after 'main' in the layer list) and placed an anchor region at the position the video should play. Then in the scene script I call
Code: [Select]
var my_video = Scene.GetNode("video_region");
my_video.PlayTheora("scenes\video.ogg", 1);

The video is partly hidden by a free entity with a higher Y position (well, lower in space but higher in value).

Is there a way to ensure that something will always be in the foreground ?

Thanks,
  Olivier
Logged
I am the Milkman. My milk is good.

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: foreground layer
« Reply #1 on: September 12, 2006, 03:27:09 PM »

I'm not sure I fully understand the setup. What is "video_region"? If it's a sprite entity in the foreground layer, it should be always in the foreground and never obstructed by any free entity.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

adonf

  • Regular poster
  • ***
  • Karma: 0
  • Offline Offline
  • Posts: 124
    • View Profile
Re: foreground layer
« Reply #2 on: September 12, 2006, 05:11:53 PM »

sorry if that was unclear: video_region is a region entity. I use its position to place the video in the scene editor and not in script. but even if i put an animated sprite at the same position the sprite is hidden by that free entity.

could it be because the free entity's hot spot is way below the bottom of the screen (and bellow the bottom of the layers too) ?

Logged
I am the Milkman. My milk is good.

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: foreground layer
« Reply #3 on: September 12, 2006, 05:17:12 PM »

could it be because the free entity's hot spot is way below the bottom of the screen (and bellow the bottom of the layers too) ?
I suppose the entity's hotspot is outside any scene region, is that right? If a free entity/actor isn't standing in any region, they are painted last. That's probably the problem here. The solution would be either expanding some scene region so that the free entity is always contained in it, or play the video in foreground layer instead.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

adonf

  • Regular poster
  • ***
  • Karma: 0
  • Offline Offline
  • Posts: 124
    • View Profile
Re: foreground layer
« Reply #4 on: September 12, 2006, 05:36:45 PM »

ok, thanks for the answer

a lot of entity hotspots are placed below the screen because i only recently learnt about multiple layers and i didn't know how to put these objects on the foreground. well i guess i'll have to clean up my scenes and put all that stuff in the foreground layer :D

oh wait, what is a scene region, did you mean layers ? then i guess i could just make the main layer huge, but aren't there any drawbacks to doing this ?
Logged
I am the Milkman. My milk is good.

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: foreground layer
« Reply #5 on: September 12, 2006, 05:42:48 PM »

oh wait, what is a scene region, did you mean layers ? then i guess i could just make the main layer huge, but aren't there any drawbacks to doing this ?
No no, I mean the blue regions within scene layers. You can make them huge and offscreen, there's no penalty for doing that, but the free entities should always "stand" inside some region.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

adonf

  • Regular poster
  • ***
  • Karma: 0
  • Offline Offline
  • Posts: 124
    • View Profile
Re: foreground layer
« Reply #6 on: September 12, 2006, 05:58:09 PM »

oh i see ! we didn't put any of these because we were using 3D walk planes and blocked regions.

edit: it's working. thanks for your help...
« Last Edit: September 12, 2006, 06:00:45 PM by adonf »
Logged
I am the Milkman. My milk is good.
 

Page created in 0.037 seconds with 20 queries.