Menu

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.

Show posts Menu

Messages - Ghostlady

#261
The problem is with the "move" statements.  I commented them out and it works.  For some reason that is beyond me, though I think the 640 x 480 is coming into play, is that when I move the object so it is directly on the hotspot, all lined up perfect, for some reason the game isn't recognizing the placement on the hotspot.  It is displaced.  Even when I draw the hotspots, if I was only dealing with the bottom left hand corner, I have to draw it under the grid for it to be picked up.
#262
Hotspot *ho = Hotspot.GetAtScreenXY(object.X, object.Y);  is not correct, must have picked up the wrong room script because I have two rooms with the same script so I can play without destroying the original. Do you think it can be happening when an object is clicked on top of another one?  Or that the hotspots are too close together or the objects are too close together?  Can you test it again and put one object on another multiple times?  I've attached a screenshot to show how close together the objects will be.

I noticed something else, if I slide the objects in from the left to the right, it now works.  I am thnking the 640 x 480 is messing with the hotspots.  Any suggestions?

#263
I have experienced a similar problem when my quicktime player is running in the background (comes one with the pc startup).  After I close/exit quicktime, the problem goes away.
#264
I am creating a drop and drag puzzle that is made up of very skinny strips of a picture that will fit into a grid with lines going up and down.  Think of a fan, but all sections upright.  When the object is over the a hotspot (be it right or wrong) I move the object to fit in the grid correctly.  Couple things going on that I don't understand.  I can play the puzzle while running with debug.  Sometimes it works and sometimes it doesn't.  When it doesn't, it seems to stop and none of the objects are clickable anymore.  If I run with the debugger off, I can only move one strip of picture and then the same thing happens.  None of the objects are clickable anymore.  The game is 640 x 480.  Can anyone see what I am doing wrong?

Here is my script:

// room script file
  int button_pressed;
  Object*ob;
 
function Checksolved() {
  int i = 1;
  int correct;
  while (i < Room.ObjectCount) {
    Hotspot *ho = Hotspot.GetAtScreenXY(object.X, object.Y);
    if (ho.ID == i) correct ++;
    else correct = 0;
    i ++; }

  if (correct == 15) {
    Display("Puzzle has just been solved!");
    Wait(40);
   
    object[1].Tint(0, 0, 100, 80, 0);
    Wait(10);
    object[1].RemoveTint();
   
    object[2].Tint(0, 0, 100, 80, 0);
    Wait(10);
    object[2].RemoveTint();
   
    object[3].Tint(0, 0, 100, 80, 0);
    Wait(10);
    object[3].RemoveTint();
   
    object[4].Tint(0, 0, 100, 80, 0);
    Wait(10);
    object[4].RemoveTint();
   
    object[5].Tint(0, 0, 100, 80, 0);
    Wait(10);
    object[5].RemoveTint();
   
    object[6].Tint(0, 0, 100, 80, 0);
    Wait(10);
    object[6].RemoveTint();
   
    object[7].Tint(0, 0, 100, 80, 0);
    Wait(10);
    object[7].RemoveTint();
   
    object[8].Tint(0, 0, 100, 80, 0);
    Wait(10);
    object[8].RemoveTint();
   
    object[9].Tint(0, 0, 100, 80, 0);
    Wait(10);
    object[9].RemoveTint();
   
    object[10].Tint(0, 0, 100, 80, 0);
    Wait(10);
    object[10].RemoveTint();
   
    object[11].Tint(0, 0, 100, 80, 0);
    Wait(10);
    object[11].RemoveTint();
   
    object[12].Tint(0, 0, 100, 80, 0);
    Wait(10);
    object[12].RemoveTint();
   
    object[13].Tint(0, 0, 100, 80, 0);
    Wait(10);
    object[13].RemoveTint();
   
    object[14].Tint(0, 0, 100, 80, 0);
    Wait(10);
    object[14].RemoveTint();
   
    object[15].Tint(0, 0, 100, 80, 0);
    Wait(10);
    object[15].RemoveTint();
   
    player.ChangeRoom(142);  }
}

