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.

Messages - Kaz

Pages: 1 2 3 [4] 5 6 ... 16
46
Technical forum / Re: What are 'Rotation Levels'?
« on: January 13, 2010, 02:51:01 PM »
Thanks Mnemonic for the 'what'. Can you point me to 'why' and 'how' documentation anywhere?

47
Technical forum / What are 'Rotation Levels'?
« on: January 02, 2010, 11:07:59 AM »
Hello and Happy New Year to all.

I've picked up on this phrase 'Rotation Levels' - occasionally mentioned, apparently never explained. I can handle the two words separately, but together ...  ???

Can anybody please point me to the definitive on 'rotation levels', what they are, what purpose they serve, how to decide whether you need them and where and how to implement them?

Thanks
 

48
Technical forum / Re: How to add video
« on: January 01, 2010, 09:12:42 PM »
As regards an intro video, we did it in 'Rhiannon' by setting a startup scene and putting the PlayTheora instruction as the first in the startup scene's scene_init.script

49
Technical forum / Re: How to add video
« on: January 01, 2010, 02:19:06 PM »
You would issue it as an instruction in a script.

Let's say you had an object in your scene, say a book, and this was shown as a graphic in a node called 'book'. Then let's say you also had a video of the book opening, called 'BookOpening.ogg'

Then attached to the 'book' node, you might have a script 'book.script'. Inside that script would be what would happen if your player clicked on the book:

on "LeftClick"
  {
  Game.PlayTheora("BookOpening.ogg");
  }

When the player clicked on the book, your video would run, and your player wouldn't be able to do anything else until it had completed.

It's all well described in the docs.

Cheers

50
Technical forum / Part of the script doesn't get executed - sometimes
« on: November 17, 2009, 11:18:10 AM »
Here's a chunk from a scene_init that runs a sequence then switches on a few nodes. The nodes come up fine in the debug version, but not when the code is compiled. Makes no sense to me, so I'm going to us an alternative way of doing it (window) but I thought it might be of interest.

Code: [Select]
// setup scene according to state variables
Game.SetCursor("sprites\system\RhiannonCursors\NoCursor.png");
global InventoryOn = false;
global AllowEscape = false;
Game.PlayMusicChannel(0,"scenes\00_Intro\Intro01\DistantStorm.ogg",true);
var an = Scene.GetNode("an");
an.AlphaColor = MakeRGBA(255,255,255,0);
var logo = Scene.GetNode("logo");
logo.AlphaColor = MakeRGBA(255,255,255,0);
var prod = Scene.GetNode("prod");
prod.AlphaColor = MakeRGBA(255,255,255,0);
var sell = Scene.GetNode("sell");
sell.AlphaColor = MakeRGBA(255,255,255,0);
var video = Scene.GetNode("video");
video.Active = true;
video.PlayTheora("scenes\99_Credits\CreditsMovie.ogg", false);
while(video.IsTheoraPlaying() == true)
  {
  Sleep(20);
  }
video.Active = false;
var f;
an.Active = true;
for(f = 0; f < 256; f = f + 5)
  {
  an.AlphaColor = MakeRGBA(255,255,255,f);
  Sleep(40);
  }
logo.Active = true;
for(f = 0; f < 256; f = f + 5)
  {
  logo.AlphaColor = MakeRGBA(255,255,255,f);
  Sleep(40);
  }
prod.Active = true;
for(f = 0; f < 256; f = f + 5)
  {
  prod.AlphaColor = MakeRGBA(255,255,255,f);
  Sleep(40);
  }
Sleep(2000);
sell.Active = true;
for(f = 255; f > -1; f = f - 5)
  {
  an.AlphaColor = MakeRGBA(255,255,255,f);
  logo.AlphaColor = MakeRGBA(255,255,255,f);
  prod.AlphaColor = MakeRGBA(255,255,255,f);
  sell.AlphaColor = MakeRGBA(255,255,255,255-f);
  Sleep(20);
  }
Sleep(2000);
// Following lines run in debug mode but NOT in compiled version
var p;
p = Scene.GetNode("b_play");
p.Active = true;
var r;
r = Scene.GetNode("b_rep");
r.Active = true;
var e;
e = Scene.GetNode("b_end");
e.Active = true;
// Execution resumes from here
Game.SetCursor("sprites\system\RhiannonCursors\Cursor_ball.png");
Game.SetMousePos(515,645);
Game.Interactive = true;

 

51
Technical forum / Re: Code called once appears to run twice
« on: October 23, 2009, 04:07:52 PM »
Hi Mnemonic

