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: Get name of an window  (Read 3607 times)

0 Members and 1 Guest are viewing this topic.

Amo

  • Supporter
  • Regular poster
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 206
    • View Profile
    • Sunrise The Game
Get name of an window
« on: August 22, 2006, 10:05:46 AM »

Hi there. As written in the script reference we can get the name of a scene with scene.name.
Is there an eqal way to get the name of a window? name.window doesn't work.

Thanks for help

metamorphium

  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 12
  • Offline Offline
  • Gender: Male
  • Posts: 1511
  • Vampires!
    • View Profile
    • CBE  software s.r.o.
Re: Get name of an window
« Reply #1 on: August 22, 2006, 11:01:33 AM »

var name = YourWindow.Name; works fine for me.

see documentation -> scripting reference -> window object

Logged
J.U.L.I.A. Enhanced Edition, Vampires!, J.U.L.I.A., J.U.L.I.A. Untold, Ghost in the Sheet

Amo

  • Supporter
  • Regular poster
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 206
    • View Profile
    • Sunrise The Game
Re: Get name of an window
« Reply #2 on: August 22, 2006, 11:59:22 AM »

Thank you, we try it out, but one thing: Maybe I am blind, but I cannot find it in the scripting reference.

metamorphium

  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 12
  • Offline Offline
  • Gender: Male
  • Posts: 1511
  • Vampires!
    • View Profile
    • CBE  software s.r.o.
Re: Get name of an window
« Reply #3 on: August 22, 2006, 12:36:30 PM »

you should look in the window object into attribute sections. if you press ctrl+f in help file and type there Name, it will eventually lead you there.
Logged
J.U.L.I.A. Enhanced Edition, Vampires!, J.U.L.I.A., J.U.L.I.A. Untold, Ghost in the Sheet

Amo

  • Supporter
  • Regular poster
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 206
    • View Profile
    • Sunrise The Game
Re: Get name of an window
« Reply #4 on: August 23, 2006, 04:30:42 PM »

Somehow we are lost in WMEs scripting, or never found really a red line. Anyway. We got that, but somehow on another way.

Nearly the similar problem, but other objects.
When we add an entity object (or defining a region) and call it e.g. "test" we want to add an variable
e.g.

var test = ...
Game.Msg(test);

to it inside the scene_init.script. The three dots mean, that we do not know what we have to add there. The goal in this test is, to get the test message. WME got the name already and shows it in the debugger, but we get an error.

=======================
Also unclear is the following:

var test;
test = Scene.GetNode("test");
Game.Msg(test);

With this code snippet we get in debugging mode the following line:
[entity objects]
When we change the last line of the script to:

Game.Msg(test.Name);

We get the following in the debugger:
[test]
As far as good. If we want to deactivate the object with the following line:

test.Visible = false;

The object doesn't react in anyway. No errors, still visible.
Interesting is, that the "test" reacts on

Skip.To(500,500)

 ???



« Last Edit: August 23, 2006, 04:49:49 PM by Amo »
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: Get name of an window
« Reply #5 on: August 23, 2006, 05:38:53 PM »

Somehow we are lost in WMEs scripting, or never found really a red line. Anyway. We got that, but somehow on another way.

Nearly the similar problem, but other objects.
When we add an entity object (or defining a region) and call it e.g. "test" we want to add an variable
e.g.

var test = ...
Game.Msg(test);

to it inside the scene_init.script. The three dots mean, that we do not know what we have to add there. The goal in this test is, to get the test message. WME got the name already and shows it in the debugger, but we get an error.
I'm sorry, but I really don't know what you're asking about. I though you were asking about how to reference a scene entity in a script, but obviously you already know of the Scene.GetNode() method, so...


As far as good. If we want to deactivate the object with the following line:

test.Visible = false;
Entities don't have .Visible attribute. It should be:

test.Active = false;
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

Amo

  • Supporter
  • Regular poster
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 206
    • View Profile
    • Sunrise The Game
Re: Get name of an window
« Reply #6 on: August 23, 2006, 05:46:59 PM »

The first thing, was the original problem, than we solved it under the equals I added the rest. Thank you, you solved the rest, with active, everything is nice.
Very fine.
 

Page created in 0.04 seconds with 24 queries.