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: New window in Scene  (Read 6248 times)

0 Members and 1 Guest are viewing this topic.

Adventureforall

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 26
  • I'm a llama!
    • View Profile
New window in Scene
« on: June 04, 2003, 11:08:17 AM »

It's me again :-[

I hace a scene where my actor is going to open a drawer, when the drawer is open i want, that a larger image of the drawer is openend. with the first scene goes to inactive, and that you can only pick up things from the drawer, or close it.

Do i have to make a new scene for this, or is it possible in first scene.
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re:New window in Scene
« Reply #1 on: June 04, 2003, 01:06:43 PM »

Do i have to make a new scene for this, or is it possible in first scene.

Yes, you have several options: either to switch to another scene, as you've figured out, or you could create a "window" object and display it over the scene. The windows can now contain entities therefore you can create complex  designs.
Another way could be to add an extra layer to the scene. Although the layers are meant mainly for the parallax scrolling, I think you could use it for your drawer situation as well. That layer would be initially hidden and you'd only make it visible when the player opens the drawer.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

odnorf

  • w00t?
  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 7
  • Offline Offline
  • Gender: Male
  • Posts: 1456
  • Lamp dog!
    • View Profile
Re:New window in Scene
« Reply #2 on: June 04, 2003, 01:51:54 PM »

Hm... I used a different approach for "dreams". I have all the graphics (except the main background ofcourse) in sprites and I just activate and deacticate the regions and the sprites I want with this code:

(example code)

Code: [Select]
//deactivate the hot-spot for the drawer once the player opens it
var RegionDrawer = Scene.GetNode("region_drawer");
RegionDrawer.Active = false;

//activate - display the "open drawer" sprite which was inactive before
var SpriteDrawer = Scene.GetNode("drawer_opened");
SpriteDrawer.Active = true;
Logged
fl*p

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re:New window in Scene
« Reply #3 on: June 04, 2003, 02:48:50 PM »

I think Adventureforall has a different thing on his mind; he wants to display a close-up of the open drawer.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

Adventureforall

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 26
  • I'm a llama!
    • View Profile
Re:New window in Scene
« Reply #4 on: June 04, 2003, 02:55:48 PM »

Mnemonic is right, i want i close up from the drawer, to let my  charactor takes things from it.
Logged

odnorf

  • w00t?
  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 7
  • Offline Offline
  • Gender: Male
  • Posts: 1456
  • Lamp dog!
    • View Profile
Re:New window in Scene
« Reply #5 on: June 04, 2003, 03:32:32 PM »

Oh! Sorry! :( It still can be done with the way I described, but it's not going to be the best solution! The best solution IMHO is with a new scene (as mnemonic suggested). That's how I created the 3 close-ups in "dreams". I personally don't really like windows (there is no WindowEdit yet and the docs  ;) are incomplete).
Logged
fl*p

Adventureforall

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 26
  • I'm a llama!
    • View Profile
Re:New window in Scene
« Reply #6 on: June 04, 2003, 03:56:16 PM »

thanx i  will try your way with a new scene, i already have it ready.
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re:New window in Scene
« Reply #7 on: June 04, 2003, 04:00:06 PM »

It still can be done with the way I described, but it's not going to be the best solution!
That's right, but the entities always try to incorporate themselves into the scene. It would cause trouble in this case.

The best solution IMHO is with a new scene
Agreed. But I also like the layer idea. The only problem is that the other layers stay interactive (you could click outside the drawer close up...), I added a new entry to my todo list: add the ability to make some scene layers "exclusive" ;)
« Last Edit: June 04, 2003, 04:00:36 PM by Mnemonic »
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.03 seconds with 19 queries.