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

#281
Quote from: Cassiebsg on Sat 17/07/2021 19:54:16
Try using the name of your inventory window instead.

Okay, that was definitely the problem and this is working but I still can't make it lose the item with the property.  This will make the player lose items 1-9. I know I'm missing something obvious here but I sure can't see it.


Code: ags

for (int i = 0; i < invCustom.ItemCount; i++) {
  if (inventory[i].GetProperty("Cooking")==true){
    player.LoseInventory(inventory[i]);
  }
}


EDIT:

Okay, one obvious thing I was missing was that I had the property set to true for every inventory item.  When I switch it to the appropriate items: inventory[14] through inventory[18] it gets rid of inventory[14] and inventory[15] which baffles me even further.
#282
I think I understand the concept here since I ended up using some for loops earlier in the game but I can't make this one work.  I did capitalize "InvWindow" It tells me:

GlobalScript.asc(2035): Error (line 2035): must have an instance of the struct to access a non-static member
#283
Do you want to add, like, a chance to hit?  So that there's only an X% chance of hitting every frame 5 instead of it hitting every frame five? If that's the case you could just add something like:

Code: ags

int HitChance; //I'm not actually sure if you can declare variables in RepeatedlyExectue but you'll want to declare that somewhere.
HitChance = Random(3);  //this is a one in four chance

if (HitChance == 3)&&(oNpc.Frame == 5){
  gcarhealth.Width = gcarhealth.Width - 10;   
}
#284
I don't completely understand how I can get the item out of the inventory with a custom property without already having identified the item.  What I mean is that I want all of the items with that property out but I can't figure out how to call every inventory item like inventory[all of them] or something like this:

Code: ags

