Please login or register.

Login with username, password and session length
Advanced search  

News:

Forum rules - please read before posting, it can save you a lot of time.

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

Pages: 1 2 [3] 4
31
Technical forum / Removing Global variables
« on: September 13, 2010, 10:52:23 AM »
With my usual rubbishy coding I have ended up with a load of gloabl variables, I understand that they can be set to null, but what if I want to remove them completely.  I have tried Game.DeleteEntity and this does not work - any ideas ?

32
Technical forum / Game Main object
« on: August 30, 2010, 05:59:00 PM »
Hello I have been struggling for a couple of hours with a problem, which is that if I change the identity of an actor with the line
 actor = Game.LoadActor("actors/r1/r1.actor");
initially everything seems to be fine, the new actor appears, and moves around, however the scrolling of the screen stops, after much trial and error I discovered you had to put in the line

Game.MainObject = actor;

is there an explanation for this behaviour in that the association of Game.MainObject is established in Game.script.

33
Technical forum / Architectural Advice
« on: August 01, 2010, 05:07:53 PM »
The goal is this - in the game there will be music playing - say 20 tunes, the order in which those tunes are to be played is random.  The playing of music is initiated by finding a radio in one scene. When the player leaves the scene the tunes will continue to be played unless the player turns off music as a menu item.
My question is this does the code which checks to see if music is playing have to exist in the main game loop ? I really don't like clutter in the main loop itself.  Is is possible to create a method which will be persitent = eg it can check the state of a "do you want to hear music" global variable - or is there a nice neat and obvisous way to solve this.

My thinking for randomness is that music played will be stored in an array until such time as all the tunes have been played - then the whole thing will re-initialise.

Sorry for the ramble

34
Technical forum / Difficult with PlayTheora() on a close up layer
« on: May 27, 2010, 05:12:14 PM »
Hello

I have created a method to play thoera vids which has worked very nicely up til know.  The problem occured when I tried to play the film on top of a close up layer.  Doing a little bit of digging around I found that it played very nicely if it was assigned to an object in that layer, however the method I use creates a dynamic entity, and didn't appear to be comfortable with the layer.  The system gave no error messages, so I can only assume the flim played "below" the layers, any thoughts

35
Technical forum / Entity containers Solved
« on: May 05, 2010, 11:54:18 AM »
Having done a simple search through the documentation and the forum in an attempt to come up with some example code and drawn a blank I would be really grateful if someone could share some code with me which shows 1. How an entity might be defined (including a talk function). 2. How that defined entity might be link to an entity container in a window.  IE the enitity container attributes contain a refence to an entity as a file, what sort of file might that be.  Thanks in anticipation.

Managed to find some stuff which helped me solve this

36
Technical forum / Dialogue Window - Solved
« on: April 25, 2010, 04:20:10 PM »
I have created a dialogue window which in many ways works very well, essentially what happens is that pictures of the main character and the npc are loaded in to picture controls, and the text was loaded into a text control.  Unfortuanately by loading the text into a text box I lost the hard coded functionality in the standard talk statement.  I have managed to code something up to give me a reasonable delay but I cannot work out a way of using the leftclick to speed through the dialogue.

So I then decided to create an object, a talk robot which would use a talkrobot.Talk command to speak, and in order to ensure the correct screen position of the text I was using the subtitlesPosX derived from a window control posX.  Unfortunately  the control posX seems to be a position relative to the window and not the screen.

In my revised talk function I have allowed for the possibility of sending a x value through, but this does not work when I have screens which scroll and actors who may have different positions in which to speak from.

Working on the dangerous assumption that someone can understand the scenario, do any of you have an suggestions, my own thoughts are something along the tracking the screen width, the relative position of the object being spoken to and the position of the actor when he is speaking.

thanks

37
Technical forum / Responses window on top of another window
« on: November 07, 2009, 12:22:01 PM »
Another newbie type question.

