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

#1
Hi!

The voice actor script export isn't working for me.

First, it gags on my functions that use a pointer to assign speech to the passed character. But if I create a placeholder character with that name to avoid the unknown character error, it appears to function normally, declares success, but the file is only the very first line, the one that says:

*** All text lines, in order of appearance in the scripts ***

Even I outright delete the offending functions rather than make a placeholder char, it only gives me a 1kb file with that first line.

Thanks in advance!
#2
I want a character's sprite to be overlaid with an animated energy effect akin to old cable TV static, but one that is dynamically masked to their body so the static effect plays uninterrupted regardless of what the char is doing. Feels like there should be a way to do this using the char's current graphic as a dynamic sprite mask but I'm not even sure where to start.
#3
Hiya!

Need to do something similar to footprints where repeated copies of a sprite are left permanently across the screen. It's not actually footprints, but that was the best analogy I could think of. Something moving along and leaving sprites in its wake that stay where they're put.

Is there a way to do this with drawing surfaces or dynamicsprites or something that will save me making an object for each 'footprint' or something like that?

I was initially thinking merge into background, but that also deletes the object.
#4
Is there a way to get room objects or chars to show over-top of guis, short of making them into other guis or buttons on the same gui?

I'm using an object to animate my character's hand pushing buttons on several screens but one of them uses gui buttons for health bars (essentially) and they show over top of the hand.
#5
Critics' Lounge / My updated walk cycles
Sun 04/05/2025 13:36:48
There's times where my inner perfectionist shuts up and I allow myself to think these are pretty good!


   
#6
How do we deal with this warning windows pops up that makes everybody think the game's a virus?

I tried googling the issue and got quite a lot of nonsense about several different kinds of microsoft accounts and licenses including needing to sign up for their AI platform.

Yet I don't get the message when playing many other people's ags games. What am I missing?
#7
My walk cycle works great. But I want to add more frames to the left and right loops to smooth them out. But I don't want the char's walk speed to change. I see there's an animationspeed setting, but I only want the left and right walk cycles to change. And I know I can adjust walkspeedx but that won't help unless I can also speed up her left and right loops.

I know could call a custom function every time I want to move her where I set animationspeed, call walk and then set animationspeed back again, but I'm way too far in to go back and do that, and the logistics of making it work with all the different ways a char might move is daunting.
#8
I keep running into issues animating with tweens or moves when a character needs to scale and move at once, like a char riding a zipline into the distance or a ship flying up from a planet. Is there a way to change this or to fake it somehow with dynamic sprites, to make a char scale from top center or object from the top right, etc
#9
Is there any sort of rule of thumb regarding how much should go in your globalscript before you consider making it it's own separate add-on script? What are the advantages or disadvantages of doing so, and how would I set that up?
#10
Wanted a system for moving NPCs who aren't in ego's room. For a guard pacing back and forth, you could just leave him where he is and restart him when ego comes back. But in some cases I need to more accurately simulate the walk, so that if ego walks into a room where he is, he's in the right spot and continues. Like if that same guard needs to walk 4 rooms away and check something. And I needed it to be simple cuz I'm not actually that good at this. :D

made a struct steps, with x, y, room and type. Type is enum to sWalk, sHalt and sRoom.

Added to player properties int activestep, defaulting to -1.

Was not able to figure out variable length arrays or use pointers to tie paths and chars together, so I cheated. I just have one array that holds all the paths in the game. When it's time for scott to go to the shoe store, you set his activestep to whatever the first step of that path is. (0, if it's the first or only path.)

Room loads check if activestep != -1, run do_path for that char and step. Do_path reads that step in the array, and does what's needed, with the char either walking or changing rooms or stopping and ending the path.

Global rep exec checks if activestep != -1 and if the char is moving. If they're not, that means we've either interrupted a walk by changing rooms or he's at the end of a step. Run the current instruction. Do_path checks if they've reached their x/y destination, and if they have, increment activestep.

Here's the clever and/or stupid bit: chars can't walk in rooms the player isn't in, so instead we yeet them into a virtual room with y position 2000 greater than their actual coordinates.

When an NPC on a path changes room, they ALWAYS change to the room where the player is. If that room is the real room they're meant to be in, they use their real coordinates. If it's not, they use coordinates with y + 2000.

This means for the actual movement we just just issue normal char.walk commands, with noblock and anywhere.

The NPC's movement plays out naturally in real time, with the very same commands. Correct positioning and walk progress is maintained if the player walks in on the NPC or vice versa.

Current issues:
if the NPC's walk animation plays sounds, the player will hear it when the NPC is in the virtual room.

no way to make NPC wait or pause. Can use a very long step on a room the player can never reach or can simply make multiple paths as a work around.

Probably several other hideous flaws I'm just not seeing yet.
#11
Trying to create a struct that will track an off-screen NPC's journey so they appear to organically always be in the right spot if the player follows them or walks in on them partway. However, some NPCs will have journeys that require only 2 or 3 waypoints, others 10 or more.

I need to be able to fill these out with a variable length of instructions and AGS really doesn't want me to. I don't need to be able to adjust the array's length once created (although that would be nice for other features) but I do need to be able to have different instances of the same struct have different length arrays.

Attempt 1: arrays
struct Journey {
    Character *walker;
    bool walking;
    int steps;
    int step_x[steps];
    int step_y[steps];
    int step_room[steps];
};

