Please login or register.

Login with username, password and session length
Advanced search  


IRC channel - server:  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 - eborr

Pages: [1] 2 3
Technical forum / Forcing a response window to close
« on: February 22, 2017, 04:53:06 PM »
I wanted to programmitically  force a response window to close. Seemingly this is not possible as the visible state of the object cannot be altered, nor can it be destroyed. I image for good reasons this level of access is not available, and neither is there any capability to force the the response box to close with a statement like Game.GetResponse() =1.

I managed to code around the problem, but it's not an ideal result. By the way even Game.Reset() does not appear to affect an active response box

Hopefully someone has a more elegant solution to this problem other than the kind of hack I currently have in mind

The default behaviour on use of the escape key is to bring up the "mainmenu" - this works fine, and I am able to adjust it where necessary, specifically during window operations where I can change the mode of the window to exclusive to trap the escape keystroke.

However I have this situation. The game is making extensive use of windows to provide specific interfaces within scenes. So I have the circumstance where I load an ingame window and if I then press escape, I bring up the main menu all well and good, including if I select resume the ingame window  is then revealed. However the mainmenu has an option which is tutorial - this takes user to a new scene - and the ingame is revealed.

The use of the exclusive attribute is an option, but the problem with this is that it does not allow for the interaction with scene objects.

Given that there could be n number of ingame windows the option of testing to see where the window is active and de-activating prior to the tutorial load is not one I really want to follow.

So my thoughts are as follows

1. To amend the escape key code so that windows are unloaded as part of that sequence or alternatively creating a routine which is able to test any number of windows and if they don't meet certain conditions unload them.

2. Anyone has any better ideas - they would be gratefully received

Technical forum / New line character
« on: June 21, 2016, 07:45:07 PM »
apologies if there is a simple answer to this, but is there any way of forcing a a new line  into a text string such as the c type '\n' So that new paragraphs can be created in control objects

Technical forum / Custom attributes
« on: March 12, 2016, 08:17:20 PM »
I have added a number of custom attributes to Scene Nodes. The value of these nodes is changed programatically during play. This works. However if I change scene and return then the original values are reset.

The remember nodes checkbox is true, and I have added a line of code to set the PersistentState of the scene to true right before the changescene statement.

Any ideas ?

Bug reports / object1
« on: March 12, 2016, 10:43:38 AM »
not as massive thing and it has a simple work around- But if you create a scene node called object1 and then try to assign it a variable it is not recognised as an object. The fix is simple - just change the name

Technical forum / AddResponse
« on: February 16, 2016, 03:26:05 PM »
Don't know if anyone has come across this, but what I want to do is to add a background for each line in a response box, and what seemed like a neat solution was to add an icon as well as some text - the third parameter that AddResponse() accepts is an icon file name. What happens though is that the icon overwrites the text - eg it's drawn after the text - any idea out there ?

Technical forum / Entity Position Now Fixed
« on: May 27, 2014, 12:49:17 PM »

I have created an entity which is essentially a thought bubble. It derives it's coordinates from the actors position on the screen.

Now it works well in the foreground,  and appears in the correct position, however in the background it appears to at the below the actor, even though looking at the thing in the debugger the entities X  and   Y values seems to be correct.

Can anyone suggest the probably blatantly obvious mistake that I made. One thought is that it might be caused by the floor

Please see the code for the method below.

Code: [Select]
method thought(texti,soundfile)

Game.Interactive = false;
actor.Interactive = false;
var thinking = Scene.CreateEntity();
var actorscale = Scene.GetScaleAt(actor.X,actor.Y);

