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

Topics - Azora

#1
Hello everyone, I'm quite new to AGS and programming. I've read the manual and watched tutorials, but I still cannot figure out why the cursor becomes invisible after this function. It still works, though; it can trigger the inventory GUI, and when it hovers over anything with a description, the words appear. I've changed the eBlock in case it was that, even deleted the Wait(40) in case it was somehow blocking something.
I'll be very grateful if someone can explain what's wrong. I'm sure it's something simple, but I cannot figure it out. The game is using BASS cursor mode, left click for action and right click to look.

First of all, there's a bool in the room:
bool CameronGone = false;
//player can do other things when Mrs. Cameron leaves the room

Then this function when using the Inventory Item iRat on a Hotspot hHole:

function hHole_UseInv(Hotspot *theHotspot, CursorMode mode)
{
  if (player.ActiveInventory == iRat) {
    if (CameronGone) //in case Cameron is already gone and you interact with hHole again
      {
      cRon.Walk(120, 140, eBlock, eWalkableAreas);
      cRon.FaceDirection(eDirectionUp);
      oRat.Visible = true;
      cRon.LoseInventory(iRat);
      }
    else  //first time you use the rat on the hole, it makes Mrs. Cameron leave the room
      {
    cRon.Walk(120, 140, eBlock,  eWalkableAreas); //deleted eBlock in case it was this but wont work
    cRon.FaceDirection(eDirectionUp);
    oRat.Visible = true;
    cRon.Walk(155, 151, eBlock, eWalkableAreas);
    cRon.FaceDirection(eDirectionRight);
    cRon.Say("Mrs. Cameron, I think there's a rat over there.");
    cCameron.Say("¡Oh my God!");
    cCameron.Say("¡Kill it! ¡Kill it!");
    oOpenDoor.Visible = true;
    cCameron.ChangeRoom(0);
    oOpenDoor.Visible = false;
    Wait(40); //deleted this in case it was the problem, but wont work
    CameronGone = true;
    cRon.LoseInventory(iRat);
    Mouse.Visible = true; //added to fix this but wont work
    }
  }
}

I think maybe CameronGone should be a Global Variable, but I don't see what it has to do with making the cursor invisible.
Any clues?
Thank you!
SMF spam blocked by CleanTalk