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.

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

Pages: [1]
1
Technical forum / Re: QuitGame event handler
« on: June 17, 2014, 09:23:54 AM »
It's the first thing I did.  If it's in there, then I'd really like to know where.

2
Bug reports / Keyboard.IsAlt attribute
« on: June 16, 2014, 04:04:50 PM »
I'm using the latest beta build (1.10.1) on Windows 7.  I added the following code to the Keypress event in game.script in the wme_demo project.  Nothing else in the project has been modified.

Code: WME Script
  1. if(Keyboard.KeyCode==VK_HOME && Keyboard.IsAlt==true)
  2. {
  3.   actor.Talk("You said the magic word.");
  4. }
  5.  

Pressing Alt+Home does not produce the line of text.  Strangely, Ctrl+Alt+Home works!  Replacing IsAlt with IsControl or IsShift makes the code work as expected. e.g. Ctrl+Home and Shift+Home will call the statement inside the block.

Note:  I've tried replacing VK_HOME with other keyboard codes just to make sure that wasn't some special binding, and the behavior is unchanged.

3
Technical forum / Re: QuitGame event handler
« on: June 16, 2014, 03:36:36 PM »
As far as I can tell, it's an undocumented low-level event.  It's a good default, so I don't need to change it, but I wanted to make sure I wasn't overlooking something.

You wouldn't want to write code if you could do it so cleanly with the QuitGame event.  But you wouldn't know you could do this without reading the engine or demo source.

4
Technical forum / Re: QuitGame event handler
« on: June 16, 2014, 12:07:05 PM »
That is Game.QuitGame();

I have searched the *.script files and the documentation, and I can't find where the QuitGame event is defined for Alt+F4.

5
Technical forum / QuitGame event handler
« on: June 16, 2014, 12:36:35 AM »
I'm reading the code for the included projects line by line.  In wme_demo, there is an event called "QuitGame".  I can't find this in the documentation or in the script files.

Where is it defined?  In the, um, event I'm not overlooking something, what other events aren't documented?

6
Technical forum / Re: this keyword
« on: December 28, 2013, 04:20:58 PM »
Thank you for the excellent explanation.  That clears up a lot.

I made a new copy of wme_demo and changed the following code in screen_init.script:

Code: WME Script
  1. global OldGuy = Scene.LoadEntity("entities\oldguy\oldguy.entity");
  2. OldGuy.SkipTo(505, 330);
  3.  

...to this:

Code: WME Script
  1. global OldGuy = Scene.LoadEntity("entities\oldguy\oldguy.entity");
  2. OldGuy.SetCursor("sprites\system\cur_wait.sprite");
  3. OldGuy.SkipTo(505, 330);
  4.  

It works, of course, but for reason it wasn't working in my other project.  Even stranger, it seems to have now gone away in both project folders.  I'll never know what I was doing wrong.

Code: WME Script
  1. global OldGuy;
  2. OldGuy.SetCursor("sprites\system\cur_wait.sprite");
  3.  

This lets me change it in other scripts.  Maybe not having the global variable declaration in my script was the problem.  Regardless, I have a better understanding of how WME works now and for that I am grateful.

Quote
Multiple objects can share the same script. For example, if your scene contains 10 doors, you can use the same script for all of them, and the 'this' value in each of them will reference one particular door.

That is absolutely brilliant and not something I'd considered.  Every door in the game can be rigged by creating a new door object and attaching a script to it.  Each door could be assigned its own open/close sprites and you'd just have to insert an OpenClose event to change its state when the player tries to open or close it.  Does that sound right?

Thanks again.

Edit:  Fixed formatting.

7
Technical forum / this keyword
« on: December 28, 2013, 11:41:53 AM »
I've tried searching the forums, but "this" and "this keyword" and "this." yields a lot of results, as you can imagine.

You can attach a script to an object either using the SceneEdit app or by calling the AttachScript method in your code.

What I don't understand is why when using, for instance, the SetCursor method on an object, I have to call that method using the this keyword.  I've tried referencing the object by its name in both scene_init.script and oldguy.script.

For example, my first attempt was to call OldGuy.SetCursor("sprites\system\cur_wait.sprite"); in scene_init.script, but that did not work.  Saving the return value and printing it using Game.Msg(setcursor_result); produced a null type.

Moving it to oldguy.script didn't work either.  But calling this.SetCursor("sprites\system\cur_wait.sprite"); in that script created the behavior I was looking for.  Hovering the mouse over that object changed the cursor to the hourglass sprite.

I'd simply like to know why.  The script reference makes it unclear which methods only work this way.  Otherwise, it's not a problem.

8
Technical forum / Re: Blender 2.69
« on: December 15, 2013, 03:28:06 PM »
I followed the guide for Blender 2.42 to the letter.  It exports the camera but not the scene.

I even "triangulated" my meshes to see if that would make a difference.  No dice.

Kind of relieved, really.  It's been a few years since I've used used pre-2.5 and I wasn't looking forward to relearning its idiosyncrasies. 

9
Technical forum / Re: Blender 2.69
« on: December 15, 2013, 12:36:57 AM »
Well, I've managed to create idle, walking, and "take" animations.  It requires a lot of work, but it's doable.

Now I'm stuck and I fear I won't be able to proceed.  Blender doesn't seem to export the camera when creating the hidden geometry.  I found a stale page with a download link, but the script was the same as the one I had installed.  I might try an older version of Blender later, but for now I am going to take a break.

At first I didn't think the 3ds export worked until I tried scaling my scene in Blender to a gigantic size.  Turns out it was just too small for the Wintermute scene editor to draw.  My guess is the camera creates the scale.  The combo box doesn't have any cameras listed.

10
Technical forum / Re: Blender 2.69
« on: December 14, 2013, 11:26:24 PM »
I've managed to get a walking animation to load except it's also the new idle animation.  Progress, at least.

For some reason, it's not exporting as the animation's name ("Walk") but is defaulting to Action.

I also can't seem to get it to support PNG and alpha channels for things like hair and holes in geometry.


11
Technical forum / Re: Blender 2.69
« on: December 14, 2013, 06:32:42 PM »
I've been able to get an object to load.  Now I need to figure out why my animations aren't loading.

Is there a quickstart guide to the bare minimum my animations need to be compatible?

12
Technical forum / Blender 2.69
« on: December 14, 2013, 05:11:03 PM »
Can someone please confirm that the DirectX exporter for Blender 2.69 works?

I've been playing with it this morning.  No luck yet.




Pages: [1]

Page created in 0.036 seconds with 25 queries.