if (actor.X > (Game.ScreenWidth/2))
{ thinking.X = actor.X-200;
   if(actor.Direction==DI_LEFT)thinking.X = thinking.X -30;
  {     thinking.X = actor.X+25;
   if(actor.Direction==DI_LEFT)thinking.X = thinking.X -30;

if ((actorscale >40) && (actorscale < 60))
   thinking.Y = actor.Y - 100;
if ((actorscale >59) && (actorscale < 70))
   thinking.Y = actor.Y - 150;
if ((actorscale >69) && (actorscale < 80))
   {thinking.Y = actor.Y - 380;

if ((actorscale >79) && (actorscale < 90))
{thinking.Y = actor.Y - 400;
if ((actorscale > 89) && (actorscale  <95))
   {thinking.Y = actor.Y - 430;
  if (actorscale >94)
   thinking.Y = actor.Y - 450;
  var ypos;
var textlen = new String(texti);
if(textlen.Length < 20)  ypos = 80;
if((textlen.Length > 19) && (textlen.Length < 40)) ypos = 85;
if(textlen.Length >39) ypos = 95;

thinking.SubtitlesPosY =ypos;
Game.Interactive = true;
actor.Interactive= true;


Just an additional thought, might this work better as a window than an entity. Switched it to an entity in a container in a window, this works, although it might just have been my imbecilic maths that was faulty.

Technical forum / Window is inactive and the buttons appear to be active
« on: January 24, 2014, 03:34:43 PM »
My desire is that when a window is inactive it changes colour, this I can achieve very simply by changing the window inactive image, however I also want all of the buttons to change colour too, so that I can emphasise the inactive state. I can do this programmatically by setting each button to it's disabled state, and then when the window is active by a reversal of the process. Is there any neater way to achieve the same state ?

Bug reports / Name and Caption
« on: February 01, 2013, 01:13:40 PM »
I had a really weird error in a file saving routine, whereby a txt file is saved to Game.SaveDirectory.

The error was my fault in the sense that in saving the value in project manager I hanve included an extra space in the Name field or so I concluded. In actuality I had not, and that the extra space was included  in the Caption reference, so that the sav directory was taking the value from the caption field rather than the name of the program.

I have read the threads regarding particle emitters and was not able to come up with a definative answer

I want a particle emmiter to use more than one image, I can see there are a number of differnent ways by which this could be achieved, firstly by using the AddSprite method, to add a new png image, secondly by using a WME sprite with a number of frames, and thirdly by having two particle emmiters operating one on top of the other.

I will probably want have at least two of these things operating simoultaneously.

I am guessing the scene is quite heavy on memory usage as is given that if I set the crolling speed up I get a lot of juddering on the actor/ and/or the background once scrolling is taking place.

Using Win 7 64 bit,

the console is running fine in the project manager, I need to enable the logging in the compiled software as my testers want to test from the exe file

I get the above error message, dot net frameworks are installed in versions 2/3/4. I am able to write to Game.LOG in the project manager but not in the log for the compiled version

Any thoughts ?

Technical forum / After load
« on: April 02, 2012, 01:17:59 PM »
Hi folks I am battling a bit with Afterload
I am trying to make sure that if the scene which forms a background to the menu, is the "current scene" then afterload brings in the previous scene.

Generally this happens and works well, however in certain circumstances this does not happen and I get the error message
 Warning: invalid instance 'm_ValNative'
written to the log file, any ideas ?

Technical forum / Afterload solved
« on: March 31, 2012, 09:59:45 AM »
Using Afterload as others have to restore the "saved game" to the prev scene, that's working nicely except for a flicker between the two scenes, I have tried to mask this with a Game.FadeOut/FadeIn Sequence, the compiler gives me a run time error *Cannot interupt Script" any ideas how to deal/work around this


Issue has been solved by setting the fade parameter to false in the change scene function

Technical forum / Animate sprites in windows
« on: March 27, 2012, 11:58:11 AM »
I have set up a static control in a window
The image for the static control is an animated sprite.
The animated sprite looping attribute is set to no
The animated sprite works fine once, so I have attempted to set it performing 5 loops, I have done this by using the methods Play() and Reset()
When I run the program I get cannot associate method with object for both Play() and Reset(). I have tried both methods , with a reference to both the control objects and a reference to the control objects image, neither can accept the method, any ideas

Code: WME Script
  1. if (questwin == null)
  2.   {
  4.  questwin = Game.LoadWindow("interface\questlog\questlog.window");
  6.  }
  8. questwin.Visible = false;
  10.  var showcrystal = statuswindow.GetControl("crystal"); //gets the static control crystal
  11.  var cryspic = showcrystal.GetImage();    // gets a reference to the static control sprite
  12.  //Game.Msg(cryspic); 
  13.  Debug();
  14.  var leftpage = questwin.GetControl("pageleft");
  15.  leftpage.SetImage("data\interface\questlog\qj1.png");
  16. rightpage = questwin.GetControl("pageright");
  17.  rightpage.SetImage("interface\questlog\q1start.png");
  18. // global log_but_stat = 1;
  19. showcrystal.Visible = true;
  20. for (var n =1;n < 4; n=n+1)
  21.  {
  22.    // sets image visible
  23.    cryspic.Play();   // plays the animation
  25.    Sleep(1280);
  26.    cryspic.Reset();   // resets the animation
  27.    }
  29.  showcrystal.Visible = false;
  30.   }

Technical forum / Persitence in Windows
« on: March 23, 2012, 12:51:57 PM »
Quick question, if I change a value - say the sprite image in a window control, unload the window, and subsequently reload the window, does the image revert to the orginal, or will the changed image persist in the same way that if I change an image in a scene node it will persist

Pages: [1] 2 3

Page created in 0.255 seconds with 15 queries.