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

#1
Hi there, I've got something strange going on. Every time I start a script where a character needs to use an inventory item, and then lose it after the one use, the cursor vanishes. It still works, but you cannot see it. I already tried some lines about changing the cursor but nothing really works.
What's strangest is that I didn't have this problem with my previous game. I made that one in 3.6.0., this one in 3.6.1. Could this be the problem?


I'll add the code that I used too, just in case
Code: ags
function hDrawer_UseInv(Hotspot *theHotspot, CursorMode mode)
{
  if (player.ActiveInventory == iDrawerkey)
  {
    player.Say("Hi");
    SetBackgroundFrame(1);
    player.LoseInventory(iDrawerkey);
  }
}
#2
Hello, I've been trying to make the save function work for my current project set in the BASS template. I honestly don't know why it doesn't work, I'm just using the code the game came packaged with. I quickly made 2 other projects, on in SIERRA and an empty one in BASS to see if there were any differences. In SIERRA the save function works perfectly fine, but the empty BASS one doesn't work either.
Does anyone know what's going on or what I can do?


Here's the code if anyone wants to see, but it's just the one that comes out of the box.
Code: ags
int find_save_slot(String name)
{
  bool slots[] = new bool[999];
  int i = 0;

  while (i < lstSaveGamesList.ItemCount)
  {
    if (lstSaveGamesList.Items[i] == name)
    {
      // found existing save with matching name
      return lstSaveGamesList.SaveGameSlots[i];
    }

    // remember which slots are already taken
    slots[lstSaveGamesList.SaveGameSlots[i]] = true;
    i ++;
  }

  // find first free save slot, starting with slot 1
  i = 1;

  while (i < 999)
  {
    if (!slots[i])
    {
      return i;
    }

    i ++;
  }

  // no free slots found
  return -1;
}

function btnSaveGame_OnClick(GUIControl *control, MouseButton button)
{
  int gameSlotToSaveInto = find_save_slot(txtNewSaveName.Text);

  if (gameSlotToSaveInto < 0)
  {
    Display("No more free save slots!");
  }
  else
  {
    SaveGameSlot(gameSlotToSaveInto, txtNewSaveName.Text);
    close_owning_gui(control);
  }
}
function lstSaveGamesList_OnSelectionCh(GUIControl *control)
{
  txtNewSaveName.Text = lstSaveGamesList.Items[lstSaveGamesList.SelectedIndex];
}

function txtNewSaveName_OnActivate(GUIControl *control)
{
  // pressing Return in the text box simulates clicking the save button
  btnSaveGame_OnClick(control, eMouseLeft);
}
#3
Hi, I'm very new to AGS and scripting and I've been slowly working on a little game to learn the ins and outs. I'm almost finished and have hit a bit of a wall: Credits. I want to try and add classic scrolling credits to the game (moreso to learn how to do it), but I don't know where to begin. I've been scouring the forums for a few hours and haven't found anything that could help. The only things showing up are outdated modules that I can't get to work and tweening, which I've tried to use to no avail.
Can anyone help? I'm kinda lost.

Thank you so much in advance.
SMF spam blocked by CleanTalk