Please login or register.

Login with username, password and session length
Advanced search  

News:

For WME related articles and tutorials visit WME Resource Center.

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.

Messages - Azrael

Pages: 1 [2] 3 4 ... 11
16
Technical forum / Re: movie clip intro
« on: July 06, 2014, 07:27:06 PM »
You need only to change this:

Code: WME Script
  1. if(Game.Interactive && Game.MouseY < 45 && !Game.ResponsesVisible && !WinMenu.Visible && Scene.NotShowInventory != true) Game.InventoryVisible = true;

No need to change the part that hide the inventory.

And yes, is enough to add:
Code: WME Script
  1. Scene.NotShowInventory = true;

On the scene_init of the scene in which you want the menu to not show. Since the script that show or hide the inventory is an infinite loop it will check each time if the variable is set or no.

17
Technical forum / Re: music restarts
« on: July 06, 2014, 03:30:02 PM »
Oh and please 2 things :)

First please open a new post if you need help for something different than the main post subjects, so is easier for other people to find it. Maybe other could be have the same problem ;)
Second please use the "WME script" code when you post some of your code, is easier to read. You have simply to select the code and then select "WME script" from the Code menu when you write a post (it's on the same line of font size and color).

Thanks ;)

18
Technical forum / Re: music restarts
« on: July 06, 2014, 03:25:36 PM »
I don't like too much the idea of dropping the item and then take it again:)
You should look to documentation, when i was developing our game i found very useful "wme.chm" the is located on the folder in which you have installed wme.

In the left column if you click on "Scripting in WME" and then on "Script language reference" you can find reference of quite everything you could need.
For example under "Item object" i see some attributes like "Active" or also maybe better "Interactive" than could be perfect for what you need.

Possible solution are many ;)

19
Technical forum / Re: movie clip intro
« on: July 06, 2014, 02:16:18 PM »
You don't have to add it at the end of the script, you have to change the script you are using to show inventory. That was only an example, i don't know which script are you using :)
Also remember that you have to set the variable in the scene_init.

20
Technical forum / Re: movie clip intro
« on: July 06, 2014, 07:28:13 AM »
You have to change the script that show inventory on game_daemon.script and adding something that block when you want.
There are a couple of way to do it, you could check the scene name:

Code: WME Script
  1. if (Game.MouseY < 66 && Scene.Name != "NameOfTheSceneWithTheVideo")
  2. {
  3. //Show inventory
  4. }

Or you could use a variable so if you have many scenes with movie you don't have to add each name.
In the scene_init.script of the movie scene:
Code: WME Script
  1. Scene.NotShowInventory = true;

In game_daemon.script:
Code: WME Script
  1. if (Game.MouseY < 66 && Scene.NotShowInventory != true)
  2. {
  3. //Show inventory
  4. }

As i said there are many way, it depends on what you want to achieve and how your scripts works.

21
Technical forum / Re: music restarts
« on: July 06, 2014, 07:02:29 AM »
It's restarting because you make it restart everytime the scene is loaded :)
Before making the music start you should check if a music is playing and if it's the right music. Something like that should work:

Code: WME Script
  1. if (Game.IsMusicPlaying() && Game.GetMusic() != "sounds\Salex1d.ogg")
  2.         {
  3.         Game.PlayMusicChannel(0, "sounds\Salex1d.ogg", true);
  4.         Game.SetMusicChannelVolume(0,70);
  5.         }
  6. else if (!Game.IsMusicPlaying())
  7.         {
  8.         Game.PlayMusicChannel(0, "sounds\Salex1d.ogg", true);
  9.         Game.SetMusicChannelVolume(0,70);
  10.         }
  11.  

22
Technical forum / Re: Disabling keyboard
« on: June 05, 2014, 07:59:09 AM »
If you need only to disable the main menu there is a simple way, in your game.script you should have something like:
Code: WME Script
  1. on "Keypress"
  2. {
  3.   // on Esc or F1 key
  4.   if(Keyboard.KeyCode==VK_ESCAPE || Keyboard.KeyCode==VK_F1)
  5.   {
  6.     // load and display the main menu window
  7.     WinCaption.Visible = false;
  8.     var WinMainMenu = Game.LoadWindow("interface\system\mainmenu.window");
  9.     WinMainMenu.Center();
  10.     WinMainMenu.GoSystemExclusive();
  11.     Game.UnloadObject(WinMainMenu);
  12.   }
  13. }

So simply change it on something like:
Code: WME Script
  1. on "Keypress"
  2. {
  3.   // on Esc or F1 key
  4.   if((Keyboard.KeyCode==VK_ESCAPE || Keyboard.KeyCode==VK_F1) && Scene.Name != "NameOfTheScene")
  5.   {
  6.     // load and display the main menu window
  7.     WinCaption.Visible = false;
  8.     var WinMainMenu = Game.LoadWindow("interface\system\mainmenu.window");
  9.     WinMainMenu.Center();
  10.     WinMainMenu.GoSystemExclusive();
  11.     Game.UnloadObject(WinMainMenu);
  12.   }
  13. }


