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.

Author Topic: Game recieves input in "Game.Interactive = false" !!!  (Read 5244 times)

0 Members and 1 Guest are viewing this topic.

pakhpakh64

  • Lurker
  • *
  • Karma: -1
  • Offline Offline
  • Gender: Male
  • Posts: 28
    • View Profile
Game recieves input in "Game.Interactive = false" !!!
« on: April 09, 2013, 02:30:25 PM »

hi every body
I have this piece of code in which i set Game.Interactive to false but the game still recieves mouse input!  :-\
I have set breakpoints in Debugging console and until player doesn't do any thing Game.Interactive remains false, but with one single click it switches back to true and THE REST OF THIS EVENT IS NOT PERFORMED!

Code: WME Script
  1. on "SomeEvent"
  2. {
  3.         Game.Interactive = false;
  4.  
  5.         var NewLampOff = Scene.GetNode("NewLampOff");
  6.         actor.ActorGoToObject(NewLampOff); //The only difference between this function and engine's GoToObject
  7.                                         //is in the path that actor actually walks.
  8.         actor.PlayAnimAsync("take");
  9.         Sleep(600);
  10.         NewLampOff.Active = true;
  11.         Sleep(600);
  12.        
  13.         Game.Interactive = true;
  14. }
  15.  

I really don't know what causes this, because if player doesn't do anything the event is performed right.
any help would be much appreciated.
Logged

dongo

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 29
    • View Profile
Re: Game recieves input in "Game.Interactive = false" !!!
« Reply #1 on: April 09, 2013, 03:35:18 PM »

Hi,

ActorGoToObject(NewLampOff);

this method is make for you? search the method and look it, maybe its the problem source.
if you put a line like Game.Interactive=true on this method, when you call this method, Game.Interactive goes to true ;)
« Last Edit: April 09, 2013, 03:39:49 PM by dongo »
Logged

pakhpakh64

  • Lurker
  • *
  • Karma: -1
  • Offline Offline
  • Gender: Male
  • Posts: 28
    • View Profile
Re: Game recieves input in "Game.Interactive = false" !!!
« Reply #2 on: April 09, 2013, 04:13:57 PM »

I checked ActorGoToObject function, it doesn't use Game.Interactive, I'm pretty sure what causes this weird problem lays some where else.
Logged

dongo

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 29
    • View Profile
Re: Game recieves input in "Game.Interactive = false" !!!
« Reply #3 on: April 09, 2013, 04:38:20 PM »

very rare, ok go to scripts directory in your proyect and open game.script

search on this if you have a line Game.Interactive=true; on "LeftClick" event
Logged

anarchist

  • Regular poster
  • ***
  • Karma: 5
  • Offline Offline
  • Gender: Male
  • Posts: 212
    • View Profile
Re: Game recieves input in "Game.Interactive = false" !!!
« Reply #4 on: April 09, 2013, 04:50:38 PM »

Does the cursor remain changed to the non-interactive cursor? How do you know for certain that it is in non-interactive mode and how do you notice that it exits? Perhaps you could show us your ActorGoToObject (or at least a part of it if you are shy  ;D )

For searching many files of code for a hidden command that affects my game unexpectedly (like yours) I use Notepad++ application and search using its "Find in files" feature to see where the hell I put that @#^%!& command.
Logged

Jose

  • Regular poster
  • ***
  • Karma: 2
  • Offline Offline
  • Posts: 134
    • View Profile
Re: Game recieves input in "Game.Interactive = false" !!!
« Reply #5 on: April 10, 2013, 02:03:13 PM »

Also Scite (which came with WME) has the option for searching in files.
Logged

pakhpakh64

  • Lurker
  • *
  • Karma: -1
  • Offline Offline
  • Gender: Male
  • Posts: 28
    • View Profile
Re: Game recieves input in "Game.Interactive = false" !!!
« Reply #6 on: April 11, 2013, 08:32:14 AM »

Wow tnx for all the suggestions.

Does the cursor remain changed to the non-interactive cursor? How do you know for certain that it is in non-interactive mode and how do you notice that it exits?

I make the cursor hidden in non-interactive mode, and as I said I check if it's interactive/non-interactive mode with WME Debugging console.
Logged

anarchist

  • Regular poster
  • ***
  • Karma: 5
  • Offline Offline
  • Gender: Male
  • Posts: 212
    • View Profile
Re: Game recieves input in "Game.Interactive = false" !!!
« Reply #7 on: April 11, 2013, 06:48:24 PM »

Have you tried compiling the game and running it directly (instead of Run Game in WME Project Manager)?

Also, between which commands does the game exit interactive mode? Also, where do you apply the event? Through game script, through an entity or do you call it from a window that was under exclusive mode (GoSystemExclusive or GoExclusive)?

Because the code you showed us should work, we will need more information to help you.
Logged

pakhpakh64

  • Lurker
  • *
  • Karma: -1
  • Offline Offline
  • Gender: Male
  • Posts: 28
    • View Profile
Re: Game recieves input in "Game.Interactive = false" !!!
« Reply #8 on: April 25, 2013, 11:38:47 AM »

I fix it, thanks for all the help, it was a pretty bad mistake, I was setting Game.Interactive to true In another script in parallel execution with this one!
Logged
 

Page created in 0.037 seconds with 24 queries.