Nope! Array size has to be constant. Every journey would have to be as long as the longest one with the shorter ones just having a bunch of empty entries. That's not great.

Attempt 2: linked lists

struct step {
  int x;
  int y;
  int r;
  step *next;
};

Nope! There doesn't seem to be any combination of managed or non-managed pointers that make it happy here.

AGS has to be able to handle this because rooms store hotspots etc as an array, right, and not every room as the same # of hotspots?
#12
EDIT: It seems think uses the same font as speech. How do I make it not do that?
#13
Looking to have essentially a two-headed char. They move as a unit, but each has their own talk animations, idle animations and talk text color. My ideas for how to handle this:

1. Have just one char showing both heads, with multiple views. Make a function for the 2nd head talking that swaps to that view, changes the speech color, calls CharB.Say and then changes back. Put something in rep-exec for the 2 rooms the char can go into that changes the idle to the other view whenever the char is doing their idle.

2. Have two chars and glue them together somehow. Maybe a check in rep-exec that if char A is moving, set char B's position. Might result in stuttering though. Maybe doable with dynamic sprites but my understanding of those is poor. If the gluing can be done easily, this seems to be the most organic.

3. Number 2 but with cheating. Whenever they need to move, set char B invis or offscreen then reposition when movement ends, with char A's movement view showing both of them together.
#14
EDIT:
I learned some interesting things about idle animations.
1. They do not set char.Animating to true.
2. Using SetIdleAnimation while it is playing not only resets the timer but aborts the current idle.

Questions:
There does not appear to be a way to adjust or read the timer for a char's idles. Am I missing something? I don't mean the delay value itself, I mean whatever is counting the seconds. Like there's no way to manually reset it or have a char on a 20s delay start at 10s when you walk into the room for the first time?

Do the idle timer countdowns for non-ego reset when you leave the room?

Does changing idle view or idle delay reset the countdown timer?

Is there an easy way to tell what chars in a room? Like an 'occupant' array in the room struct?

I have 3 chars on the same screen. I don't want their idles all playing at once, but I also don't want any of them to have to be on overly long delays. I'm thinking the following:

Char A- 7 second delay, Char B- 14s, Char C- 21s
In the room's repeatedly execute always, if char A or B is animating and in their idle view, set their delay to 21. Would that work?

I would really like to be able to have a global check in whatever code plays idle animations that allows only one to play at a time and also fuzzies up the timer, adding a random 0-3 seconds, but I don't think the script has access to the code to do that.

Thanks in advance!
#15
One of my playtesters reported frustration trying to use WASD. If it's not too complicated I'd like to enable that option WITHOUT having to disable arrow keys OR add a choice for it to the menu.

I'm guessing I need to put something in on_keyboard_press to tell it W is the same as up etc. but can't quite figure out what.
#16
Like that part in Monkey island where the pirate leaders all speak together occasionally.

One character using say background and another using say seems like the best option, but say_background doesn't trigger animation, I'd also be concerned that both talk messages and both speech cycles are cleared at the same time if the player presses the skip button.
#17
Is there a way to modify the char.talk function? I'd like it to accept more arguments so I can have multiple talk cycles for the same angle, like one where the character gesticulates and one where they don't, one for happy, one for angry, etc. I can fudge it now by reassigning the talk loop every time I want a special animation and then setting it back but that feels clunky.
#18
Trying to use dynamic sprites to create a space window with stars and such whizzing by and none of it is working. I copied the code from the 2nd reply here:

https://www.adventuregamestudio.co.uk/forums/beginners-technical-questions/round-gui-for-a-minimap/msg636663807/

Code: ags
DynamicSprite* space;
int spacex = 0;

void repeatedly_execute_always()
{
  space = DynamicSprite.CreateFromExistingSprite(946);
  space.Crop(spacex, 0, Game.SpriteWidth[948] + spacex, Game.SpriteHeight[948]);
  space.CopyTransparencyMask(948);
  oSpace.Graphic = space.Graphic;
  spacex += 1;
}

946 is a long image of stars. 948 is the mask for the window.

When the room loads, it immediately crashes, complaining the transparency mask is not the same size. That's sprite 948. I tried putting in the height and width values directly, referincing them from 948's dimensions, modifying by -1, +1, nothing made it happy.

If I comment out that line, then the image loads but never updates even once. The repeatedly execute and spacex increment is working, it just never ever recrops the image.

EDIT: Turns out the redraw was working, but 1 pixel per cycle was too slow to notice. So that problem is solved. Still having the crop problem, and now a new one:

How do I make the image loop?
#19
EDIT: Thanks for the initial feedback all! I'll be moving this to its own game in development thread now that it's further along

On well... everything. I've been toiling away for about 2 solid months and this is what I have to show for it. The music and sound effects are from free online sources (which I will credit properly before a demo release) but otherwise everything here is me, writing, animation, background art and scripting.

My friends have been helping with playtesting but, being my friends, are unlikely to tell me if the whole thing just looks like dingo's kidneys.

Accrual Twist of Fate alpha

#20
I'm making a 1280x800 game and the text border box refuses to be any wider than 160 pixels and looks like absolute garbage if it's got more than 3 words in it. Custom text window, default one, makes no difference.

There doesn't seem to be any sort of "max size" option I'm missing and all the tutorials I can find gloss over this entirely. Help! This is driving me crazy!
SMF spam blocked by CleanTalk