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

Pages: [1]
1
Hi all,

When my actor performs an action, I want the game to always turn "Game.Interactive" to false. Instead of entering the false/true lines for every event in every script, I figured I could easily do this in one place by adjusting the onLeftClick event. This may save me lots of redundant lines of code in the future.  ;) Unfortunately, I have a problem.  :'( This is what I do:

Code: WME Script
  1. on "LeftClick"
  2. {
  3.   var ActObj = Game.ActiveObject; // Retrieves object under mouse cursor, if any
  4.   if(ActObj!=null) // we did click an object
  5.   {
  6.  
  7. //Code cutted away to keep the example simple. We go straight to case 1, which is triggered when the mouse pointer is 1, or "LookAt"
  8.        
  9.   case 1:
  10.     if(ActObj.CanHandleEvent("LookAt")) ActObj.ApplyEvent("LookAt");
  11.     else actor.Talk("What's so special about it?");
  12.     break;
  13.  
  14.     //Code cutted away. (The other cases)
  15.  
  16.  
  17.     WaitFor(actor); //Let actor finish his event
  18.     Game.Interactive = true; //Give control back to player
  19.   }
  20. }
  21.  

The problem is that I don't get back control of the game. Game.Interactive remains false. The funny thing is that when I use the debugger and step through the script, it suddenly DOES work.

The reason why I added the WaitFor(actor) command is that if I don't -- the game gives back control to the player while the actor still has to perform his actions.

What am I doing wrong?

Or perhaps there is a better way of accomplishing my goal?

Thanks!


2
Can't reproduce / BSOD during designtime with WME 1.8.006
« on: December 27, 2008, 03:32:00 PM »
I'm following some tutorials to get a taste of WME, as I'm considering switching to this engine. Unfortunately, Windows crashes very often when clicking buttons or even switching to the project manager. I get a BSOD and have to reboot.

I'm using the stable version (1.8.006), and running Windows XP SP3. One important thing to mention, perhaps, is that I'm running it with a virtual machine (VMWare Fusion 2.something), because I have a Mac. The games themselves are behaving OK, the crashes occur during designtime.

Anyone else running a Virtual Machine? Or is this a known error in 1.8.006 and should I upgrade?

Pages: [1]

Page created in 0.047 seconds with 18 queries.