function room_RepExec()

  if (GUI.GetAtScreenXY(mouse.x, mouse.y)!=null) {
      if(Mouse.Mode!=eModeUseinv) {
         mouse.UseModeGraphic(eModePointer);}}
  if (Mouse.Mode == eModeUseinv) {     
       Mouse.UseDefaultGraphic(); }
       
  if (mouse.IsButtonDown(eMouseLeft)) {
    if (button_pressed==0) {
      button_pressed = 1;
      ob = Object.GetAtScreenXY(mouse.x, mouse.y);
    }
  } else {
    button_pressed=0;
    if (ob!=null) {
      Hotspot *ho = Hotspot.GetAtScreenXY(ob.X, ob.Y);
      if (ho == hstick1) {
          object[ob.ID].Move(79, 215, 4, eBlock,  eAnywhere);
          Checksolved(); }

      if (ho == hstick2) {
          object[ob.ID].Move(90, 215, 4, eBlock,  eAnywhere);
          Checksolved(); }

      if (ho == hstick3) {
          object[ob.ID].Move(101, 215, 4, eBlock,  eAnywhere);
          Checksolved(); }
         
      if (ho == hstick4) {
          object[ob.ID].Move(111, 215, 4, eBlock,  eAnywhere);
          Checksolved(); }

      if (ho == hstick5) {
          object[ob.ID].Move(122, 215, 4, eBlock,  eAnywhere);
          Checksolved(); }

      if (ho == hstick6) {
          object[ob.ID].Move(133, 215, 4, eBlock,  eAnywhere);
          Checksolved(); }
         
      if (ho == hstick7) {
          object[ob.ID].Move(144, 215, 4, eBlock,  eAnywhere);
          Checksolved(); }

      if (ho == hstick8) {
          object[ob.ID].Move(155, 215, 4, eBlock,  eAnywhere);
          Checksolved(); }

      if (ho == hstick9) {
          object[ob.ID].Move(167, 215, 4, eBlock,  eAnywhere);
          Checksolved(); }
         
      if (ho == hstick10) {
          object[ob.ID].Move(178, 215, 4, eBlock,  eAnywhere);
          Checksolved(); }

      if (ho == hstick11) {
          object[ob.ID].Move(189, 215, 4, eBlock,  eAnywhere);
          Checksolved(); }

      if (ho == hstick12) {
          object[ob.ID].Move(199, 215, 4, eBlock,  eAnywhere);
          Checksolved(); }
         
      if (ho == hstick13) {
          object[ob.ID].Move(211, 215, 4, eBlock,  eAnywhere);
          Checksolved(); }

      if (ho == hstick14) {
          object[ob.ID].Move(222, 215, 4, eBlock,  eAnywhere);
          Checksolved(); }

      if (ho == hstick15) {
          object[ob.ID].Move(232, 215, 4, eBlock,  eAnywhere);
          Checksolved(); }
         
      if (ho != null && ho.ID == ob.ID) {
          player.Say("That's right."); }
         
//      Display("correct %d (correct=%d)", correct);   
      ob.Baseline = 0;
      ob=null;
    }
  }
   

  if (ob != null) {
    int width  = Game.SpriteWidth[ob.Graphic];
    int height = Game.SpriteHeight[ob.Graphic];
    ob.Baseline = game.room_height;
    ob.SetPosition(mouse.x-width/2, mouse.y+height/2);
  }
}
 
#265
I figured out what is causing this problem.  I upgraded to the latest AGS version, SP1, and one of the enhancements is this: * Added inventory item CursorImage property to allow you to set a different image for the mouse cursor to the inventory window *

