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


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 ... 5
1
Feature requests, suggestions / Windows 8 gestures?
« on: June 21, 2012, 11:14:45 AM »
Given the announcement of the Microsoft Surface, this means there's going to be a Wintel device that has both a traditional keyboard/mouse/point-and-click interface and a touchscreen-gesture interface. To me, this looks like a great opportunity for PC developers, because it has all the makings of an iPad killer. And apparently, there's going to be a version of DirectX for Windows 8.

Wintermute is already great at supporting mouse-driven events (on LeftClick, RightClick, MouseEntry, etc). Any plans to support the Windows 8 phone style of gesture-based use? If so, would it be done the same way?

It would be nice to be able to support both forms of use in the same script. I imagine being able to do something along the lines of:
on "LeftClick" //Point&Click event
  {
  OpenDoor();
  }
on "TapScreen" //Touchscreen event
  {
  OpenDoor();
  }
function OpenDoor()
{
//code to open the door
}

2
Technical forum / Can't get AfterLoad to trigger
« on: March 20, 2012, 02:45:41 PM »
Hi All

I can't get AfterLoad to trigger and was wondering if anybody could suggest why. In my Main Menu window, I have this:
on "PlayButton"
  {
  Game.GoForIt = true;
  if(Game.IsSaveSlotUsed(CurrentPlayerSlot) == true)
    {
   Game.LoadGame(CurrentPlayerSlot);
   Game.Msg("Load game executed");
   }
  CloseThis();
  }

I have this in game.script:
on "AfterLoad"
  {
  for(var ddd = 1; ddd<11; ddd=ddd+1)
    {
    Game.Msg("Afterload reached");
   }
  if(MainMenu.State != null)
    {
   Game.Msg("MainMenu Detected");
   var mmwin = MainMenu.State;
   mmwin.Close();
   MainMenu.State = null;
   MainMenu.Showing = false;
   Game.UnloadObject(mmwin);
   }
  }

The AfterLoad is never reached and the menu window doesn't close. Any ideas?

Thanks

3
Technical forum / Can Settings.exe window be branded?
« on: January 20, 2012, 05:45:30 PM »
Hi all

I understand from the forum that Settings.exe has to run at least once and that whether it runs again is a matter of a Registry Setting. However, casual game publishers and players want things as simple as possible. Perhaps there is a solution to both.

Is there a way to change the look of Settings.exe to match the rest of the game, make it screen size, put a developer's graphic on it? Then it would have the illusion of being incorporated into the game - and the "Don't show this again" could skip it for next time. Then if it was needed again, to turn it on there would be a "Run main settings next time" option in the main menu that would simply adjust the requisite Registry value.

Cheers

4
Technical forum / Can't get Item GetHoverSprite to work
« on: October 08, 2011, 02:24:37 PM »
Hi all

In Items.items I have:
ITEM
{
   CURSOR_COMBINED = TRUE
   CAPTION = "/INV_GARLIC/"
   NAME = "GarlicBulb"
   IMAGE = "items\Graphics\Plain\Garlic48.png"
   CURSOR = "items\Graphics\Plain\Garlic48.png"
   CURSOR_HOVER = "items\Graphics\Highlighted\Garlic64.png"
   SCRIPT = "items\Scripts\GarlicBulb.script"
}

Later I try to query this and grab its image to display in a window, thus:
var ItsName = InvObject.Monicker;
var Itself = Game.QueryItem(ItsName);
var ItsPicture = Itself.GetHoverSprite();
ObjX.SetImage(ItsPicture);
CaptionBox.Text = Itself.Caption;

The caption works, so I know the QueryItem's doing its thing, but the GetHoverSprite returns null. If I change it to GetSprite, it gets the image just fine, so the syntax is OK. Game.SmartItemCursor is set to true.

Anybody know why GetSprite works but GetHoverSprite doesn't?

Thanks



5
Technical forum / Mouseentry loops?
« on: August 22, 2011, 06:16:13 PM »
Hi all.

