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

#21
Sorry if this is a double post, forum seems to be eating posts rn.

1. Having a softlock if a room's rep exec starts playing a scene while I have my inv open. The scene plays up til this command: oPokeonstand.Animate(0, 1, eOnce, eBlock);

But why is rep execute doing anything with inv open though? I thought it paused the game?

2. It seems region scripts are postponed if the character moves onto/off the region as part of another script. So if I move her with KB or mouse it works fine, but if she walks off the region to talk to someone or move to a hotspot view point, the region script doesn't play til after the other script is called.

3. I seem to have mucked up the default text border gui and it only wants to be like 100 pixels. There doesn't seem to be a setting for its dimensions and the height scales fine based on the text. What am I missing?

Thanks in advance
#22
I need to send a security guard on a walk for several rooms that the player is not necessarily in, but might walk through and needs to be able to encounter him on his journey.

I added a flag to check if he's moving and then put code in global repeatedly execute that moves him from room to room, but it gets crashy if I try to make him walk in rooms the player isn't in. What's the solution? Do I just have to give up on him having naturalistic pathing and add a simple frame counter to do the room swaps, only worrying about his position if the player enters a room he's in or vice versa?

Also is there a way to adjust the volume of sound effects without having to tie it to a char or channel or object?
#23
Why can't my char walk from area 1 to area 2? It works in every other room.

edit: I figured it out. The same area is also a hotspot and unlike the other rooms where I did this, the hotspot has a "walkto" point, which apparently she will walkto even if you click the feet icon on the hotspot, preve. Removing the walkto fixed the issue.

#24
...and here's me galumphing in with my sloppy, janky nonsense :D
#25
I want to make something like the skimmer sequence from SQ1 and for once I thought I'd ask for advice BEFORE I went off half-cocked and did it wrong and had to kludge it back to normalcy.

My assumptions are I'd:
use screen backgrounds to animate the background going by

put something in the keypress section of global that left and right arrows move the skimmer if in that room

disable the function that makes a repeat directional press stop movement for that room only

give the skimmer a 1 frame walk cycle for when it's drifting each way

Use room scaling to make the obstacle objects grow appropriately as they move down the screen

Rather than object move commands, use a frame counter in the room's execute-always to move the obstacles down so their speed can increase as they get closer

use the collision check function for, well, collision checking

I get anything wrong?
#26
I'm trying to have an encyclopedia feature where the char can look things up from a listbox that populates through the game as she encounters various things.

The listbox feature works fine, though it would be nice to have options to sort it, but I'm coming up empty on how to get the game to match the definitions.

In my mud days, I'd have used an array of structs, like so:

Code: ags
struct IGEntry {
  String name;
  String desc;
};

IGEntry IGList[2] = {
{"Elf", "Elves are known for their long beards and fondness for mining."},
 {"Dwarf", "Dw...orf? I'm not sure that's a real word. Are you making things up?"}};

Then when the player clicks an item from the list I'd use a while loop to compare the text to each "name" in the list and then display the corresponding text. AGS hates this idea and won't let me declare a defined array like this.

When I try to declare each item one at a time, like this

IGList[0] = {"Blah","Blah"};

I get an error "unexpected IGList". As far as I can tell, I'm copying the syntax exactly from the manual. What's the problem?

Also, is there just an easier way to do this I'm missing?
#27
Doing my credit sequence and made an object using frames for each part of the credits. However, because object positioning keys from bottom left pixel, placement looks wonky when different parts of the credits are different sizes.

Is there a way to force an object to use a different origin for placement? Ideally top center? To override the origin, so to speak?

Failing that is there a way for the script to access an object or frame's size? I could just tell the thing to adjust Y to Y + height. I expected there to be something like Object.Height but there isn't, just the blocking height which I have to set manually, so that's no good.

Apologies if this posts twice, forum gave me errors.
#28
This function works:

Code: ags
function OvaSquat(int x, int y) // pass the x,y of where you want her hand to be
{
  if (cOva.x < (x - 40)) cOva.Walk((x-40), y, eBlock, eWalkableAreas);
  else cOva.Walk((x+40), y, eBlock, eWalkableAreas);
  
  cOva.ChangeView(18);
  switch (cOva.Loop)
  {
    case 0: cOva.Animate(4, 4, eOnce, eBlock, eForwards); break;
    case 1: cOva.Animate(5, 4, eOnce, eBlock, eForwards); break;
    case 2: cOva.Animate(4, 4, eOnce, eBlock, eForwards); break;
    default: cOva.Animate(5, 4, eOnce, eBlock, eForwards); break;
  }
}

This function DOESN'T work, and tries to play a loop from her walk animation, despite the changeview call being literally right there in the same place.

Code: ags
function OvaKeycard(int x,  int y) //pass the bottom center of door
{
  if (cOva.x < (x - 60)) cOva.Walk((x-60), (y+25), eBlock, eWalkableAreas);
  else cOva.Walk((x+60), (y+25), eBlock, eWalkableAreas);
  
  cOva.ChangeView(18);
  switch (cOva.Loop)
  {
    case 0: cOva.Animate(6, 4, eOnce, eBlock, eForwards); break;
    case 1: cOva.Animate(6, 4, eOnce, eBlock, eForwards); break;
    case 2: cOva.Animate(7, 4, eOnce, eBlock, eForwards); break;
    default: cOva.Animate(7, 4, eOnce, eBlock, eForwards); break;
  }  
}

