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

#1
But I've got a default cursor, and disabled all the ones I don't need.
#2
I wholly fixed it by just giving 'Walk to' a cursor
#3
Thank you! It's somewhat working right now. I'm going to look through my old game and see what the mouse/cursor stuff looks like now that I know.
#4
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);
  }
}
#5
There seems to just be two files, a file called "agssave.999" and a zipped agssave map that says it's either corrupted or in an unknown format.
#6
Yes! The updated template works, thank you! Still, it's weird that the previous one didn't, but I suppose that's none of my worries anymore.
#7
I've added a seperate button that opens up the Save gui, in said gui I can write the name of a save but pressing 'enter' or clicking the 'save' button does nothing. The gui just disappears and when I re-open it I see what I typed in the writing box but not as a saved slot.

But thank you already, I'll check this new version out immediately!
#8
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);
}
#9
Oh my god thank you so much. I feel so stupid not thinking of any of your suggestions. I've finally got it now and I can't thank you enough.
#10
Aha, I'm using 3.6.0. I suppose I should get an update. I also completely missed the spacebar thing, very dumb of me.

Can you make credits go without it being a room specifically? I'm sorry for these possibly stupid questions but I really don't know.
Right now I don't have much vision for the credits, just the "made by x" stuff, maybe a title and an illustration after the credits stop rolling.
For most of the attempts I did indeed try to put it into the 'after fade-in' function, but it never worked.
#11
I want to thank all of you for the swift responses and apologise for taking so long to respond, I found myself without any time to get behind my pc properly.