I'm trapping a MouseEntry event thus:
on "MouseEntry"
  {
  this.Active = false;
  if(Game.Language != "English")
    {
   Translate.Message = "FRIDAY";
   if(Translate.Loaded != true)
     {
     Game.Msg("!!!!");
     //Translate.Window = Game.LoadWindow("interface\Localization\Translator.window");
     Translate.Loaded = true;
     }
   }
  while(Translate.Loaded == true)
   {
   Sleep(20);
   }
  }

This routine loops! The Game.Msg keeps being displayed. Before I commented out the window, that kept getting loaded. I thought MouseEntry was a single event, but it appears to be constantly testing its state. What am I missing?

Thanks




6
This one still foxes me every time - I include an editor in a window and sometimes can put text in it, and then on the next occasion I use it, the editor will not accept keyboard input.

I have read that it's to do with the Window being exclusive, but the window calling the offending NewPlayer window has "NewPlayer = Game.LoadWindow("newplayer.window"); NewPlayer.Exclusive; = true, along with newplayer.script containing the line this.GoExclusive(); - but still the editor ignores the keyboard.

Any ideas?

Thanks

7
Technical forum / One page of graphics becomes an animation
« on: December 10, 2010, 02:57:20 PM »
Hi,
I've seen some Wintermute games that apparently have a very tidy way of doing animations. You have all the images ('frames') of the amination in one transparent PNG and them somehow reference each of the images in turn to to make the sprite animation. I'd like to be able to do it that way. Has anybody got a way of programatically referring to one part of an image and displaying only that part in a sprite?

Thanks
 

8
Technical forum / Localizing Subtitles
« on: March 07, 2010, 12:20:32 PM »
Hi all

The release announcement http://forum.dead-code.org/index.php?topic=2346.0 says that WME now allows .SUB files to consult the string table, so subtitles can be easliy localized - but the detail of this is apparently not documented anywhere else.  :(

Quote
•The video subtitle files (.sub) can now use the "localizable" form of text ("/string_id/actual text") which means you can localize video subtitles using the string table, just like any other in-game text.

In the spirit of DIY experimentation I've tried:
Code: [Select]
{2}{62} /Tony01_1/
{2}{62} /Tony01_1/Hi Abi, it's Tony here. Sorry to hear about your loss - your great-aunt wasn't it?
{2}{62} "/Tony01_1/"
{2}{62} "/Tony01_1/Hi Abi, it's Tony here. Sorry to hear about your loss - your great-aunt wasn't it?"
and even the literal, but desperate
Code: [Select]
{2}{62} ("/Tony01_1/Hi Abi, it's Tony here. Sorry to hear about your loss - your great-aunt wasn't it?")

But sadly, I get the literal content of the sub file every time, slashes and all.

Does anybody how to make .sub files talk to the string table as the release doc claims? Even if you've only a snippet of information, let me have it and I will attempt to compile and post the definitive 'how-to' on this.

BTW, can anybody also please point me to where it is described how to format and position the output of the .SUB file? Mine hugs the bottom of the screen, in a small, green font, but I don't know how I might have told it to do that.

Thanks
 

9
Technical forum / Subtitles duration
« on: March 06, 2010, 09:06:24 PM »
Hi

I have a video 37 seconds long. It's lip-synched so the audio has to be in the video. This means I can't have a separate audio file, but I still need subtitles. But the subtitles always overrun, by roughly the same amount, no matter what value I set the duration parameter to be.

Here's the code:
Code: [Select]
this.PlayTheora("interface\PDA\Oggs\Tony1.ogg");
this.Talk(Game.ExpandString("/Tony01_1/","",5000));
this.Talk(Game.ExpandString("/Tony01_2/","",1000));
this.Talk(Game.ExpandString("/Tony01_3/","",1000));
this.Talk(Game.ExpandString("/Tony01_4/","",1000));
You can see the total is only 8 seconds - but even the third part is still on the screen when the 37-second video is over, with the fourth part appearing several seconds later.

Can anybody please advise how I get the timings right?

Thanks



10
Technical forum / Can't control video in an entity container
« on: March 06, 2010, 12:58:03 PM »
Hi all

In a window there is an entity and in the entity a video runs using PlayTheora(). But most other instructions in the script seem to be ignored and so I can't control the video.

What am I doing wrong? Here's the code from the entity script.

