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

#1
Completed Game Announcements / Re: Gobyworld
Wed 19/04/2023 18:34:59
Yes, the walkable areas in the first room are a bit strange to accommodate for the animation of Goby smoking the cigarettes.

Thanks for pointing out the other things. I'm glad you enjoyed how bizarre it was :0)
#2
Completed Game Announcements / Gobyworld
Fri 14/04/2023 15:57:51
Gobyworld is now out on Steam for free!
You can also play on Itch or at www.Gobyworld.com


An absurd point-and-click adventure, where you help Goby, a piece of swallowed gum, in his quest to find freedom beyond the digestive system. Transforming the folky myth that swallowed gum remains in the stomach for seven years-- Gobyworld lets you experience the misadventures of an anthropomorphized gum named Goby.

  • Use mouse, WASD and keyboard to play.
  • Play time is around 30 minutes.
  • Explore seven levels and fifteen rooms including the stomach, small intestine, large intestine, rectum/anus, esophagus and mouth.
  • Meet tummy characters and collect tummy items.
  • GUMMY

Thank you to the AGS forum community who helped with numerous questions. I hope you all enjoy!
#3
Omg it worked! Thank you
#4
I tried, but I don't have XCode installed. I'm trying to find a version of XCode 12.4 but I don't have an apple developer login.
#5
I'm on Catalina 10.15.4  with  Intel Core i5, so I have to search for an XCode copy. Am I able to send you my Windows exe and have you convert it?
#6
That would be great @Snarky. I believe I Have homebrew and cmake but not XCode. I could also send you my Windows build, and have you convert if it's easy and you're willing. :-D If not, I will happily work on it. Thank you.


Quote from: Snarky on Tue 28/03/2023 11:17:58In principle yes, @tilapisha, but the problem with 3.6 is that there isn't a pre-compiled shell application available (because 3.6 isn't yet officially released). Edit: Or rather, the problem is that the 3.6 bundle available is older than many games built with 3.6, so they will not work with it. I ended up building it myself from source according to the instructions here. This solution does require you to install XCode, homebrew, and cmake if you don't already have them, which takes several hours and a couple of gigabytes of storage. (And since my Mac is really old and still on MacOS 13.10/High Sierra, I had to delve deep to find an older version of XCode that is compatible.)