This isn't the only time this has come up. What's wrong with this function?
#29
Getting a little frustrated with move. Is there some way I'm missing to get something to move in an arc, or to accelerate or decelerate? What if I want something moving slower than 1? In some cases I can fake what I want by doing it in the animation but that seems highly inefficient.

Seems like what I'd have to do is put a special handler into repeat-always that does the math. Is there some other work-around I'm not seeing?
#30
Beginners' Technical Questions / Region tints
Tue 28/05/2024 21:37:37
I've got a scene in a high rise with hovertraffic in the distance. I used a region with tint to color the background traffic sprites when they go behind the greenish window and it works great... except it only works once the sprite is ENTIRELY inside the region. If it's partly overlapping, no tint. This is a problem since my plan had been to only have a few "objects" worth of traffic, each comprising many vehicles.

Is there a way to get region tint to apply only to the part of a sprite inside the region, or is there another way to do what I'm trying to do? Or do I just need to shut up and break my traffic sprites into multiple smaller sprites of one vehicle each?
#31
My expectation is that the 2nd line with the "achieved sentience" result should fire if the player tries to talk to an object that doesn't have its own talk function. It works fine for hotspots but for objects it returns the generic "the heck?" line. Why?

Code: ags
// *******************
// unhandled misclicks
// *******************
// WHAT- 1- hotspot, 2-object, 3-char, 4-nothing, 5- inv
// TYPE  1- look, 2- int, 3- use, 4- talk, 7- PU, 8- CM8, 9- CM9
function unhandled_event (int what, int type)
{
  if (what == 4) return; //no message for non-existent clicks
  if ((type == 4) && (what != 3)) // try to talk to non person. objects repping persons need their own line in room
  {
    cOva.Say("Hey there! Achieved sentience?");
    Wait(16);
    cOva.Say("No? Good.");
    cOva.Say("After the Cyberfork uprising last year, you can't be too careful!");
    return;
  }
  if (type == 3) // invalid item usage
  {
    if (what == 3) // giving things to chars
    {
      cOva.Say("No, I'd better keep that.");
      return;
    }
    switch(cOva.ActiveInventory)
    {
      case iAnalopticon: cOva.Say("That doesn't need analyzing."); return;
      case iHypercaulk: cOva.Say("That doesn't need to be any stickier."); return;
      case iStapler: cOva.Say("That doesn't need stapling."); return;
      default: cOva.Say("Those two things will not produce a successful merger."); return;   
    }
  }
  cOva.Say("The heck?");
}
#32
Adventure Related Talk & Chat / Shadows
Sat 25/05/2024 01:24:16
Hey all. Stylistic question. I did some searching and found a couple threads for old plugins that did automatic shadows as follow objects. It also seems like it'd be pretty easy to just drop a translucent black oval at the bottom of all my sprites. However it seems like most games on here don't have shadows at all.

But of course most of the old sierra and lucas games didn't bother with shadows at all. It could be argued that ignoring them is sort of part of the look, if that's what you're going for.

What are your thoughts on shadows? Your expectations when you see a new game announced?
#33
Maybe I'm just dumb but I can't figure out how to declare functions that are defined in global such that room scripts can call them.

IE if I have a bool function is_toast(int itemnumber) what do I need to do to be able to use it in room scripts without the room script throwing up an error because it doesnt know what is_toast is?
#34
Hey.

Been poking around here for ages. Used to program adventure games with my friend in basic on our c64s back in the day. They weren't good or anything, but we made them. Then I was staff on one of the larger muds for a long time. But I haven't had a game-related creative outlet in some time.

The game that was brewing in my head forever was a quest for glory-alike which was way too complicated and probably a stretch for my artistic abilities, so I just sort of did nothing for years and years. Recently I finally had an idea for something I might actually be able to complete, so now I've DLed AGS and am off and running.

I've noticed the majority of the games in the announcement thread are 320x200. Is there some reason for that I'm missing beyond the nostalgia factor or affection for pixel art? There's not some technical reason? I was planning to go 1280x800 since my art will be cell style and that looks better with a few extra pixels imo.

When I was first poking around here, alot of the more prominent games were follow-ups or midquels or whathaveyou for old sierra and lucas titles, but that seems to have died down. People scared of getting takedowns, or is that just not viewed as an interesting thing any more?
#35
Hi, I've been using AGS for maybe a week and had some questions:

1. I was surprised to find if I declare a variable in room script that it doesn't reset upon leaving and re-entering the room. I'm aware I could reset it with a region easily enough, but that's not really my question. How do variables declared this way differ from globals? Do I just need to make peace with using globals for every little counter and boolean? The use in this case is player repeatedly looking at a bookshelf and being shown a different book each time in a specific sequence.

2. I wanted to create a generic function for invalid inputs. Like if the player clicks talk on hotspots that are just bits of scenery, rather than creating a talk function for each of them, I thought I could put a generic_invalid_talk() function in global and then have every hotspot or object call that. Compiles fine, but crashes on use. Did I need to declare the function somewhere, or is this approach just a non-starter? Is there another way to come at this I'm not seeing?

3. Is there a way to make think animation automatically loop like talk animation does? I have done a work around with just making the think loop quite long but feels suboptimal.

4. Is there a way to show specific graphics/sprites on the gui, on top of the background graphic? I remember seeing this a lot in old sierra games and would like to have a shot of the character on either the options menu or inventory window which will change through the game.

5. Is there a way to adjust walk speed for specific directions? My character moves up and down too fast. Maybe bc her L/R loop is 8 frames and her Up/Down is only 6? I'm away the char struct has a x and y movement speed values. How often/where would I need to set that to have it be permanent?

Thanks!
SMF spam blocked by CleanTalk