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.

Topics - binary1

Pages: [1]
1
Technical forum / Difficulty combining inventory items
« on: June 25, 2015, 12:37:48 AM »
Hi,

I'm trying to follow the technique used in the WME book for combining items in the inventory.  I've got other items that work fine so I'm not sure what is wrong here.  This is a teaching app for veterinary students.

I have a dog, a syringe, and empty blood tubes in the inventory.  The idea is to click on the patient (the dog) with the syringe.  The syringe changes to a filled syringe.  That part works fine.  The next step is to click on the tubes with the syringe or click on the syringe with the tubes.  The tubes and syringe are deleted and filled blood tubes are now in the inventory. 

Here is the code in items:

Code: [Select]
ITEM
{
   CURSOR_COMBINED = TRUE
   CAPTION = "Filled Syringe"
   NAME = "syringeFull"
   IMAGE = "items\syringeFull.png"
   CURSOR = "items\syringeFull.sprite"
   CURSOR_HOVER = "items\syringeFull_h.png"
   SCRIPT = "items\syringeFull.script"
}

ITEM
{
   CURSOR_COMBINED = TRUE
   CAPTION = "Blood Tubes"
   NAME = "tubes"
   IMAGE = "items\tubes.png"
   CURSOR = "items\tubes.sprite"
   CURSOR_HOVER = "items\tubes_h.png"
   SCRIPT = "items\tubes.script"
}

ITEM
{
   CURSOR_COMBINED = TRUE
   CAPTION = "Filled Blood Tubes"
   NAME = "tubesFull"
   IMAGE = "items\tubesFull.png"
   CURSOR = "items\tubesFull.sprite"
   CURSOR_HOVER = "items\tubesFull_h.png"
   SCRIPT = "items\tubesFull.script"
}

And the code for the filled syringe:
Code: [Select]
////////////////////////////////////////////////////////////////////////////////
on "LeftClick"
{
  Game.SelectedItem = "syringeFull";
}

////////////////////////////////////////////////////////////////////////////////
on "tubes"
{
Game.Interactive = false;
actor.Talk("I'll fill these blood tubes");
Game.TakeItem("tubesFull");
Game.DeleteItem("tubes");
Game.Interactive = true;
Game.DeleteItem("syringeFull");
}

and finally, similar code for the empty tubes:
Code: [Select]
////////////////////////////////////////////////////////////////////////////////
on "LeftClick"
{
  Game.SelectedItem = "tubes";
}

on "syringeFull"
{
Game.Interactive = false;
actor.Talk("I'll fill these blood tubes");
Game.TakeItem("tubesFull");
Game.DeleteItem("syringeFull");
Game.Interactive = true;
Game.DeleteItem("tubes");
}

I have sprites for the filled syringe, the empty tubes and the filled tubes, all with the correct names.  I don't get any errors.  I see the text "use something with something" but nothing happens when I click.  Do I need to put anything in the scene?  I've deleted the sprites and recreated them without any success and I'm not sure what to try.

Any thoughts?

2
Technical forum / invalid image for thumbnail
« on: June 17, 2015, 11:09:19 PM »
When I save or load a game, I only see a label "invalid image" for the thumbnail.  I've gone through the 3d demo looking at all the scripts for loading, saving games but can't find anything different from what I have.  I see where the thumbnail object is getting the image but I don't see when the screenshot is being made in the script.  There is a flash on the screen when the save button is pressed so I'm guessing that is when the screenshot is made but what method is being called and where?  I don't see anything in the game script either.

This is in the saveslot.script: Thumbnail.SetImage("savegame:" + this.Name);
Printing this.Name to the screen just shows the number of the slot so where is the image coming from?  Or, in my case not coming from?

I found Screenshot, ScreenshotEx, and StoreSaveThumbnail functions under the game object but I don't see where any of these are being called in the script for the demo.  I've searched the forum but haven't come up with a solution.  Do I need to call one of these functions or a different one?  How does the demo create the screenshot?

Thanks.