I can share my shell app (when I get home, since it's on my private computer); it works fine on my own machine, but I'm not sure how well it would work on other Macs; there might be additional steps required.
#7
Does this work for 3.6?
#8
Yes, the background matched the color depth of the game and other background.

Code: ags

// room script file

function room_LeaveRight()
{
  if(newMouth == false){
cGoby.ChangeRoom(17, 145, 145);
  }
}

function room_LeaveBottom()
{
  if (newMouth == true){
cGoby.ChangeRoom(11, 175, 175);
  }
}

function room_FirstLoad()
{
cMallory.FollowCharacter(cGoby, 0, 0);
}

function room_Load()
{
 if (newMouth == false){
   SetBackgroundFrame(0);
 } else {
   SetBackgroundFrame(1);
  }
}

#9
Hi, does anyone know why my Background 1 (not the main background) is glitching? I have two backgrounds, the first one, and after the character walks through one time, it's supposed to show Background 1. Instead, it glitches and shows this. It worked for one of the rooms, but not for two others. The code is the same. I tried renaming and reuploading the background but it's still glitching. Also, it doesn't glitch when first loaded in, only after I've Run the game.


[link]https://imgur.com/a/VB6C5Fv[/link]
#10
Advanced Technical Forum / Re: Wordle in AGS?
Thu 23/03/2023 10:37:18
Yes, this worked! Thank you. Just had to change the variable j to k, and also make currentGuesses = 0.
#11
Advanced Technical Forum / Wordle in AGS?
Wed 22/03/2023 15:27:35
Hi, I am trying to create Wordle in my game. I've finished most of it thanks to this [link] https://www.adventuregamestudio.co.uk/forums/beginners-technical-questions/wordle-in-ags/msg636645648/#msg636645648 [/link] However, if you do not guess the word by the last row, I'd like the game to reset.

Code: ags
// main global script file
#define WORD_LENGTH 5
#define MAX_GUESSES 6
 
// This represents a row in the Wordle grid (one guess)
struct WordleGuess
{
   Button* LetterField[WORD_LENGTH];
   import String ToString();  
};
 
String WordleGuess::ToString()
{
  return String.Format("%s%s%s%s%s", this.LetterField[0].Text, this.LetterField[1].Text, this.LetterField[2].Text, this.LetterField[3].Text, this.LetterField[4].Text); 
}

enum WordleFieldState
{
  eWordleFieldBlank = 0,      // Nothing entered
  eWordleFieldEntry,          // Filled field in current row during editing
  eWordleFieldInvalid,        // Feedback that the word is invalid
  eWordleFieldGray,           // A gray field in a submitted row (letter not in word)
  eWordleFieldYellow,         // A yellow field in a submitted row (letter in word in other position)
  eWordleFieldGreen           // A green field in a submitted row (letter in word in same position)
};

// This is our wordle grid: a set of Wordle rows
WordleGuess WordleGrid[MAX_GUESSES];
 
int currentGuess;
int currentInputLetter;

// This function just links up the buttons of the GUI with our Wordle grid
void SetupWordle()
{
  int control;
  for(int i=0; i<MAX_GUESSES; i++)
  {
    for(int j=0; j<WORD_LENGTH; j++)
    {
      WordleGrid[i].LetterField[j] = gWordle.Controls[control].AsButton;
      control++;
    }
  }
}

       bool checkValid(String guess)
      {
        // TODO: Just a placeholder. Need to add check against dictionary of valid guesses
        return true;
       }
       
  WordleFieldState[] checkGuess(String guessWord, String solutionWord)
{
  if(guessWord.Length != WORD_LENGTH || solutionWord.Length != WORD_LENGTH)
    AbortGame("Invalid Wordle data");
 
  WordleFieldState format[];
  format = new WordleFieldState[WORD_LENGTH];
 
  // Make sure we ignore case:
  guessWord = guessWord.LowerCase();
  solutionWord = solutionWord.LowerCase();
 
  // Color the green fields (and the other fields gray):
  for(int i=0; i<WORD_LENGTH; i++)
  {
    if(guessWord.Chars[i] == solutionWord.Chars[i])
    {
      format[i] = eWordleFieldGreen;
      solutionWord = solutionWord.ReplaceCharAt(i, ' ');  // Remove the letter from the solution so we don't match on it again
    }
    else
      format[i] = eWordleFieldGray;
  }
 
  // Color the yellow fields:
  for(int i=0; i<WORD_LENGTH; i++)
  {
    if(format[i] != eWordleFieldGreen) // Don't process letters that are already matches
    {
      int hitIndex = solutionWord.IndexOf(String.Format("%c",guessWord.Chars[i]));
      if(hitIndex != -1) // if letter in word
      {
        format[i] = eWordleFieldYellow;
        solutionWord = solutionWord.ReplaceCharAt(hitIndex, ' ');
      }
    }
  }
 
  return format;
}

if(gWordle.Visible)
  {
    int j=0;
    
    if(keycode >= eKeyA && keycode <= eKeyZ) // Typed a letter
    {
      if(currentInputLetter<WORD_LENGTH)
      {
        WordleGrid[currentGuess].LetterField[currentInputLetter].Text = String.Format("%c", keycode);
        //WordleGrid[currentGuess].LetterField[currentInputLetter].BackgroundColor = Game.GetColorFromRGB(0, 0, 0);
        currentInputLetter++;
      }
    }
    else if(keycode == eKeyBackspace) // Remove the last letter
    {
      if(currentInputLetter>0)
      {
        currentInputLetter--;
        WordleGrid[currentGuess].LetterField[currentInputLetter].Text = "";        
      }
    }
   else if(keycode == eKeyReturn)
    {
      if(currentInputLetter == WORD_LENGTH) 
      {
        String solution = "GUMMY";
        String guess = WordleGrid[currentGuess].ToString();
        if(checkValid(guess))
        {
          // Update state
          WordleFieldState formatRow[] = checkGuess(guess, solution);
          for(int i=0; i<WORD_LENGTH; i++)
          {
            switch(formatRow[i])
            {
              case eWordleFieldGreen:
                WordleGrid[currentGuess].LetterField[i].TextColor = Game.GetColorFromRGB(0, 128, 0);
                break;
              case eWordleFieldYellow:
                WordleGrid[currentGuess].LetterField[i].TextColor = Game.GetColorFromRGB(128, 128, 0);
                break;
              case eWordleFieldGray:
              default:
                WordleGrid[currentGuess].LetterField[i].TextColor = Game.GetColorFromRGB(200, 200, 200);
                break;
            }
          }
        
        if(guess.UpperCase() == solution.UpperCase())
        {
          SetTimer(1, 30);
          cGoby.LoseInventory(iSnowglobe0);
          cGoby.LoseInventory(iSnowglobe1);
          cGoby.LoseInventory(iSnowglobe2);
          cGoby.LoseInventory(iSnowglobe3);
          cGoby.LoseInventory(iSnowglobe4);
          cGoby.LoseInventory(iSnowglobe5);
          cGoby.AddInventory(iSnowglobes);
          cGoby.AddInventory(iSwimGear);
          aAlert.Play(eAudioPriorityLow);
          
        }
        
          currentGuess++;
          currentInputLetter=0;
          
      
          if(currentGuess >= MAX_GUESSES)
          {
      // THIS IS WHERE I NEED IT TO RESET, I can reset currentGuess to 0 here, but also need to reformat

          }
        }
      }
    }
  }
}