I've tried all the code you all have sent me, tbh just mostly copied with slight adjustments to names and such, but nothing works. I tried eri0o's suggestion of using System.log and such, and indeed nothing happens (though I can't see anything in the log so I might also have screwed up there). I really don't know what I'm doing wrong.

Code: ags
StartCutscene(eSkipAnyKey); 
  while(gCredits.Y > (0 - gCredits.Height)){  
  gCredits.Y -=10; 
  Wait(1); 
  }
EndCutscene(); 
QuitGame(0);
This is Rootbound's code.

Code: ags
function room_FirstLoad()
{
  int yellow = Game.GetColorFromRGB(255, 255, 0);
  int white = Game.GetColorFromRGB(255, 255, 255);
  
  Credits.SetFont(eFontFont0, 15); // font, line height
  Credits.SetColor(white); // default text color
  Credits.SetShadow(17, 1, 1); // color, offsetX, offsetY
  Credits.SetWidth(200); // total width of credits text
  Credits.SetDelay(1, -5); // 1 pixel per frame, 5 pixels per frame when mouse is held down

  Credits.AddLine("Made with", eAlignCenter, 0, yellow);
  Credits.AddLine("Adventure Game Studio");
  Credits.AddSpace();
  Credits.AddLine("Special Thanks To", eAlignCenter, 0, yellow); // yellow text
  Credits.AddLine("Alice", eAlignLeft);
  Credits.AddLine("Bob", eAlignRight, -1); // offset -1: add text to previous line
  Credits.AddLine("Charles", eAlignLeft);
  Credits.AddLine("Dick", eAlignRight, -1);
  Credits.AddLine("Eddie");
  Credits.AddSpace(50); // add gap of 50 pixels
  Credits.AddLine("THE END");
}

bool credits_running;

function room_Load()
{

}

DynamicSprite* credits; // create pointer

void StartCredits() {
  credits_running = true; // set flag for room_RepExec
  gCredits.Visible = true; // show GUI
  credits = Credits.Tick(); // run first update to get sprite
  gCredits.BackgroundGraphic = credits.Graphic; // set GUI background
}

void CreditsEnded() {
  gCredits.Visible = false; // hide GUI
  credits.Delete(); // clean up
  credits_running = false; // reset flag
  QuitGame(0); // or go to main menu
}

void DoCredits() {
  Credits.Tick(); // advance credits display
  if (Credits.Done()) CreditsEnded(); // credits have finished
}

function room_RepExec()
{
  if (credits_running) DoCredits();
}

void on_key_press(eKeyCode k) {
  if (k == eKeySpace) StartCredits();
}
This is from Khris' module, I don't think I changed anything here but I couldn't get it to work.


Code: ags
void _do_one_call(String call_text) {
  credits_call_label.Width = 1920;
  credits_call_label.Height = 1080;
  credits_call_label.Y = 178;
  credits_call_label.X = 0;
  credits_call_label.Font = eFontFont0;
  
  System.Log(eLogInfo, "Oh joy I'm dying.", player.Room);
  gCredits.Transparency = 100;
  credits_call_label.Text = call_text;
  gCredits.Visible = true;
  gCredits.TweenTransparency(1.0, 0, eEaseInBackTween, eBlockTween);
  Wait(SecondsToLoops(4.0));
  gCredits.TweenTransparency(1.5, 100, eEaseLinearTween, eBlockTween);  
  gCredits.Visible = false;
  Wait(SecondsToLoops(1.0));
}

String _append_credits(String txt, String call_txt)
{
  txt = txt.Append(call_txt);
  txt = txt.Append("[[");
  return txt;
}

void credits_do_calls()
{
  _do_one_call("Created by Érico Porto");
  _do_one_call("Music by Jon Paul Sapsford");
  _do_one_call("Ghosts, graves and icon by Haloa");
  _do_one_call("Gameplay Testing[thanks to[Morgan Willcock,[Heltenjon[and Newwaveburritos");
}

void credits_do_rolling()
{
  String txt = "";
  txt = _append_credits(txt, "Don't Give Up the Cat");
  txt = _append_credits(txt, "");
  txt = _append_credits(txt, "Created by Erico Porto");
  txt = _append_credits(txt, "Music by Jon Paul Sapsford");
  txt = _append_credits(txt, "Ghosts, graves and icon by Haloa");
  txt = _append_credits(txt, "Gameplay Testing[thanks to[Morgan Willcock,[Heltenjon[and Newwaveburritos");
  txt = _append_credits(txt, "");
  txt = _append_credits(txt, "Made in Adventure Game Studio");
  txt = _append_credits(txt, "");
  txt = _append_credits(txt, "with Tween Module by Edmundito");
  txt = _append_credits(txt, "and with Timer and Typed Text modules by Crimson Wizard");
  txt = _append_credits(txt, "");
  txt = _append_credits(txt, "");
  txt = _append_credits(txt, "Using assets");
  txt = _append_credits(txt, "");
  txt = _append_credits(txt, "Forest trees, stones, flowers and base palette using STRINGSTAR FIELDS by Trixie");
  txt = _append_credits(txt, "Clouds using SunnyLand by ansimuz");
  txt = _append_credits(txt, "Home using 3D Model House by Lanthanum");
  txt = _append_credits(txt, "Save cat animation using kitka by kotnaszynce");
  txt = _append_credits(txt, "Smoke using Smoke & Fire Animated Particle by KnoblePersona");
  txt = _append_credits(txt, "Title Screen Cat using Camp Cat by Ben");
  txt = _append_credits(txt, "");
  txt = _append_credits(txt, "Forest crickets and atmosphere using Swamp Environment Audio by LokiF");
  txt = _append_credits(txt, "Cat Footsteps using Animal footsteps on dry leaves by melle_teich");
  txt = _append_credits(txt, "Cat Jump using Cat jump by FOX2814");
  txt = _append_credits(txt, "");
  txt = _append_credits(txt, "");
  txt = _append_credits(txt, "Thank you for playing it!");
  txt = _append_credits(txt, "");
  txt = _append_credits(txt, "");
  txt = _append_credits(txt, "Made for MAGS theme \"Ghost\"");
  txt = _append_credits(txt, "November 2022");
  txt = _append_credits(txt, "");
  
  credits_call_label.Font = eFontFont1;
  credits_call_label.Height = GetTextHeight(txt, eFontFont1, credits_call_label.Width) + 64;
  credits_call_label.Text = txt;
  credits_call_label.Y = Screen.Height + 32;
  
  gCredits.Visible = true;
  gCredits.Transparency = 0;
  credits_call_label.TweenY(40.0,  -credits_call_label.Height, eEaseLinearTween, eBlockTween);
  gCredits.Visible = false;
}
This is eri0o's code, I didn't change anything here except for the GUI name. Didn't even change the text/credits, I just wanted to see if I could make it work first.
#12
I completely forgot to check out that alt code, I'll do that too. I decided to hop on the engine and try again with the code from your Github but all I'm getting is a black screen for the room (the only differences are the fonts and sizes).
#13
Thank you! I'll try this as soon as I can tomorrow!
For the module, it was this one
https://www.adventuregamestudio.co.uk/forums/modules-plugins-tools/module-credits-v1-19/msg636573826/#msg636573826

I've seen someone else in the thread mention it working, but I couldn't get it.
#14
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