3
Technical forum / Slider problem
« on: June 02, 2015, 07:22:22 AM »
I have three variables that I am trying to set with 3 horizontal slider bars similar to volume controls that have been discussed before.  I have looked at the code given before by Fred and Mneumonic but can't quite get things to work.  The cursor always seems to be off.  There is a background called technique that holds the three sliding bars and there are three slider objects.  I want the sliders to stay on the bars.  The following is the closest I've managed:

#include "scripts\base.inc"

var MinX = 105;
var MaxX = 274;
var mA = 0;

var Parent = this.Parent;
kVpSlider = this.GetControl("kVpSlider");
mASlider = this.GetControl("mASlider");
timeSlider = this.GetControl("timeSlider");
technique = this.GetControl("technique");

////////////////////////////////////////////////////////////////////////////////
method SetValue(Percent)
{
   mA = MinX + (MaxX - MinX) * (Percent / 100);
}


var IsDragging = false;
////////////////////////////////////////////////////////////////////////////////

on "LeftClick"
{      
   IsDragging = true;
   PlaySounds();
   
   while(IsDragging)
   {
      if(mASlider.X > MaxX)    mASlider.X = MaxX;
      else if(mASlider.X < MinX) mASlider.X = MinX;
      else mASlider.X = Game.MouseX;
      SetVolume((this.X - MinX) / (MaxX - MinX) * 100);
      
      Sleep(1);
   }
   IsDragging = false;
}


////////////////////////////////////////////////////////////////////////////////
on "LeftRelease"
{
   IsDragging = false;
   //StopSounds();
}

on "close"
{
  this.Close();
}


To start with, I am only trying with one of the sliders called mASlider but it doesn't stay completely within the margins of the slider bar. I've left some of the volume code in place right now but if I can get the slider working, I plan to change that.
Any suggestions?  Has anyone done something similar? 

4
Technical forum / moving characters together
« on: April 13, 2015, 07:51:42 AM »
I want two NPC's to follow the main player character into another room. The animation is triggered by dialogue.  At a certain point, the main character goes to the door. Then the other two characters follow.  The scene changes when they all get there.  Is there a way to make the three move at the same time?  Right now, they move one-by-one, which looks a little strange.

Thanks for any suggestions.

5
Technical forum / Image Viewer
« on: August 24, 2014, 03:30:18 PM »
I'm wondering if anybody has some ideas to help me out.  I'm working on a game for veterinary students.  The student plays the role of a veterinarian in the virtual hospital.  After taking x-rays or ultrasound images, I want the player to be able to view the images.  Ideally, these would be dicom images but they could also be some other format (jpegs, tiffs etc).  The player should be able to move easily to another image, zoom the image, and alter the contrast and grey scale.  And, they shouldn't be able to see the images until they take them! 

I thought of using a scene or window to hold the images.  It would be easy to code things so they couldn't display the images right away.  But, I'm not sure how to let them zoom or alter the grey scale with either of these solutions.  Has anyone done something similar?

I have tried going to an external application like ezdicom or DicomImageViewer but I'm not sure how to restrict what images they can see.  I'm going to try putting the viewer inside the data directory with the images and the see what happens when I package it.  Any other thoughts?

Thanks.

6
Technical forum / Read book in inventory
« on: November 13, 2013, 05:10:44 PM »
This probably has a simple solution but I'm stuck. I want the main character to pick up a medical record which will then be in inventory. The player should be able to click on the book and read it from the inventory. The record is a window which will be updated as information is discovered. My problem is that I can't figure out how to make something happen when an item is clicked in the inventory.

I think I need to alter the code in the game script after where it has:
    else if(Game.SelectedItem != null && Game.SelectedItem != ActObj)

I tried adding "&& Game.SelectedItem != "medRecord")" but that didn't work.  Any suggestions would be greatly appreciated.
 

7
Technical forum / restricting actor to part of the floor
« on: September 02, 2013, 06:47:28 AM »
Is there a way to restrict a 3D actor to part of the floor?  I have a scene where there is a receptionist behind a desk and the main actor is in front of the desk.  Is there a way to have the desk be between the two models?

