Please login or register.

Login with username, password and session length
Advanced search  

News:

IRC channel - server: waelisch.de  channel: #wme (read more)

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - Kaz

Pages: 1 [2] 3 4 5
16
Technical forum / Code called once appears to run twice
« on: October 23, 2009, 01:24:58 PM »
Hi all

I have code that I believe to have called once, that seems to run twice. An entity contained in a window makes the following call;

Code: [Select]
// Map thing
var CauldronMap = new Object("entities\CauldronCombine\CauldronMap.script");
CauldronCombine.S = false;
global Noel;
Game.Msg("On opening window, Noel.Map is: "+Noel.Map);
CauldronMap.DisableMap();
CauldronCombine.S = true;
//

The script it's calling upon, CauldronMap.script, responds thus:
Code: [Select]
method DisableMap()
  {
  // TEST CODE
  if(CauldronCombine.Disable == null)
    {
CauldronCombine.Disable = 1;
}
  else
    {
CauldronCombine.Disable = CauldronCombine.Disable + 1;
}
  Game.Msg("Disable count: "+CauldronCombine.Disable);
  //
  var a = CauldronCombine.P;
  var b = CauldronCombine.S;
  var c = CauldronCombine.W;
  var d = CauldronCombine.PS;
  var e = CauldronCombine.SW;
  if(a != true && b != true && c != true && d != true && e != true)
    {
Game.Msg("At First, Noel.Map: "+Noel.Map);
    CauldronCombine.First = true;
CauldronCombine.FirstMap = Noel.Map;
CauldronCombine.MapState = CauldronCombine.FirstMap;
    }
  else
    {
    CauldronCombine.First = false;
CauldronCombine.MapState = CauldronCombine.FirstMap;
    }
  Noel.Map = false;
  }

The window issues the command CauldronMap.DisableMap(); only once, as shown. However, the Game.Msg outputs show the routine is running twice, and I'd really rather it did as I thought I'd told it to.

Anybody got any ideas how I may be deluding myself this time?  ;D

Cheers

BTW - if the colours of this message are all wrong, it's not me - all I did was press the code button and insert the code between the anchors. ??? Blame it on the button.

17
Technical forum / self.GoExclusive?
« on: October 01, 2009, 05:22:46 PM »
Hi all,

I have a window with a menu which sets itself up and then goes Exclusive. There I click on buttons to open up a range of other windows on top. Each one of those also has in its script self.GoExclusive();

Yet with any of them onscreen, I can go back to the menu and load another one of them. So the one onscrenn has not excluded the menu. I can also drop the Inventory down (although can't interect with its cells).

The docs say: "The user cannot interact with any other object while the window is in exclusive state."

The way it looks to me, yes I can. So I must have misunderstood GoExclusive? Here's a bit of code from one of the windows:

Code: WME Script
  1. #include "scripts\base.inc"
  2. #include "scripts\keys.inc"
  3.  
  4. Game.Interactive = false;
  5. global StateIntro01;
  6. StateIntro01.NavWindow = true;
  7.  
  8. // Set up buttons, (default to on)
  9. var a;
  10. a = this.GetControl("Map");
  11. if(StateIntro01.Map == false || StateIntro01.MapShown == true)
  12.   {
  13.   a.Disabled = true;
  14.   a.Visible = false;
  15.   }
  16. //
  17. a = this.GetControl("Notes");
  18. if(StateIntro01.Notes == false || StateIntro01.NotesShown == true)
  19.   {
  20.   a.Disabled = true;
  21.   a.Visible = false;
  22.   }
  23. ////////////////////////////////////////////////////////////////////////////////
  24. // infinite loop
  25. while(Game.MouseY > 685)
  26.   {
  27.   Sleep(40);
  28.   }
  29. CloseThis();
  30. self.GoExclusive();
  31. ///////////////////////////////////////////////////////////////////////////////
  32. function CloseThis()
  33.   {
  34.   global StateIntro01;
  35.   StateIntro01.NavWindow = false;
  36.   self.Close();
  37.   Game.UnloadObject(this);
  38.   }
  39.  

While the above window is onscreen, I can open other windows.

Any ideas?

Thanks



18
WME sources discussion / Game Vs. Monitor Aspect Ratios
« on: September 13, 2009, 07:07:05 PM »
Hi all

The latest version of WME supports widescreen, which is brilliant - thanks Mnem. The documentation says "If the engine detects that the game aspect ratio is different from monitor aspect ratio..." I'm interested in this. During this detection, is the monitor aspect ratio stored anywhere that can be accessed by a script and then compared with the game aspect ratio?

The reason for knowing is that if 1) ProjectMan is set to a widescreen ratio and 2) the game is running on a 4:3 or 5:4 monitor, I wondered if the black bands top and bottom could be used by the game, eg to accommodate the inventory window. Or is that achievable by some deft use of Viewport?