If you have to do it on many scenes you could also use a scene variable. So on your scene.init add somewhere:
Code: WME Script
  1. Scene.DontDisplayMenu = true;

And on the game.script:
Code: WME Script
  1. on "Keypress"
  2. {
  3.   // on Esc or F1 key
  4.   if((Keyboard.KeyCode==VK_ESCAPE || Keyboard.KeyCode==VK_F1) && Scene.DontDisplayMenu != true)
  5.   {
  6.     // load and display the main menu window
  7.     WinCaption.Visible = false;
  8.     var WinMainMenu = Game.LoadWindow("interface\system\mainmenu.window");
  9.     WinMainMenu.Center();
  10.     WinMainMenu.GoSystemExclusive();
  11.     Game.UnloadObject(WinMainMenu);
  12.   }
  13. }

Also remember to set "Scene.DontDisplayMenu" on "false", "null" or something else not "true" on the other scenes, maybe adding it on "base.inc" so it will be always active except when you don't want

23
Technical forum / Re: Different inventory.def file with multiple inventory?
« on: November 09, 2013, 07:42:43 PM »
Yes, there is a method:

Code: WME Script
  1. Reloads an inventory box from file.
  2.  
  3. Parameters
  4. Filename         The inventory-box definition file to be loaded.
  5. Return value     Returns true if the method succeeded.
  6.  

24
It's because in you scene there is an entity that load the file "background.bmp" ;)
If you open your scene and look on the left column you should have an entity called "background". Click on it then look down on the "Entity properties" than to the "Sprite" row.
Here you can change the image clicking on the "...".

25
Scripts, plugins, utilities, goodies / Re: Steam plugin
« on: October 31, 2013, 07:05:34 PM »
Ok, thanks a lot anyway for the help :)

26
Scripts, plugins, utilities, goodies / Re: Steam plugin
« on: October 31, 2013, 02:41:21 PM »
Ok i tried with RequestStats but with the same result, any other advice? Otherwise he sadly had to leave the game without achievements  :'(

27
Scripts, plugins, utilities, goodies / Re: Steam plugin
« on: October 31, 2013, 01:41:21 PM »
Ok, StatsAvailable return "false".
But the problems that the first time it happen i was playing for a while, without closing the game i mean.
And now i've tried to wait some minutes but nothing, there is a way to force download or something else?

28
Scripts, plugins, utilities, goodies / Re: Steam plugin
« on: October 31, 2013, 11:20:19 AM »
Uhm, it say "no", so i think "false". There is some way to know why?

29
Scripts, plugins, utilities, goodies / Re: Steam plugin
« on: October 31, 2013, 10:00:51 AM »
I'm having some problems with the plugin, it seem to work perfectly for a while (completely random) and then simply stop working.

I've checked the scripts and seem to be ok. I've done many test and everything seem to be working but achievements will not me setted on steam. I inserted also F5 as reset button for achievements and stats and at the beginning it works, but when achievement stop to be set also this don't work anymore.

For example:
Code: WME Script
  1. #include "scripts\base.inc"
  2. global g_Steam;
  3.  
  4. ////////////////////////////////////////////////////////////////////////////////
  5. on "observe"
  6.         {
  7.         Game.Interactive = false;
  8.        
  9.         actor.TurnTo(this);
  10.         actor.TalkUp("/sysengXXXX/Text");
  11.        
  12.         //Steam Achievement
  13.         if (g_Steam != null)
  14.                 {
  15.                 g_Steam.SetAchievement("ACH_MALTESE_FALCON");
  16.                 Game.LOG("Achievement Set.");
  17.                 }
  18.         else Game.LOG("Steam not working!");
  19.        
  20.         Game.Msg("New version loaded"); //To be sure that the news script was loaded
  21.        
  22.         if (g_Steam.SteamAvailable) Game.LOG("Steamworks available!");
  23.         else Game.LOG("Steamworks not available");
  24.        
  25.         Game.Interactive = true;
  26.         }
  27.  
  28. on "take"
  29.         {
  30.         Game.Interactive = false;
  31.        
  32.         actor.TurnTo(this);
  33.         actor.TalkUp("/sysengXXXX/Text");
  34.        
  35.         Game.Interactive = true;
  36.         }
  37.  

This sometimes works, sometimes not. I've a save now right before and it doesn't work. But with the log enable it says:
Code: WME Script
  1. 09:44: Achievement Set.
  2. 09:44: Steamworks available!
None of the errors above are show.

Ah the Achievement is obviously not already set.

The Game.Msg("New version loaded"); is displayed so i know that the script is correctly loaded (i change it each time i upload something new).

global g_Steam = new SteamAPI(); is enabled at game.script, i tried also to put it on this script but with the same result.

As i said is completely random, the first time i was able to play more than 1 hour before it stop to work, the second time half an hour.


30
Scripts, plugins, utilities, goodies / Re: Steam plugin
« on: October 19, 2013, 02:17:35 PM »
Thanks a lot  :)

Pages: 1 [2] 3 4 ... 11

Page created in 0.073 seconds with 19 queries.