#12
Yes, thank you!!! Now to changing the mouse graphic back to the inventory item.

I;m going to try and override the pointer in repeatedly execute with one of the mouth functions.
#13
Ahhh, yes I always forget to set it in the Events properties panel as well. Thank you!
#14
I know this is easy, and I've done it before, but I can't seem to find information on the manuals or forum.

I am trying to animate a character in room_AfterFadeIn(). This should work, but it doesn't.

Code: ags
function room_AfterFadeIn(){
    cObies.Animate(0, 5, eRepeat, eNoBlock);
}


#15
I tried adding in the code accordant to the opened ticket. But, I need to turn override built-in inventory window click handling to True, and then write my own code for all of the other on_click events?


Code: ags
function on_event(EventType event, int data)
{
  if (event == eEventEnterRoomBeforeFadein)
  {
    CursorMode mode = mouse.Mode;
    if (mode == eModeWalkto) mouse.SelectNextMode();
    mouse.DisableMode(eModeWalkto);
    mouse.Mode = mode;
  }
  
  if (event == eEventGUIMouseDown &&
    data == gIconbar.ID &&
    GUIControl.GetAtScreenXY(mouse.x, mouse.y) == InventoryWindow1 &&
    InventoryItem.GetAtScreenXY(mouse.x, mouse.y) == null &&
    mouse.IsButtonDown(eMouseLeft)) {
      cGoby.ActiveInventory = null;
      }

}
#16
I am trying to allow the player to drop the current active inventory item by clicking on an empty space within the Inventory bar and to swap the current active inventory item by clicking on an inventory item in the Inventory bar.

I've worked out the code to do this, but I believe it isn't being called in the correct location.I originally placed it in the gIconbar_onClick function but it didn't work. I think this should only work in the inventoryWindow, which is in the GUI template, but doesn't have an events properties panel.

Code: ags
     //on click, if the mouse is not over an inventory item
    if(InventoryItem.GetAtScreenXY(mouse.x, mouse.y) == null){
      //drop the current inventory item
      player.ActiveInventory = null;
      }
    else
      //change the active inventory to item in which the mouse is over
      player.ActiveInventory = InventoryItem.GetAtScreenXY(mouse.x, mouse.y);
      mouse.Mode = eModeUseinv;
      }
  }
#17
I took out your code and replaced it back with mine to try and problem solve. I think the issue is it's not receiving the click. Currently, when I click on the hand button, it does what I want it to do when it clicks on an empty space. So, I'm trying to figure out where that is, but I can't seem to locate it.


Code: ags
function btnInvSelect_Click(GUIControl *control, MouseButton button)
{
  // switch to the interact cursor
  mouse.Mode = eModeInteract;
  // ...but override the appearance to look like the arrow
  mouse.UseModeGraphic(eModePointer);
  
  if (player.ActiveInventory != null){
      mouse.Mode = eModeUseinv;
    if(InventoryItem.GetAtScreenXY(mouse.x, mouse.y) == null){
      player.ActiveInventory = null;
      }
    else {
      player.ActiveInventory = InventoryItem.GetAtScreenXY(mouse.x, mouse.y);
      mouse.Mode = eModeUseinv;
      }
  }
}


function btnIconCurInv_Click(GUIControl *control, MouseButton button)
{
  if (player.ActiveInventory != null){
      mouse.Mode = eModeUseinv;
    
    //if(InventoryItem.GetAtScreenXY(mouse.x, mouse.y) == null){
      //player.ActiveInventory = null;
      //}
    //else {
      //player.ActiveInventory = InventoryItem.GetAtScreenXY(mouse.x, mouse.y);
      //mouse.Mode = eModeUseinv;
      //}
  //}
 
}
#19
Characters > cPerson > ⚡Events > Use inventory on character / cPerson_UseInv

Code: ags
if (cEgo.ActiveInventory == iMartini){
    player.LoseInventory(iMartini);
    cPerson.Say("Thanks for this dirty martini!");

}

#20
I have a Wordle game in my game. When the player guesses the Wordle correctly, the letters turn green and the GUI panel closes. This happens basically simultaneously, so the user cannot see the letters turn green.

Is there a way to implement a pause or wait?

I tried using Pause and UnPause, Wait, creating an invisible animation, SetTimer/isTimerExpired and even writing my own for loop counter, but all of these did not work. The buttons or the whole screen has a filter of gray on them for the pause or wait functions. The for loop and timers just didn't do anything.

I think the timer will work, but it is only checking once if the timer is expired instead of repeatedly.

SOLUTION: I set the timer in the function, and then in repeatedlyexecute, I was checking if it was completed. 
SMF spam blocked by CleanTalk