8
Technical forum / 3D animation doesn't stop
« on: August 26, 2013, 04:43:43 AM »
I'm using WME 1.10.001 and have the educational version of 3ds max 2014.  I'm using the Alin Direct X Exporter free version since there isn't a Panda Direct X exporter for 3ds max 2014.  The character just keeps walking in place.  I did some animations with an earlier version of 3ds max previously and exported with the Panda exporter.  That one worked fine but I'm not sure whether the problem is with the exporter or whether I've forgotten to do something in 3ds Max since I don't have much experience with the program. 

Has anyone else had this problem or does anyone know what I need to do?  I would be grateful for any suggestions or advice.

9
WME sources discussion / skinmeshhelper error on compile
« on: May 17, 2012, 04:07:03 PM »
I'm trying to compile Wintermute with Visual C++ 2008 express edition.  I have directx 8 so I got past the d3dx8 errors but now am getting the following errors:

error C2660: 'ID3DXSkinMesh::GenerateSkinnedMesh' : function does not take 7 arguments
error C2660: 'ID3DXSkinMesh::UpdateSkinnedMesh' : function does not take 3 arguments

I also get a linking error but I think this is secondary to the above errors.

Does anyone know how to fix these?

Thanks.

10
Technical forum / motion capture
« on: April 23, 2012, 05:52:45 PM »
Has anyone tried using motion capture with MotionBuilder and 3ds Max and then exporting to .x for use with WME?  Some other method?  I would like to animate some characters with motion capture but when I tried exporting from 3ds max, the models either don't show up or crash the program when I try to use them.  I've been using the settings suggested on the resource page for exporting from 3ds max.  Thanks.

11
Technical forum / actor walks in strange path
« on: March 15, 2012, 11:35:36 PM »
What scripts determine the path the actor takes?  I have a series of scenes of scenes.  I have most working ok but there is one where the actor is invisible coming from one side but ok (except for a strange path) coming from the other side.  I am running in 2.5D mode.
If I start from the beginning, the actor is standing in the middle of the room.  I click to go into room 2.  The actor doesn't show up but I can click on the entrance of room three to get him there.  He is at the bottom of the screen facing up.  From room three, I click to go back to room 2.  The entrance to room 2 is on the bottom right of the screen but he goes up and turn around before going down again.  From there, the actor enters room 2 where he is visible but he comes from the far left, turns facing down, walks down and then turns to face up.  If I then click to go back to room 1, I hear footsteps but there is no actor until he magically appears in the middle.
The script for entering room 2 from room 1 just has (in on "LeftClick")
                                 actor.GoToObject(this);
                                 Game.ChangeScene("scenes\hall\hall.scene");

The scene initialization script for room 2 has:
                                   actor.GoTo(650, 650);
                                   actor.Direction = DI_UP;
                                   actor.Active = true;

The other "LeftClick" and scene initialization scripts are similar.  I think the actor is getting stuck outside somewhere when he enters room 2 from room 1.  But how can I change the path he takes?  Are the scripts adding together somehow to give these strange paths? 

Thanks.  I appreciate any suggestions anyone can make.  I've searched scripts and the forum but I must be missing something.

                                         

12
Technical forum / 3D actor not loading
« on: February 25, 2012, 09:47:21 AM »
There is probably a simple solution but I'm stumped.  I'm just learning how to use 3D models with the engine.  I've looked through the documentation and played with the 3d demo.  I created a new scene using the demo as a model.  I made the geometry file in Cinema 4d and exported it as .3ds.  Everything looked ok but the actor didn't load.  Next, I tried adding the Front scene to the project.  The actor loads fine in that scene.  Then, I tried adding another scene using the files from the demo.  As far as I can tell, all the nodes are the same as the demo.  I used the 3d demo's geometry files in addition to all the other files.  But the actor doesn't load.  All three scenes are in the same project.  The game script is loading the actor (actor = Game.LoadActor3D("actors\trinity\trinity.act3d");) and I've tried different locations to use for placing the actor in the scene script.  I can add Molly without any problem.  Does anyone have any idea what I might be doing wrong?  Thanks.

Pages: [1]

Page created in 0.027 seconds with 19 queries.