Any thoughts or knowledge?

Cheers

19
Technical forum / Rotation for Dummies?
« on: August 12, 2009, 10:15:05 AM »
Hi all

I read of all these clever people making things rotate, but I just don't get it. According to my warped imagination, the code below should have the sprite in the entity in the node "png" spinning like topsy, but no. The sprite appears, but remains resolutely upright and immobile.
Code: [Select]
var q = Scene.GetNode("png");
var r = q.GetSprite();
r.Rotatable = true;
while(true)
  {
  r.Rotate = 10;
  Sleep(100);
  }

I realise it's probably because I've got the whole concept wrong but after ages on the forum and the docs, trying this and that, I can't figure it out. Can somebody please point out what I've misunderstood?

Galaxy Quest - "explain as you would a child"

Thanks
 

20
Not a bug / Declaring and setting globals in same statement unreliable?
« on: August 10, 2009, 06:37:36 PM »
No complaint, this engine rocks, and nothing invented by humans can be perfect. Here is a weird one.

I have a script that does this:
Code: [Select]
else
  {
  Game.TakeItem("LetterRhiannon");
  global gGotLetterRhiannon = true;
  }
Rhiannon's letter goes to inventory as it should but occasionally - not on every playing - the global doesn't get set. The player complains that "the letter is still there". I have a savegame from a player to attest. I can see the letter in inventory, but the debugger tells me that the global is in a null state.
I believe I'm right that I can declare and set a global in the same statement, and the majority of times the game is played, both instructions are executed. It sounds like a bug, because usually it works and occasionally it doesn't.
Should I have used
Code: [Select]
else
  {
  Game.TakeItem("LetterRhiannon");
  global gGotLetterRhiannon;
  gGotLetterRhiannon = true;
  }
instead, as a best practice principle anyway?

Cheers

Noel

21
Can't reproduce / Probable bug in 'Editor' object
« on: August 03, 2009, 06:38:01 PM »
Two devices using 'Editor' object in 'Rhiannon' are entering the name of a save game and putting a password into Rhiannon's computer during play.

Test playing this afternoon, both of these objects responded with a beep - probably from Windows - for every keypress, and no text could be entered. Alt-tab out, then back in - suddenly both fields were available. Nothing else was changed. The game was still running.  ???