As a further test, I renamed the method to "Donkey". Now I know for certain there is nothing else in this game called "Donkey". And yes, it ran twice.

I know I've said it before and I'm (almost) always wrong but I'm beginning to worry it might be a Bug. Sorry to drop the 'B' bomb :)

Your thoughts?

Thanks   

52
Technical forum / Re: Code called once appears to run twice
« on: October 23, 2009, 02:30:51 PM »
Hi Mnemonic

Thanks for your help on this. There are indeed other scripts that use this code, but they cannot have run because they're associated with inventory items we haven't found yet, so there can be nothing else calling it. The code is very specific to these inventory items - the windows only run from the inventory scripts and the items are not in inventory.

Any other thoughts?

BTW, thanks for the tip on the code button - will you be making that the default code the button produces?

Cheers

Noel

53
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.

54
Technical forum / Re: self.GoExclusive?
« on: October 02, 2009, 03:19:19 PM »
Thanks Mnem

So the Game Daemon overrides everything. That's OK, I know which Windows are affected, so I'll just check in the Daemon that none of them is open. I was hoping GoExclusive would save me that job, but I see why it can't.

Thanks for the tip about setting the exclusive on calling the window. I'm sure that'll come in handy.

Cheers

Noel

55
Technical forum / Re: self.GoExclusive?
« on: October 02, 2009, 07:59:02 AM »
Hi Mnem

Thanks for the attention to this.

Let's take another window then, where I'm having the same problem. My "Interactive Map" is the same size as the scene (1024x768), transparent with a graphic 1024x652 in the centre. It sets itself up then goes self.GoExclusive and waits for user input (a user selection then takes does a ChangeScene and closes the Interactive Map window). But if the user mouses off the 652 graphic, he can pull down the inventory window at the top of the screen - yet not interact with it - but he can also pull up the options menu from the bottom of the screen (watched by the Game Daemon, MouseY > 685) and not only interact with it but from it, call other windows on top of the map.

Code: WME Script
  1. // Reveal relevant map sectors
  2. // Display jump buttons
  3.  
  4. // JumpHollyTree
  5. global StateWP2W;
  6. if(StateWP2W.Visited == true)
  7.   {
  8.   a = this.GetControl("JumpHollyTree");
  9.   a.Disabled = false;
  10.   a.Visible = true
  11.   }
  12.  
  13. self.GoExclusive();
  14.  
  15. on "JumpHollyTree"
  16.   {
  17.   var dest = "scenes\27_Woods\WP2W\WP2W.scene";
  18.   // ambience
  19.   Game.PlayMusicChannel(1, "sounds\AmbienceOutside.ogg", true, Random(1,5000));
  20.   // water
  21.   Jump();
  22.   }
  23.  
  24. function Jump()
  25.   {
  26.   Game.ChangeScene(dest,0,0);
  27.   Game.PlaySound("sounds\Success.ogg");
  28.   CloseThis();
  29.   }
  30.  
  31. function CloseThis()
  32.   {
  33.   Game.PlaySound("sounds\GenObjectTug.ogg");
  34.   StateIntro01.MapShown = false;
  35.   this.Close();
  36.   Game.UnloadObject(this);
  37.   }
  38.  

With the command where it is, would you expect that to happen? I'd like to prevent use of other windows, but I don't want to pause the game.

Cheers




56
Technical forum / Re: self.GoExclusive?
« on: October 01, 2009, 06:28:54 PM »
In that case I'm not sure where to put the self.GoExclusive();

If I put it before all the other code, the code doesn't execute and the Window won't close. I guess the answer is to make the window the same size as the scene?


57
Technical forum / Re: self.GoExclusive?
« on: October 01, 2009, 06:08:40 PM »
OK bad example. :-[ Maybe I'm doing something similar in the others. I'll ask the programmer and get back to you...

58
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



59
Technical forum / Re: 360 backgrounds?
« on: September 13, 2009, 07:17:56 PM »
We experimented with this for 'Coven'. It's not that straightforward. You would have to take your panoramic views from your 3D model. If you don't do it as video from a rotating camera, which you then similarly display as video, you end up with long shots of a panorama which you effectively then pan across, rather than viewing as a genuine rotation - so the player sees a kind of 'sidestep'. And of course the longer the shot, the lower the detail.

In 'Coven', we're going for a mix of video, alphablend and jumps for changescenes, because we decided that it's more about screen and gameplay design than it is about the engine. So each scene is designed on its needs.

60
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

Pages: 1 2 3 [4] 5 6 ... 16

Page created in 0.08 seconds with 21 queries.