Cheers

Code: [Select]
this.Interactive = true; // Redundant, as Entity already has Active=TRUE
this.SetCursor("sprites\system\ArberthCursors\Action2.sprite"); // NOT executed
//
while(PDA.GoVideo != true) // wait until you're told to play
  {
  Game.Msg("Waiting to start video"); // Works
  Sleep(20);
  }
var a = PDA.Call;  // which video to play?
if(PDA.Call != null)
  {
  if(a =="Tony01")
    {
this.PlayTheora("interface\PDA\Oggs\Tony1.ogg"); // Works
}
  while(this.IsTheoraPlaying())
    {
    Game.Msg("Entity waiting for the video to end"); // TEST - works
    Sleep(20);
    }
  }
PDA.GoVideo = null; // hand control back to the window - works
//
// EVENTS, all ignored
on "LeftClick"
  {
  Game.Msg("LeftClick detected"); // NOT executed
  }
on "MouseEntry"
  {
  this.PauseTheora(); // NOT executed
  }
on "MouseLeave"
  {
  this.ResumeTheora(); // NOT executed
  }
 

11
Technical forum / Create multiple event handlers on the fly
« on: February 19, 2010, 09:23:37 PM »
Hi all

I'm running a window that uses CreateButton() to create 150 buttons on demand. That bit's ok, a for() loop creates the button names and positions.

What I don't get though is how to then in the same routine, to create code to be run when those buttons are pressed - Metamorphium hinted tantalisingly at it in a previous post, with the enigmatic
"insertButton will as a parameter take name of the button (which will be further referenced in script as on "" event)"

but I can't find any documentation that explains how that 'on "" event' is created and where it gets its code from.

I tried ApplyEvent, but that doesn't seem to do it - in any case I can't see how ApplyEvent could create 150 different code sequences.

Any ideas?

Thanks

12
Hi all

I have two inventories, one for documents and one for objects, related to two actors, InvDocs and InvObjects (I know, they could just as easliy be entities). I get the whole actor.TakeItem thing but does that also extend to other methods like TotalNumItems, QueryItem and IsItemTaken or are those methods only for the Game object?

I want to switch a menu button on depending on whether there are things in each inventory. How do I check whether the number of items in InvDocs's inventory is > 0? I tried InvDocs.QueryItem and InvDocs.IsItemTaken and got 'call ignored'.

Cheers
 

13
Technical forum / this.GetControl ignored or not?
« on: January 13, 2010, 03:01:27 PM »
Hello all

Something I thought I'd done thousand times before, picking up a control in a window - but this time it's ignored, except that the allegedly 'ignored' control still executes.
Script says:
Code: [Select]
this.xResult = false;
PDA.Showing = true;
var m = this.GetControl("Message");
var c = this.GetControl("IncomingCall");
var x = this.GetControl("Idle");
var a = PDA.Notify;
PDA.Notify = null;
switch (a)
  {
  case "M":
    m.Disabled = false;
m.Visible = true;
  break;

  case "C":
    c.Disabled = false;
c.Visible = true;
  break;

  default:
    x.Disabled = false;
x.Visible = true;
  break;
  }
self.GoExclusive();

And I get the following eror messages:

Code: [Select]
13:51:32:  Runtime error. Script 'interface\PDA\PDA.script', line 6
13:51:32:    Call to undefined method 'GetControl'. Ignored.
13:51:32:  Runtime error. Script 'interface\PDA\PDA.script', line 7
13:51:32:    Call to undefined method 'GetControl'. Ignored.
13:51:32:  Runtime error. Script 'interface\PDA\PDA.script', line 8
13:51:32:    Call to undefined method 'GetControl'. Ignored.
13:51:32:  Runtime error. Script 'interface\PDA\PDA.script', line 28
13:51:32:    Call to undefined method 'GoExclusive'. Ignored.

And yet the summoned Control "IncomingCall" does actually display, so it wasn't ignored:
AND there's no error reported for the this.xresult = false; line

 ??? ??? ???

Any thoughts?

14
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
 

15
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;

 

Pages: [1] 2 3 ... 5

Page created in 0.034 seconds with 21 queries.