Unpredictable behaviour - nothing scarier on a computer. Gotta be a bug.  :(

22
Technical forum / Erste Sprache deutsch? Ich brauche deine Hilfe!
« on: July 27, 2009, 08:06:13 AM »
Spricht jemand hier deutsch zu ersten Sprache? Wenn so, kannst du mir sagen wie man auf deutsch "Maintain Aspect Ratio" sagen wuerde? Das ist eine Phrase im String.tab, die ich ins Deutsche nicht uebersetzen konnte.

Bedanke mich.


23
Technical forum / Timing different in windowed mode
« on: July 11, 2009, 10:06:39 AM »
Hi all

Our game has several sequences (e.g. node changes, videos, audios etc.), the timings of which are mostly governed by Sleep(); statements. And in full screen, that works fine. But in a window, the timings go out the window, so to speak. Things like fades done by stepping the alpha value of a MakeRGBA through a for() loop, don't fade or fade so quickly as to ruin the effect. One audio that waits on a sleep before handing over to another - fine in full screen, but running in a window the audios overlap.

Anybody got round this? It's going to be important for some I suspect because of the Big Fish stipulation that all games must be able to run in a window.

Cheers

24
Technical forum / Particle Emitter "undefined method"
« on: July 02, 2009, 03:26:10 PM »
FORGET IT - I forgot to attach the particles script to the emitter node SOLVED

I thought I'd copied the example exactly - I even imported the particles folder in toto and cut and pasted the code into my scene_init script, and yet:
Code: [Select]
////////////////////////////////////////////////////////////////////////////////
// setup scene according to state variables
var Ent = Scene.GetNode("Emitter");
Ent.MakeStarfield();
//15:13:35:  Runtime error. Script 'scenes\Room\scr\scene_init.script', line 28
//15:13:35:    Call to undefined method 'MakeStarfield'. Ignored.
////////////////////////////////////////////////////////////////////////////////

I thought I understood this stuff, but I'm afraid I can't get past "Duh??" Any thoughts chaps? If I've been a pillock, you can say so, I can take it.  :)

Thanks

25
Technical forum / Editor object stopped working in Russian version
« on: May 14, 2009, 01:27:02 PM »
Hi all

We have a password as one of our puzzles, done by an editor in a window. Works in the English version and the German version, but not in the Russian version, even though the scripts and windows are identical in all three versions. The cursor doesn't appear in the Russian and data entry is met with a bleep.

The window is self.GoExclusive(); which it must be or it wouldn't have worked in the others.

The arial font is set to CHARSET 10, but when we sent a minigame to Russia to test it with CHARSET = 1 it worked. So we tried the Minigame's font settings in the main game. And it failed. Duh?

We're baffled.

Any ideas?

26
Hi all,

Trying to use Game.PlaySoundEvent("sound", "event"); in a window script. It works fine in a scene, but in a window, the sound plays but the event never executes. Although if I replace the "event" with a this.some-method, the method executes but then the sound doesn't play ???

Any ideas how I get the event to execute? Should it work or should I be using an entity instead?

Thanks

Code: [Select]
on "George"
  {
  s = "scenes\07_Pub_Reception\JuliaGeorge.ogg";
  this.DoIt();
  }

method DoIt()
  {
  this.Disable();
  this.PlaySoundEvent(s, "Enable");
  }

method Disable()
  {
  Game.Interactive = false;
  Game.Msg("Disabling prompts");
  a = this.GetControl("Fire");
  a.Disabled = true;
  a.Visible = false;
  a = this.GetControl("George");
  a.Disabled = true;
  a.Visible = false;
  }

on "Enable"
  {
  Game.Msg("Prompts enabled");
  a = this.GetControl("Fire");
  a.Disabled = false;
  a.Visible = true;
  a = this.GetControl("George");
  a.Disabled = false;
  a.Visible = true;
  Game.Interactive = true;
  }


27
Technical forum / Need help understanding Game.PlaySoundEvent()
« on: May 09, 2009, 06:30:31 PM »
Hi chaps,

The code below is supposed to have Julia say a paragraph when you leftclick on her, then load a window only after she's finished speaking.

She speaks, but the "on Julia" is never executed. So I don't understand the practical use of PlaySoundEvent. Anybody got any examples?

Thanks

Code: [Select]
on "Julia"
  {
  Game.Msg("This is the Julia Window call");
  Game.LoadWindow("scenes\07_Pub_Reception\Julia.window");
  Game.Interactive = true;
  }
 
on "LeftClick"
  {
  var a = Scene.GetNode("Julia");
  a.Active = false;
  Game.PlaySoundEvent("scenes\07_Pub_Reception\JuliaHello.ogg", "Julia");
  }


28
Technical forum / Russian Captions in Items.tems
« on: May 07, 2009, 11:55:14 AM »
Hi all

We've nearly finished the Russian translation of 'Rhiannon' - now it's time to change the captions in items.items.

So we cut from the .doc that contains the translation - and paste into items.items being edited in Scite. And we get "??????? ??????? ????"

We thought of looking up "??????? ??????? ????" in the help files, but didn't expect to find anything  ;)

Can anybody advise how we get Russian captions into items.items?

Thanks

29
Technical forum / Warning referencing absolute path
« on: May 06, 2009, 05:47:00 PM »
I'm getting this warning on a scene where the background image is in the same folder as the scene and sceneedit knows it is. So when I run sceneedit, there's the graphic, but in either projectman or the game, no it isn't.

Is there an option to say "start looking here"?

It's happening on everything, cursors backgrounds etc.

Thanks

Noel

30
Technical forum / Query the node of a different scene
« on: February 23, 2009, 03:48:16 PM »
Hi all,

I want to augment the default Game.ChangeScene with a routine that will allow me to alphablend between scenes. That means I need to know the background graphic of the destination scene. Rather than just refer to it directly in every scene as an alternative sprite node, does anybody know if there's a way to query node 'background' of a scene other than the one I'm currently in?

Thanks


Pages: 1 [2] 3 4 5

Page created in 0.029 seconds with 17 queries.