So when I was coding this: if (Hotspot.GetAtScreenXY(mouse.x, mouse.y) == hBedroomD) {
      iKey.Graphic = 10;

It must have been getting confused since the CursorImage defaulted to the inventory image, which was something like 200.  Once I changed the image number to 10 in the CursorImage box, it started working correctly again. Yea!
#266
The first image shows the hotspot on the last door, the bathroom, see the arrow.

The second image show the inventory key on the "now" bathroom hotspot, the middle door.

I am using the "overhotspot" gui so don't let the wording throw you.

Sample1

Sample2
#268
I seemed to have broke something in my game and am not sure what I did.  I have a hallway with 6 doors, three on each side.  Each of the doors is a hotspot.  If the cursor interacts with any of the 6 doors, everything seems to be working correctly.  If I use an inventory key on the each of the doors, the hotspot seems to have shifted forward.  So now door #6's hotspot is at door #5.

This is part of my repeatedly execute, (it changes the way the key is pointing)

if (player.ActiveInventory == iKey) {   
  if (Hotspot.GetAtScreenXY(mouse.x, mouse.y) == hBedroomD) {
      iKey.Graphic = 10; } 
  if (Hotspot.GetAtScreenXY(mouse.x, mouse.y) == hBedroomP) {
      iKey.Graphic = 10; } 
  if (Hotspot.GetAtScreenXY(mouse.x, mouse.y) == hBathroom) {
      iKey.Graphic = 10; } 
  if (Hotspot.GetAtScreenXY(mouse.x, mouse.y) == hDoor) {
      iKey.Graphic = 9; } 
  if (Hotspot.GetAtScreenXY(mouse.x, mouse.y) == hHistoryRoom) {
      iKey.Graphic = 9; } 
  if (Hotspot.GetAtScreenXY(mouse.x, mouse.y) == hBedroom) {
      iKey.Graphic = 9; }}
     
if (GUI.GetAtScreenXY(mouse.x, mouse.y)!=null) {
    if(Mouse.Mode!=eModeUseinv) {
       mouse.UseModeGraphic(eModePointer);}}

And

I am using this for using the inventory on the hotspot:

function hDoor_UseInv()
{
  if (player.ActiveInventory == iKey) {
      gGui3.Visible = true;
      SaySpecial2(player, "I guess this isn't my room then.");
      gGui3.Visible = false; }
#269
Thanks for that, I'll try it.
#270
I have an inventory item that is placed in a room and it looks fine.  When it goes into the inventory, the item now has white edges.  If I select the item from inventory and hold it on the cursor, the white edges disappear.  I am a little confused over why this is happening and how it can be fixed.  See sample.  The top fishbowl is in the inventory gui.  The bottom fishbowl is on the cursor.

#271
So if I go the way of the gui, I should set a global variable and when the player clicks on th correct object, I would swap the images in the gui using code in the global script?
#272
I am thinking of doing a scavenger hunt in my game.  I will have a list of 10 items that the player will need to find.  I can easily do it with a room but I would like the player to call up the list whenever they wanted to.  I was wondering if this could be done with a Gui.  When the player first starts off, his list will contain all 10 items and then when he finds an item, the gui would pop up and that item would be scratched off.  Any ideas on how to do this?
#273
If anyone is interested in a free download of Intrigue At Oakhaven Plantation, you can get it here:

Oakhaven

It will be here for the taking for a week.

Some Notes about the game:

Inventory Items:
During the course of the game certain objects will need to be collected.  When obtained, they will automatically be placed in the character’s inventory.  To access each character’s inventory, roll the mouse over the top of the screen and click on the trunk.  All inventory items for the active character that you are playing as, will be displayed.  The red arrows on the right will scroll the items up or down.  Some inventory items will need to be combined with others by first clicking on one object and then clicking it on the second object in inventory.  If you hear a bell ring, this means the objects were combined.  To select the inventory item, click on OK.  To put back an inventory item, click on the white arrow.  If the interface is closed and you want to remove an inventory item off of the cursor, right click and the object will return to the trunk.

Swapping Characters:
From time to time you will need to change the character to move forward in the game.  To do this, roll your mouse over the top of the screen to pull open the interface.  Click on the other character to swap the active player.

Puzzles:
You can quit any puzzle and come back to it at a later time by right-clicking.

Scores:
As puzzles are completed for each character, a tally is updated and can be viewed from the interface.  Roll your mouse over the top of the screen to pull open the interface and click on the “Scores” icon.

Doorknob:
The doorknob on the bottom left of each screen will allow you to exit from each room.

Hints and Puzzle Solves:  http://mysterymanor.net/Oakhaven/oakhavenhints.htm
#274
I am using this in the rep_ex:

  if (GetLocationType(mouse.x,mouse.y) > 0) {
     if(Mouse.Mode!=eModeUseinv) mouse.UseModeGraphic(eModePointer);}
  else {
     Mouse.UseDefaultGraphic(); }
#275
It is set to that in the gui properties.  That's why I was somewhat surprised that the hotspots were showing up in the gui.
#276
I mean beneath.  I'll try your suggestion.
#277
My gui that pops up for the save/load/quit etc. catches hotspots behind it and changes the cursor.  Is there anyway around this?
#278
You are right.  I divided the co-ordinates in half and it worked correctly.  My game is 640 x 480 though.  ???
#279
I am trying to move an object to specific coordinates and instead of stopping where it is supposed to, it seems as if it is falling off the bottom edge.  What am I doing wrong?  It is first person so I am not using any walkable areas.

object[0].Move(214, 364, 10, eBlock,  eAnywhere);
#280
Thanks for the info, I'll check into it all.

The interior was done by Rebecca Cox and exterior by Andy Simmons

SMF spam blocked by CleanTalk