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

#41
Thank you, that was driving me bananas.

> spacex = (spacex + 1) % (Game.SpriteWidth[946] - Game.SpriteWidth[948]);

This works also, thanks, just had to add a repeated section to the end of the graphic so that restarts are seamless. I'm familiar with mod but I rarely think to use it like this where you're making use of the return of the first operator if the 2nd one is bigger.
#42
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?
#43
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

#44
This might have something to do with it:

    cEgo.ChangeRoom(5);
    Greed += 2;

Anything after ego changeroom will be ignored in a room script because you're not in that room any more. This could lead to Greed being less than zero if the +2 is ignored, so saying verses just makes it go more negative. You might also change the check in rep-exec from == 0 to < 1, just as a safety.

When I run into this sort of issue I add a ton of display commands so I can see the value at every step and figure out what part of the process is misfiring so you know if it's not subtracting or just not hitting zero or if some other call is incrementing it somewhere else.

#45
Thanks. Didn't occur to me that display and think would use different rules since they both appear to use the same gui. I don't use display at all so I hadn't been able to notice that display didn't have the same problem, so I spent an hour searching for issues related to display and the text border gui. And even if I'd have found that speech bubble value I'm not sure I'd have guessed it applied to think.

Not complaining, just wanted you to know that I do actually try to find stuff in the manual, despite all appearances :D

Thanks again to both of you!
#46
That did it! Thank you!

Why are so many useful tools like this buried where you can't find them? Why isn't this value on the gui editor or the options screen?

How did you even know about it? It's not even in the manual from what I can see.
#48
Quote from: Vincent on Sun 14/07/2024 09:42:25I think a workaround can be to have a custom GUI where you display your text? Maybe the size of the text border box have his size regardless what is your resolution but it's just a guess.

Tried that. Same problem.
#49
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!
#50
Quote from: Crimson Wizard on Sat 06/07/2024 05:42:15but it's quite possible to have arrays of structs

I had a big long reply entered with examples but forum eated it.

LSS, from what I found when I searched this topic, there's no way to declare an array of structs. Like in my mud days the skill list would be such an array, with things like spell name, text shown when casting, level you get it, damage type, mana cost, etc, and there's be a big long entry declaring every skill in the game. Like

struct spell (contents)
spell spell_list[max_spells] = {
{"Acquire Aardvarck", 3, "You summon an aardvarck.", 20, damage-none},
{"Superior Acquire Aardvarck", 13, ... etc. etc,

From what I found when I searched, in ags, I'd have to declare each individual value for each part of the const, for each part of the array.
#51
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
#52
Quote from: Crimson Wizard on Fri 05/07/2024 22:41:50
Quote from: FortressCaulfield on Fri 05/07/2024 22:06:58a check in each room's load to set him up properly if the player walked into a room where he already was.

You dont have to add this to each room though, there's on_event for doing something on common events like room load:
https://adventuregamestudio.github.io/ags-manual/Globalfunctions_Event.html#on_event

I doubt if it's necessary to put something in each room's rep-exec either, if it's a common action then likely you may have everything in the global rep-exec under some condition (such as aforementioned "if (cNPC.Room == player.Room)").

Hmmm. I see what you're saying. Basically the same solution as mine except all in one place. If we had the ability to declare structs properly you could set up a universal NPC-go-place function and feed it data and who is doing what and where and handle it all in the globals. Could even have an array of structs with NPC movement data and run through all of them.
#53
Quote from: Khris on Fri 05/07/2024 09:56:34You can wrap the code in
Code: ags
  if (cNPC.Room == player.Room)
to avoid these crashes.

Only a channel's volume can be adjusted afaik; the only other solution I can see is to import the sound at different volumes (which is probably not a terribly good idea).

The problem is I want the game to know how far along he is without the player being in the room.

What I ended up having to do was put a frame counter in global rep exec which triggers his room changes, then a check in each room's rep exec which told him where to move if the player happened to be in that room when he moved there AND a check in each room's load to set him up properly if the player walked into a room where he already was.

Pain in the butt. I'm just going to avoid designing this type of scenario again.
#54
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?
#55
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.

#56

Well damned if that doesn't take the wind out of my sails. I appreciate your frankness though.

I do not use any copywritten material except a screengrab of cedric the owl for a comedy background postcard that turned out so tiny even *I* have to squint at it to realize that's him.

Trademarked... well, I've got a lot of playful reference, the equivalent of finding "King Graham was here" carved into a dungeon wall. I don't think I'd get in trouble for those. I'm not really expecting a reply just sort of thinking out loud. I know you've already heard this due to the time traveling, but if I don't say it anyway we'll cause a paradox. I guess the bottom line is I'm way better off scrubbing space quest out of the title.

I decided to pop over to the trademark search site and see what was live and what was dead and the results are REALLY weird.

According to the trademark office, "Roger Wilco" is a liquor store in new jersey, a chain of apparel stores and a voice communication program, but the sierra trademark on the name is dead since 2006 and vivendi or whoever has not filed a new one. "King Graham" and "Daventry" have apparently never been trademarked. "Space Quest" has been a board game, a series of casino games, a series of books about Jesus... "Leisure Suit Larry" has an active trademark under EA, but "Guybrush Threepwood" does not. Confusing
#57
Oh it definitely "includes things from space quest" it's just not going to have roger wilco mopfighting sludge vohaul in front of a phleebutt sunrise on the box.

Not that there'll ever be a box of course.
#58
...and here's me galumphing in with my sloppy, janky nonsense :D
#59
Didn't the Silver Lining get C&Ded? And at least one quest for glory?

I'm in a weird position because, without giving too much away, I don't have an existing space quest character as the protagonist. To a copyright lawyer just glancing at it, it might not look like a space quest at all. But then I lose potential space quest players.
#60
I admit it, I caved into the darkside.

I needed a texture for a "plasma pond" for a small part of a background and I just couldn't manage to produce it myself. DA's artbot got me exactly what I wanted in one try, AND I was able to tell it to produce similar images which I could then use to create an animation effect as if the plasma was undulating.

So I guess my point being it can be a useful tool under the right circumstances, and it is unfortunate the originators of this tech had to poison the well by launching it with a plaque of theft. But in most situations my vision for what I want is too specific for AI to be able to give me a useable entire background image, let alone a script or anything else, for instance.
SMF spam blocked by CleanTalk