Please login or register.

Login with username, password and session length
Advanced search  

News:

Latest WME version: WME 1.9.1 (January 1st, 2010) - download

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

Pages: 1 ... 3 4 [5] 6 7 ... 15
61
Technical forum / Re: Interactive Code Problem
« on: June 28, 2015, 12:10:03 PM »
Hi Darryl, welcome to the forum.

Dan Peach has provided one solution below. Indeed, "Remember node states" will make sure that the engine remembers changes you made to nodes in scenes.

Alternatively you can use the scene_init.script to achieve this.

Code: WME Script
  1. ////////////////////////////////////////////////////////////////////////////////
  2. // scene state
  3. global StateScene;
  4.  
  5.  
  6. // default values
  7. if(StateScene == null)
  8. {
  9.         StateScene.RegionInteractive = true;
  10. }
  11.  
  12. if(StateScene.LetterHotspotVisible){
  13.         var node = Scene.GetNode("region_name");
  14.         node.Interactive = StateScene.RegionInteractive;
  15. }
  16.  

Then, inside the script of the region:

Code: WME Script
  1. on "LeftClick"
  2. {
  3.         var node = Scene.GetNode("region_name");
  4.         node.Interactive = false;
  5.         StateScene.RegionInteractive = false;
  6. }
  7.  

This way, you have the node state inside a global variable. Every time you re-enter the scene, the code in scene_init will run and set Interactive to false. Hope this helps.

62
That worked, thanks a lot eborr!

63
Technical forum / Re: Caption window hidden beneath nested window
« on: May 28, 2015, 09:24:52 PM »
I just saw your question. I think you need to show us a screenshot to understand your issue.

64
I have several inventory items for which I have created cursor sprites. When I select an inventory item I want to hide the main cursor and only show the item cursor. Some item cursors are smaller than the main cursor which results in both cursors being visible.

I have tried adding the following code in game.script:

Code: WME Script
  1. // clicking an inventory item
  2. else if(ActObj.Type == "item" && Item == null)
  3. {
  4.         Game.SelectedItem = ActObj;
  5.         Game.RemoveCursor();
  6. }
  7.  

This removes the main cursor when the mouse is not over a scene entity or actor. But when the cursor hovers over a scene entity or actor, the entity specific cursor appears together with the item's cursor.

A solution would be to make all item cursor sprites larger than the scene entity cursor sprites. But I wonder if there is an easy way through script.

65
Technical forum / Re: Constantly changing background sprite
« on: June 28, 2014, 08:24:38 AM »
Glad that it is solved but can you tell us some more details on how you solved it? You said you have the code looping. Perhaps constantly looping is not ideal, especially if the loop will continue in other scenes (or will it stop when the scene ends?). Perhaps each time an interaction happens that changes the background you call a function with the background change code.

66
Technical forum / Re: Constantly changing background sprite
« on: June 27, 2014, 05:04:21 PM »
Most probably the code which changes the background sprite only runs once. Where did you place the last piece of code (the one you posted twice which modifies the sprite)? If it is in a script that runs only once (for instance scene_init.script) it will not work as you would like which I suspect is the cause of the issue you have. You have to make certain that whenever Panel.Intro value changes to re-run that piece of code.

67
Technical forum / Re: Interface menu not opening on right click
« on: June 27, 2014, 04:58:43 PM »
Just an additional note to avoid confusion though I think you got it in the end: The code to handle the right click event (therefore the code that shows the actions menu) is in game.script. For whatever entity you add on a scene and press right click on, the game.script RightClick handler checks whether the 3 actions are applicable on the entity:

Code: WME Script
  1. if(ActObj.CanHandleEvent("Take") || ActObj.CanHandleEvent("Talk") || ActObj.CanHandleEvent("LookAt"))
  2.  

else it simply applies the RightClick event on the item:

Code: WME Script
  1. else ActObj.ApplyEvent("RightClick");
  2.  

So keep in mind to revisit this code if you modify the actions menu (for instance if you add another verb/action like "PickUp").

68
Technical forum / Re: Constantly changing background sprite
« on: June 26, 2014, 05:00:27 PM »
The code seems fine so you will need to provide some more details on how you use it. Where is this placed? When does it run? How are you certain that Panel.Intro value changes and the background does not? Did you debug?

69
Technical forum / Re: Interface menu not opening on right click
« on: June 26, 2014, 04:54:37 PM »
game.script looks the same like the demo, which I assume you used as a template. Next piece of information you should provide is some more details. What is the entity you right-click on and does not show the menu? Do you receive any errors? Is the entity "interactive" in the scene?

Alternatively you can add a break-point in game.script RightClick event and examine what goes wrong.

70
Technical forum / Re: Interface menu not opening on right click
« on: June 24, 2014, 07:24:00 PM »
The scripts you show us are irrelevant to your issue. You say that the actions menu does not open. In the demo this is handled by the "RightClick" event handler which is placed in game.script. You should compare your game.script with the one in the demo or show it to us.

71
Technical forum / Re: multiple line editor
« on: June 23, 2014, 08:01:01 PM »
Unfortunately such feature is not supported at the moment. I looked for such a feature before too because it has its uses.

The fact that the engine does not support it doesn't mean you cannot implement it yourself, but I believe you should try only if you really need it.

72
Technical forum / Re: Full keyboard control
« on: June 16, 2014, 09:27:42 PM »
A good example project is Spank the Hero that was released inside this forum:

http://forum.dead-code.org/index.php?topic=5021.msg28596#msg28596

there is a link in that thread to the project:

http://dead-code.org/download/SpankTheHero_v0.30.zip

73
Technical forum / Re: press any key
« on: June 06, 2014, 05:58:57 PM »
You can achieve this by catching the Keypress event. In game.script you can have something like this:

Code: WME Script
  1. on "Keypress"
  2. {
  3.   if(Scene.Name == "NameOfTheScene")
  4.   {
  5.     Game.ChangeScene(<scene>, FadeOut, FadeIn);
  6.   }
  7.   ...
  8. }
  9.  

You can try several values for FadeOut and FadeIn to make it look pretty.

74
Technical forum / Re: 3D scene import problem
« on: May 16, 2014, 05:33:10 PM »
What we do (which I think is quite common) is create the scene in detail to take a snapshot and create the background. Then we simplify the scene before exporting it. You dont need to have all the objects with full detail in the scene. Especially objects which will never be accessed by the character or will never have a shadow on them can be completely removed.

75
Technical forum / Re: 3D scene import problem
« on: May 02, 2014, 09:40:53 PM »
All object should be prefixed. If something is not a walk entity then it is a block object and should be prefix with blk_ since you don't want the actor to be able to walk on it.

Pages: 1 ... 3 4 [5] 6 7 ... 15

Page created in 0.095 seconds with 20 queries.