I have the requirement to set a dialgoue window on at the bottom of the sceen, then on top of that I want to use the response.def functionality, when I call the response box, it appears "under" the the new window. How can I make the response box sit on top of my new window, then disappear when a response is selected.

38
Bug reports / DlgBranch Bug
« on: August 14, 2009, 11:17:37 AM »
Hello I think this is probably a bug, in the sense that it manages to crash the project manager editor.

I am calling the a seperate dialogue branch within a function from an attached script
this is the code for the function.

It works fine if I omit the dialogue branching controls, but of course that then creates a logical problem in that elements with the response box are removed.

The crash occurs exactly at the point where the branch is called. I have tried variations in terms of naming the dlg branch and calling the dlg branch from another dlg branch, and all variants produce the same crash error. I have use dlg branch successfully in the past.

If there is anything that I have done wrong please advise



 
Code: [Select]
function  testb()

{

Game.StartDlgBranch();

var options;

options[0] = "this is testbline1";
options[1] ="this test line 2";
options[2] ="bye";
var selected;

while (selected !=2)

{

   Game.AddResponseOnce(0,options[0]);
           Game.AddResponseOnce(1,options[1]);
           Game.AddResponseOnce(2,options[2]);
            selected = Game.GetResponse();
switch (selected)

{
  case 0:
 
     Game.Msg("this is case 0");
break;

case 1:

  Game.Msg("this is case 1");
  break;
 
  case 2:
 
   Game.Msg("this is the last case");
   
   break;
   }
   }
   
Game.EndDlgBranch();
}



39
Technical forum / Order of images
« on: August 05, 2009, 08:50:02 PM »
I have dynamically created 3 entities, each of which will store an image, one of the images is a background, the other 2 should show in the foreground.

I am struggling to get the images to appear in the correct order, EG the background down first and then the other two on top.  However the ordering of the images changes if I vary the X co-ordinate of the background

Code: WME Script
  1. // background entity
  2.  
  3. var backg = Scene.CreateEntity();
  4.  
  5. //foreground
  6. var npc =Scene.CreateEntity();
  7.  
  8. var tre= Scene.CreateEntity();
  9. backg.X = 0;
  10. backg.Y=458;
  11. backg.SetSprite("interface\paper1000.png");
  12.  
  13. tre.X= 0;
  14. tre.Y=468;
  15. npc.X= 50;
  16. npc.Y = 468;
  17.  
  18. npc.SetSprite("theads\furst.png");
  19.  
  20. tre.SetSprite("theads\ron.png")


Any ideas, I am aware that I could solve the problem be creating nodes in scenes, however  this is code that I want to re-use

40
Technical forum / talk method
« on: July 07, 2009, 12:50:08 AM »
I have been battling with a revised talk method, with only limited success.  I can get something working after a fashion but it's horribly crude.

I have been through the documentation and the forum and I think I am getting some insights, perhaps you can check my assumptions. I have looked at the code section from ghost in the machine which has given me some inspiration

I have created a basic talk method which I have attached to an object, I then call the method from the object and pass various paramters through.

I had a lot of trouble understanding where the code for the method should be stored, in the end I just attached a file in the testbed scene directory which worked ok.

1. If I want to revise the talk method for an actor do I put that method in the actor script or in some other locations, I tried putting stuff in game.script but that didn't work.

2. If I want an npc to talk how do I associate a revised talk method with that character, assuming his representation is just a sprite object - would that be as some attachement in the sprite editor ?

3. Having read the documentation, there is a clear recommendation that a custom window should be used to hold the image, ok so I can create a custom  window using the window editor tool, and can do stuff like set image.  What I would like to do is to put an image on a  static control programatically, can anyone provide me with a code snippet as an example of how this could be done.

Sorry for this post and the very naive nature of these questions.






41
I currently have a scene which uses a number of closeup layers (8), each layer is programmtically called, into an active state, theres is never more than one active layer in play.

Once I add the eighth layer- a close up layer become active on scene load.  I have specifically de-activated that layer in the scene init script.

