Please login or register.

Login with username, password and session length
Advanced search  

News:

This forum provides RSS feed. To query recent posts use this url. More...


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

Pages: 1 [2] 3 4
16
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? 

17
Technical forum / Re: moving characters together
« on: April 13, 2015, 07:05:19 PM »
That worked like a charm!  Thanks for the fast response.  Moving on...

18
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.

19
Technical forum / Re: Image Viewer
« on: August 24, 2014, 03:53:36 PM »
One last question.  If you have the user go to an external application, is there any way to return to WME except by alt-tab or otherwise switching the window?  Quitting the external application still leaves you outside the still running WME application.  I was thinking of putting a note in to tell them how to return to the WME application before they click to view images. 

20
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.

21
Technical forum / Re: Read book in inventory
« on: November 14, 2013, 11:52:05 PM »
I have it working now.

I went back to the WME Book Online.  In the downloadable bookgame, you find an old book in a drawer (which is the WME book).  You click on it to put it in inventory where it is clickable. Clicking it brings up some text but leaves the book in inventory, which is the behavior I was looking for.
In "if(ActObj!=null) ... "
I deleted "if(ActObj.Type=="item" && Game.SelectedItem == null)
{Game.SelectedItem = ActObj;}"

and started with "if(Game.SelectedItem != null && Game.SelectedItem!=ActObj)..."
   
The code pretty much follows the online example given in chapter 6 by Metamorphium.

22
Technical forum / Re: Read book in inventory
« on: November 14, 2013, 09:24:18 PM »
That helped a lot.  It made me realize I was on the right track.

I have got the LeftClick set up in medRecord.script

I actually tried Game.SelectedItem != "medRecord" and ActObj != "medRecord" before trying it in the else if statement without success.

I went back and put some talk statements in various places to see where the flow was going. 

I don't think "if(ActObj.Type=="item" && Game.SelectedItem==null && Game.SelectedItem != "medRecord")" has the intended effect because if the Game.SelectedItem is null, then Game.SelectedItem can't be anything (including medRecord).

Anyway, the only time the "if" statement is skipped is when I have Game.SelectedItem == "medRecord" or ActObj == "medRecord".  Then the LeftClick in medRecords.script executes.

When the book is clicked in inventory, is it something other than the Game.SelectedItem or ActObj?  Or, do I have the medRecords item somehow set up incorrectly?

The item is identified on the screen as medRecords.  I checked the log and there aren't any errors so I don't think there is a typo.  It just isn't seeing the book as Game.SelectedItem or ActObj.

Any thoughts?

In item.items, I have:
ITEM
{
   CURSOR_COMBINED = TRUE
   CAPTION = "Medical Record"
   NAME = "medRecord"
   IMAGE = "items\book.bmp"
   CURSOR = "items\book.bmp"
   CURSOR_HOVER = "items\book_h.bmp"
   SCRIPT = "items\medRecord.script"
}

23
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.
 

24
Scripts, plugins, utilities, goodies / Re: Letter by letter writing
« on: September 22, 2013, 12:40:12 AM »
Very cool and useful!  Works like a charm!  Thanks.

25
Technical forum / Re: directional problems
« on: September 05, 2013, 04:20:56 AM »
Fireside:
Were you able to get "TurnTo" and "GoTo" working?  I have a dog on a table and want the actor to turn and go over to it.  Instead the actor turns its back and doesn't move.  I finally go the actor going to it by using GoTo(x,y) where x,y is a point on the floor near the table.  I am just using TurnTo(DI_LEFT) to have the actor look over toward the dog but the dog isn't always exactly to the left.

Did you find a better solution?

26
Technical forum / Re: restricting actor to part of the floor
« on: September 05, 2013, 03:58:51 AM »
Thanks!  I was using StickToRegion in another part of the program (I have a dog on a table) so I don't know why I didn't think to use it for the receptionist.

27
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?

28
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.

29
Technical forum / Re: Help with Tutorial
« on: July 18, 2013, 04:47:25 PM »
I'm a little late in reading this so you may have already figured out what went wrong.  You are correct - the rock should have disappeared.  There are a couple of things to do that might help.  First, make sure that the case is the same everywhere (you don't have "rock" in one place and "Rock" in another.)  What often helps me is to check the wme.log located in the same folder as the all important data folder.  Open it in any text editor including notepad and look for errors.  They will show up in the header as you are running the file but sometimes they can be missed but they will be recorded in wme.log.  If you delete the wme.log file, Wintermute will re-create it.

30
Scripts, plugins, utilities, goodies / Re: WME Project Manager
« on: July 12, 2013, 10:59:33 PM »
This looks like a really helpful tool.  Is it still in development?

Pages: 1 [2] 3 4

Page created in 0.048 seconds with 18 queries.