if (player.HasInventory(inventory["Cooking"]){
  player.LoseInventory(inventory["Cooking"]);
}
#285
I have a sort of crafting/cooking puzzle in the game where the player gets into the refrigerator to pull ingredients to cook different recipes.  I don't want the player leaving the room with these ingredients for the sake of easing inventory management.  I have it working well enough with a dummy character being the inventory.  I think maybe I should have tried using Khris' crafting module instead of the weird way I started doing it but I think there's a useful lesson here for me and maybe somebody else, as well.  I want to be able to strip the player's inventory of all of the cooking inventory items easily when they leave but I don't know what those are going to be and while I could just strip the player's inventory of every possible item this feels needlessly messy.  I read about structs and arrays but these aren't variables I'm tracking so those don't really seem like a natural fit to me, either.  Well, that and I don't know how to use those, either.

I think there may be a way to set the particular inventory item's custom property to something like "Cooking" and then call that to pull out all the items with that property being true but I don't really see how to do that, either.  Thanks again for all your help!

EDIT: I guess all the inventory items are already in an array; that's what that inventory[1] and so forth refers to.  If I group all of the "cooking" inventory items together on the inventory list then I can keep them organized but I may end up adding some items later so I'd still want a way to manage this.  The only way I can think of still seems a little off:

Code: ags
player.LoseInventory(inventory[14&&15&&16&&17&&18]);
#286
AGS Games in Production / Re: The Witch House
Wed 14/07/2021 23:10:57
I just joined Twitter last night for Kola Queen and almost immediately got a much greater than expected reception.  I did share probably the coolest piece of art that I have ready to go, though.  I think Laura Hunt's advice is very good.  Just engage with people with the vibe you want and they'll do the same for you.  Like anything else, it's probably better to do five minutes a day on Twitter (or whatever) than four hours all at once at the last minute.
#287
These animations are excellent, wow.  This looks great.  Good luck with the project.
#288
I also enjoyed reading it and have a great deal of respect for the work that went into it.  It's very admirable!  Thanks for posting.
#289
AGS Games in Production / Re: The Witch House
Sun 11/07/2021 16:18:10
That's amazing!  I just passed the 1,000 mark so imagining ten times that number is astonishing to me as I can't imagine what that feels like since a thousand was a lot of work!  Really looking forward to this.
#290
For Question #3 it sounds like you might want to look into the Tween module.
#291
Thanks so much.  I understand now.
#292
Thank you, this works.  I changed the values since it actually doesn't start at 00 but rather 02 and it was also making the value inverted so I changed the >= to a <= and it seems to be working fine.  Here's the whole function in case somebody wants to do a similar thing later.  If I were to do this to the other characters later it would just be a matter of creating the buttons and then adjusting that equation to make it the correct value?  If for your next friend it were the GUI buttons 22-32 you would just change the [i+1] and variable accordingly?  I am going to have at least 100 of these buttons, though.  It sounds like it would be easier to make a single button and redraw it with the for loop as you say but I haven't done this before and I'm not sure exactly what you mean.

Code: ags
function iNotebook_Look()
{
  Wait(10);
  for (int i = 1; i <= 10; i++) gFriendshipNotebook.Controls[i+1].Visible = i <= GinaFriendshipPoints;
  gFriendshipNotebook.Visible = true;
  FriendshipGUIScreenshotSprite = DynamicSprite.CreateFromScreenShot(320, 200);
    if (FriendshipGUIScreenshotSprite != null) {
      gFriendshipNotebook.BackgroundGraphic = FriendshipGUIScreenshotSprite.Graphic;
      //for (int i = 1; i <= 10; i++) gFriendshipNotebook.Controls[i-1].Visible = i >= GinaFriendshipPoints;
    }

}
#293
I have a journal in my game that updates as the player progresses and one of the things it does is keep track of the player's relationships which can be leveled up from 1-10.  The way I have it now is that each character has a page in the journal and when you level up you get a little heart graphic for which I use a button on the GUI.  So, when that game starts you have zero hearts up to a maximum of 10 hearts.  Well, I want to track this as I test the game so I made a little GUI that I can use to update the variable I use to track the player's relationship.  While in the game I don't think you'll be able to lose these points I want to be able to add or subtract them while I test just to make sure they work so just enabling them isn't enough since if I move backward the button will have already been enabled.  What I have here works but I can't imagine this is the easiest way to code this but I've been scratching my head and I really can't think of a better way.  I'm sure I am missing something and would appreciate any help.  Thanks so much!

In repeatedly_execute:

Code: ags
if (GinaFriendshipPoints == 1){
   btnGinaFP00.Visible = true;
   btnGinaFP01.Visible = false;
   btnGinaFP02.Visible = false;
   btnGinaFP03.Visible = false;
   btnGinaFP04.Visible = false;
   btnGinaFP05.Visible = false;
   btnGinaFP06.Visible = false;
   btnGinaFP07.Visible = false;
   btnGinaFP08.Visible = false;
   btnGinaFP09.Visible = false;
 }
  
 if (GinaFriendshipPoints ==2){
   btnGinaFP00.Visible = true;
   btnGinaFP01.Visible = true;
   btnGinaFP02.Visible = false;
   btnGinaFP03.Visible = false;
   btnGinaFP04.Visible = false;
   btnGinaFP05.Visible = false;
   btnGinaFP06.Visible = false;
   btnGinaFP07.Visible = false;
   btnGinaFP08.Visible = false;
   btnGinaFP09.Visible = false;
 }
   if (GinaFriendshipPoints ==3){
   btnGinaFP00.Visible = true;
   btnGinaFP01.Visible = true;
   btnGinaFP02.Visible = true;
   btnGinaFP03.Visible = false;
   btnGinaFP04.Visible = false;
   btnGinaFP05.Visible = false;
   btnGinaFP06.Visible = false;
   btnGinaFP07.Visible = false;
   btnGinaFP08.Visible = false;
   btnGinaFP09.Visible = false;
   }
   
   if (GinaFriendshipPoints ==4){
   btnGinaFP00.Visible = true;
   btnGinaFP01.Visible = true;
   btnGinaFP02.Visible = true;
   btnGinaFP03.Visible = true;
   btnGinaFP04.Visible = false;
   btnGinaFP05.Visible = false;
   btnGinaFP06.Visible = false;
   btnGinaFP07.Visible = false;
   btnGinaFP08.Visible = false;
   btnGinaFP09.Visible = false;
   }
  
  if (GinaFriendshipPoints ==5){
   btnGinaFP00.Visible = true;
   btnGinaFP01.Visible = true;
   btnGinaFP02.Visible = true;
   btnGinaFP03.Visible = true;
   btnGinaFP04.Visible = true;
   btnGinaFP05.Visible = false;
   btnGinaFP06.Visible = false;
   btnGinaFP07.Visible = false;
   btnGinaFP08.Visible = false;
   btnGinaFP09.Visible = false;
   }
   
   if (GinaFriendshipPoints ==6){
   btnGinaFP00.Visible = true;
   btnGinaFP01.Visible = true;
   btnGinaFP02.Visible = true;
   btnGinaFP03.Visible = true;
   btnGinaFP04.Visible = true;
   btnGinaFP05.Visible = true;
   btnGinaFP06.Visible = false;
   btnGinaFP07.Visible = false;
   btnGinaFP08.Visible = false;
   btnGinaFP09.Visible = false;
   }
   
   if (GinaFriendshipPoints ==7){
   btnGinaFP00.Visible = true;
   btnGinaFP01.Visible = true;
   btnGinaFP02.Visible = true;
   btnGinaFP03.Visible = true;
   btnGinaFP04.Visible = true;
   btnGinaFP05.Visible = true;
   btnGinaFP06.Visible = true;
   btnGinaFP07.Visible = false;
   btnGinaFP08.Visible = false;
   btnGinaFP09.Visible = false;
   }
   
   if (GinaFriendshipPoints ==8){
   btnGinaFP00.Visible = true;
   btnGinaFP01.Visible = true;
   btnGinaFP02.Visible = true;
   btnGinaFP03.Visible = true;
   btnGinaFP04.Visible = true;
   btnGinaFP05.Visible = true;
   btnGinaFP06.Visible = true;
   btnGinaFP07.Visible = true;
   btnGinaFP08.Visible = false;
   btnGinaFP09.Visible = false;
   }
   
   if (GinaFriendshipPoints ==9){
   btnGinaFP00.Visible = true;
   btnGinaFP01.Visible = true;
   btnGinaFP02.Visible = true;
   btnGinaFP03.Visible = true;
   btnGinaFP04.Visible = true;
   btnGinaFP05.Visible = true;
   btnGinaFP06.Visible = true;
   btnGinaFP07.Visible = true;
   btnGinaFP08.Visible = true;
   btnGinaFP09.Visible = false;
   }
   
   if (GinaFriendshipPoints ==10){
   btnGinaFP00.Visible = true;
   btnGinaFP01.Visible = true;
   btnGinaFP02.Visible = true;
   btnGinaFP03.Visible = true;
   btnGinaFP04.Visible = true;
   btnGinaFP05.Visible = true;
   btnGinaFP06.Visible = true;
   btnGinaFP07.Visible = true;
   btnGinaFP08.Visible = true;
   btnGinaFP09.Visible = true;
   }
#294
AGS Games in Production / Re: Kola Queen
Thu 24/06/2021 03:46:44
It's been a couple of months since I updated here so I thought I would give a little taste of what's coming to those of you who are interested parties.

I've decided it might be best to release to the game as a series so that people can actually play the game while I work on all of it which means that your progress will in fact track through the games.  Various decisions you make will factor into the happenings of the future games in the series as well as the friendships you have made and fostered as well.  There will be a day/night cycle to where you drive the plot and distribute that sweet, sweet soda pop during the day and have the night off to do whatever you please.  Driving your relationships will be a core feature.  Just like real life you won't be able to build relationships with everyone; you'll have to make some choices.

I'm also introducing what I hope is another first for point-and-click adventure games: an innovative hangover system.  Sure, you can hang out with your friends all night at the bar deepening your relationships but you will pay for it tomorrow!  Maybe it doesn't do much.  Maybe somebody will notice.  It'll be fun.  Just like a hangover.

Anyway, I'm sure I'm over-promising here but trying to tie all of these weird systems together has been what you might call fun.  No, scratch that, it's tedium.  Tedium is what I'm thinking of. 

At any rate, I hope you'll have fun when you play it this summer.

#295
Hey, thanks for the quick reply!  I do have some bools but those can be stored easily enough as ints.  I shouldn't need any strings though if that's what you mean.
#296
Initially, I wanted to release Kola Queen as one long game but the more I think about it the more I like the idea of releasing it as a series of shorter games so people can play them while I work on them and maybe even build a little excitement along the way.

I've gotten the file system working so it will track a variable between play sessions like a save game and it should also work between games provided I use the same save game directory for all of them.

What I want to happen is to have an import system much like the Quest for Glory games where you import a character.  Essentially, this will just import about ten different variables not fundamentally different than the stats used in QfG.  These variables are set by decisions you have made and friendships you have built along the way which I would like to track game to game.  So, I can make it work but I can't make it work where I record all of the variables into a single file which seems absolutely best.  The problem is I'm essentially just copying and pasting code from the manual into the game without really understanding how it works.  How do I save all of these variables into a single file so that these global variables can be set all at once and keep everybody's hard drives clean?

Here's the code, which fires when a button is pushed right now:

Code: ags
  File *output = File.Open("$SAVEGAMEDIR$/importvariables.tmp", eFileWrite);
if (output == null)
  Display("Error opening file.");
else {
  output.WriteInt(WhichQuestYouAreOn);
  output.Close();
}


This is what loads the variable:

Code: ags
File *input = File.Open("$SAVEGAMEDIR$/importvariables.tmp", eFileRead);
WhichQuestYouAreOn = input.ReadInt();

input.Close();
#297
I, too, already speak Spanish but I'm super impressed at the level of art design in the game and how much interactivity there seems to be. Great work!
#298
Completed Game Announcements / Re: La Maleta
Wed 26/05/2021 01:25:04
I really like these kinds of thoughtful games.  It's really touching and I think you did a great job capturing an atmosphere in an artful manner.  Great job on getting it out there.
#299
This looks really cool.  I quite like the art style.
#300
AGS Games in Production / Re: Kola Queen
Fri 09/04/2021 19:28:56
Just a little mockup to let everyone know that work is still progressing at a somewhat reasonable pace.  Just because I can't hang out with friends in a bar doesn't mean that you can't in the world of Kola Queen!  Everyday after you make your rounds convincing reputable sodie dealers to carry your new product you will have a chance to unwind at the bar with your friends and the people who populate the Quad Cities before going home and starting fresh the next day with more Cola Galore: America's hottest new carob flavored soda with twice the flavor at only half the calories.

SMF spam blocked by CleanTalk