Having experimented by re-creating layers that does not address the probem, having also experimented by changing the order of the layers in the scene editor, that has had the consequence of stopping the scene from functioning at all.

I can see two potential causes,

1. There is a finite number of layers the engine can cope with in a scene
2. I have a corrupt scene file

 ********** DEBUG LOG OPENED 01-07-2009 (Release Build) *****************
10:16: Wintermute Engine ver 1.8.10, Compiled on Feb 14 2009, 16:19:44
10:16: Platform: Windows XP Service Pack 3 (Build 2600)
10:16: DirectX version: 9.0
10:16:
10:16: Scanning packages...
10:16:   Registered 0 files in 0 package(s)
10:16: Initializing scripting engine...
10:16:   Script compiler bound successfuly
10:16: Loading plugins...
10:16:   wme_sample_pixel.dll
10:16:   wme_snow.dll
10:16: Scanning packages...
10:16:   Registered 0 files in 0 package(s)
10:16: Enumerating Direct3D devices...
10:16: Enumerating DirectSound devices...
10:16: Game aspect ratio:    -1.#IND00
10:16: Monitor aspect ratio: 1.250000
10:16: Game aspect ratio is the same as monitor aspect ratio.
10:16: Backup resolution:  0 x 0
10:16:
10:16: Available video devices:
10:16:   NVIDIA GeForce 8800 GT  (accelerated)
10:16:     Driver: nv4_disp.dll 6.14.11.8122
10:16:     Monitor: 0
10:16: Available audio devices:
10:16:   Primary Sound Driver
10:16:   Sound Blaster X-Fi Xtreme Audio
10:16:   /syseng0019/[no sound]
10:16: Auto selecting devices for windowed mode:
10:16:   Video: NVIDIA GeForce 8800 GT  (accelerated)
10:16:          Windowed:yes  Colors:16bit  T&L:no  Multisample:0
10:16:   Audio: Primary Sound Driver
10:16: Maximum texture size: 8192x8192
10:16: ----- Open file: 'C:\Documents and Settings\Mr Hopkins\My Documents\wintermute\Column22\data\scenes\rons_apartment\rons_apartment.scene' -----
10:17:
10:17: Shutting down...
10:17: Shutting down scripting engine
10:17: CBSurfaceStorage warning: purging surface 'scenes\rons_apartment\cabinet1.png', usage:1
10:17: ********** DEBUG LOG CLOSED ********************************************
any thoughts

42
Game announcements / Column22
« on: June 30, 2009, 01:24:54 PM »
Folks I have put up a small website.

Compared to the highly polished professional type stuff which you can link to from here it looks pretty scruffy, if you are interested please take a look.
www.eborr.com

43
Technical forum / Current Layer
« on: June 24, 2009, 02:43:59 PM »
another newbie type question, how  can I progammatically get the current  active layer name,

I have tried expressions like

var x = Layer.Name;

and this just causes a compiler error -any thoughts

44
Technical forum / turning off the inventory window
« on: May 27, 2009, 09:48:04 AM »
I want a scene which is interactive, but the inventory window is disabled.  Looking at the documentation it would seem that

Game.InventoryVisible = false is the answer - however when I try this it doesn't work, is this because the of the main game loop script which sets the inventory periodocally sets it to true ?

If so can anyone suggest a work-around as I don't want to mess with major functionalilty like the loop script.

45
Technical forum / trying to scale playtheora
« on: May 05, 2009, 01:57:21 AM »
probably obvious, but I am strugglingto get a theora video to scale smaller, it works as it should with Game.Playtheora method, and I am able to launch the video from with the entity.Playtheora method, however what I get is either a fullscreen video  which is cut off or an attempt to play a slightly smaller than full screen video at different locations in the screen.
Is this an issue which Wintermute can manage, I assume it is or do I  have to make the video smaller. I am playing in non windowed mode.

btw the ff widget is generating .ogv files but they seem to fucntion ok


Pages: 1 2 [3] 4

Page created in 0.049 seconds with 22 queries.