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 - Kara Jo Kalinowski

#61
Code: ags
function repeatedly_execute_always() 
{
    if (player.Moving) {
    switch (player.Loop) {
      case 0: //Down
      case 3: //Up
      player.AnimationSpeed = 1;
      break;
      case 1: //Left
      case 2: //Right
      player.AnimationSpeed = 4;
      break;
    }
  }
}

Animation speed determines how many frames delay there are between changing animation frames, but it only takes integers. You will need to adjust this based on how many frames are in your view. (I'm assuming some programming knowledge here, but if you need further help, feel free to ask.) Now, this is going to change the walking speed. You have 2 options. You can set the character's MovementLinkedToAnimation to false, in which case it will have more of a gliding effect (you'll need to also adjust MovementSpeed lower to get it to appear right), or you can keep it to true, but change it like so:

Code: ags
function repeatedly_execute_always() 
{
    if (player.Moving) {
    switch (player.Loop) {
      case 0: //Down
      case 3: //Up
      player.AnimationSpeed = 1;
      player.SetWalkSpeed(2, 2);
      break;
      case 1: //Left
      case 2: //Right
      player.AnimationSpeed = 4;
      player.SetWalkSpeed(4, 4);
    }
  }
}

I don't know exactly how the speed is calculated, but this appears somewhat good for me.

I have it set to repeatedly_execute_always so that if walking as a result of a script while blocking other inputs, it will still update the speeds.
#62
Quote from: pell on Tue 11/02/2025 01:48:28
Quote from: Kara Jo Kalinowski on Mon 10/02/2025 18:40:38
Quote from: Radiant on Mon 10/02/2025 17:33:01My idea: have a classic Sierra menu bar, but you cannot use the walk / hand / eye icons because you're missing those body parts. You need to find them before the interface fully works.

But I don't have time this month so if anyone wants to take my idea, they're welcome to.

This could be interesting. I'm really struggling to come up with an idea for this.

Are we allowed to use assets i.e. game dev market for our projects? Like the ones in the humble bundles? (Music/sprites/sounds)? Or only free ones?

I think it has to be content that's freely available to everyone, but I'll have to go find where I read that. Of course, Stupot may clarify.

It used to be no pre-existing assets at all (besides music), but was changed at one point (competitions started to say "Pre-existing assets are allowed", but I wasn't sure if it was meant to be just free assets or not. I messaged Stupot to get a clarification on it.
#63
I'm not really sure what you are trying to do. What's the complete relevant script here? That command works fine for me inside the dialog.
#64
Quote from: Radiant on Mon 10/02/2025 17:33:01My idea: have a classic Sierra menu bar, but you cannot use the walk / hand / eye icons because you're missing those body parts. You need to find them before the interface fully works.

But I don't have time this month so if anyone wants to take my idea, they're welcome to.

This could be interesting. I'm really struggling to come up with an idea for this.

Are we allowed to use assets i.e. game dev market for our projects? Like the ones in the humble bundles? (Music/sprites/sounds)? Or only free ones?
#65
Quote from: lafouine88 on Sun 09/02/2025 19:40:03Hi guys

I've recently changed a lot in my view system, so I had to delete them to start back on a clean basis. I used like 250+ views and I deleted them all to just have around 30 left. And start again.
Something weird happens though when I create my new views.Instead of adding normally : view 31,32,33... sometimes one or more Id numbers are skipped. It goes 31,32,35,36,37,39 for instance. Which is annoying because I really need the view order for legacy coding. And it doesn't make sense because I ve checked many times, views 33,34 or 38 in this example don't exist anymore.

Any ideas why this would happen?

Thanks

I can't help you with the reason it is happening (it might be a bug that you should report) but if I wanted to fix it I might try opening my Game.agf to see what's going on, in notepad++ or another text editor.

There's a section starting with <Views> that has information for all the views stored in the project. Maybe something wasn't getting deleted properly.

If someone else knows why it's happening though, feel free to give more information.

Disclaimer: If you do try changing Game.agf by deleting stuff make sure to back it up first. I haven't tried doing that myself and seeing if that causes problems
#66
Quote from: heltenjon on Sun 09/02/2025 05:43:24After finishing it, I'd say that the last "unfair" puzzle
Spoiler
getting below 120 lbs
[close]
is almost fair, given the context.  :-D And the maze got even more evil after reading what you did with it.

I came up with an alternate solution I liked, but which (fortunately) didn't work. I guess it would have been too evil.
Spoiler
After entering the trap room with the hat only, I threw it away, then went to a corner and left the game on while leaving the computer. After a long time had passed, I thought maybe the motion sensors in the room would determine I was dead and open the gate again.
[close]

Spoiler
Maybe that would be an opportunity for a death in a v2 with added frustrations :P
[close]
#67
Hints & Tips / Re: Artifact
Sun 09/02/2025 05:15:40
Nice job :P I'm sure more people will be looking for hints also.
#68
Quote from: thromgrail on Sun 09/02/2025 01:46:40AHA! I wanted to change the label in the BASS ActionBar. I created an unclickable button (clicking the GUI itself does the functions) with the same image I wanted, and did this:

Code: ags
  GUIControl *theControl = GUIControl.GetAtScreenXY(mouse.x, mouse.y);
if (theControl == notebutt) {
  lblAction.Text = "Notebook";
}

Now it shows at the bottom of the screen and still functions normally. Thank you very much for your assistance! And thank you very much for your patience!

Yes sorry, I didn't check what the label was called beforehand, since I made my own GUI and was testing it on that. Glad you got it working :)
#69
Quote from: thromgrail on Sun 09/02/2025 01:35:31My apologies. I called it a button since I made it function as a button, but it's just a GUI. Attempting to use GUI returns this error:

GlobalScript.asc(466): Error (line 466): '.Text' is not a public member of 'GUI'. Are you sure you spelt it correctly (remember, capital letters are important)?

It's possible I don't know what to use instead of LabelInfo, my code is as follows:

Code: ags
  GUI *theControl = GUI.GetAtScreenXY(mouse.x, mouse.y);
  if (theControl == gNotebutton) {
    gNotebutton.Text = "Notebook";
  }

What is the name of the label containing the text?

i.e.



It'd be the thing your existing text update code is modifying.
#70
Quote from: heltenjon on Sat 08/02/2025 18:29:06I've tried both the first draft version (which was really just intro and ending) and the finished MAGS entry, which I've not managed to complete yet.

First of all, yes, you have managed to meet the requirements for the MAGS contest this month. That really means we'll have to look at all the entries as sort of tongue-in-cheek in-jokes.

Rules broken:
* giant maze
* puzzle that can't be solved the first time
* only one save game slot
* possible/probable to end up walking dead
*
Spoiler
ability to interact with exit
[close]
* And probably more, as I haven't figured out the last (?) puzzle.

I enjoyed the intro room, with lots of possible interactions, and it also sets up the stage for later. The maze...I don't like mazes. I've mapped so many of them through the years I can't tell. I think it's boring. This one came with a twist, which you have to understand to map it, and it's well executed, but simply not my thing. Luckily, I didn't have to, because WHAM! made a Youtube video, allowing me to cheat piggyback using his map. @WHAM! @WHAM! - thanks!

The final room have me stuck. I guess I'll open up a help thread about it. It's brilliantly mocking in this setting, where only one save game is allowed, and the player need to restart to try different approaches, trekking through the maze again and again. Annoying? Yes, certainly. But that's kind of the point, too.

So...is this a good game? No. Is it a good entry in this competition? Yes. I guess that someone playing this without knowing the context, will be quite frustrated. Less so for us that are in on the joke.

EDIT: I forgot one thing. The maze in WHAM!'s video and mine is identical, but are shown from different angles. Do we have different editions, or is there some random stuff in the setup stage, just to f with our minds even more? It looks like my game is turned 90 degrees compared to his youtube video.

Thank you for your feedback. Yup, it was definitely intentional  (laugh)  I've responded to your questions in the hints forum :P

To answer your perspective question,
Spoiler
The rooms in the labyrinth, besides the starting room, are randomly rotated 0,90,180,or 270 degrees upon entering them. Each time you enter them. Thought the players might appreciate that (laugh)
[close]
#71
Quote from: thromgrail on Sun 09/02/2025 00:59:04
Quote from: Kara Jo Kalinowski on Sat 08/02/2025 19:03:10You can do this inside your repeatedly_execute:

Code: ags
GUIControl *theControl = GUIControl.GetAtScreenXY(mouse.x, mouse.y);
if (theControl == ButtonQuit) {
  LabelInfo.Text = "Quit Game";
}

Replace ButtonQuit and LabelInfo with whatever yours are called.

This doesn't seem to work?

Code: ags
GUIControl *theControl = GUIControl.GetAtScreenXY(mouse.x, mouse.y);
if (theControl == gNotebutton) {
  gNotebutton.Text = "Notebook";
}

returns an error on "if (theControl" etc.,
GlobalScript.asc(465): Error (line 465): Type mismatch: cannot convert 'GUIControl*' to 'GUI*'

That would mean that you're inputting the name of the GUI and not the name of the button on the GUI.

It's possible to capture the entire GUI using GUI rather than GUIControl in the code above, but I'm guessing you just want the button.

(My code that I tested is in 3.5.1 so I'm not sure if it changed, you could try just changing GUIControl to GUI and seeing if that works.)

For example:



The gui is called gMenu and the button is called ButtonQuit.

If I wanted the entire menu to be a hotspot, I would go

Code: ags
GUI *theControl = GUI.GetAtScreenXY(mouse.x, mouse.y);
  if (theControl == gMenu) {
    LabelInfo.Text = "Menu";
  }

But I want just the button, so I did it as posted above.
#72
Hints & Tips / Re: Artifact
Sun 09/02/2025 00:13:09
What I said in the first post was the wrong thing. I've corrected it accordingly.
Spoiler
It tells you when you examine the door to the locked room that your adventure may be over.
[close]

Direct answers to your 3 questions:

Spoiler
Is there a way to leave the first room without the hat? (I think not.) No.
[close]

Spoiler
Is there a way to lose the hat before entering the trap room? (I think not.) Yes.
[close]

Spoiler
Is there some tiny hotspot hidden in the maze? No.
[close]

Progressive hints:

Spoiler
No, it's not what you are thinking of with the mother. There is nothing else hidden in the catacombs.
[close]

Spoiler
You have a scale in your room that displays your current weight.
[close]

Spoiler
If you leave the room weighing 120 pounds or more, you can't go back to your room again. There's nothing more you can do after leaving the house.
[close]

Spoiler
But the problem you will face is that he won't willingly give up his hat, and he won't leave without it.
[close]

Spoiler
So maybe some action that you take after getting the hat will get rid of the hat.
[close]

Spoiler
Is there something in the room that could destroy the hat?
[close]

Solution:

Spoiler
Wear the hat, then use the poker on the fireplace. (Yes this puzzle is a bit of moon logic, but it's part of the theme, and only so many things you can try knowing what the problem is ;)
[close]

Another problem that you might have, which is easier, but I'll mention it anyway:

Spoiler
I can't get rid of the letter after picking it up and reading it, and I can't get out of the house without reading the letter.
[close]

Spoiler
The controls are mentioned to you at the start of the game.
[close]

Solution:

Spoiler
Examine the letter without picking it up.
[close]
#73
Hints & Tips / Re: Artifact
Sat 08/02/2025 19:09:40
Quote from: heltenjon on Sat 08/02/2025 18:56:00@Kara Jo Kalinowski @pell

Damn, that was difficult. I guess I need a hint or two.

I'm in the trap room.

This is what I have tried:
Spoiler
I have used the poker in a hole, read the plaque, dusted the platform with my hand and found out that if I weigh less than 120 lbs, the trap won't spring. I know what I and my items weigh. I haven't found a way to leave the first room without the hat, or to get rid of it before stepping on the platform. I have found a way to get rid of it inside the trap room, though. So in theory, the trap should disappear if I can fool the sensors to think I'm dead. I've tried standing still and not doing anything, which doesn't seem to work.
[close]

Questions. If possible, give hints instead of full solution to the problem.

Is there a way to leave the first room without the hat? (I think not.)

Is there a way to lose the hat before entering the trap room? (I think not.)

Is the solution to
Spoiler
somehow alert my mother by doing something in the first room, so that she may come to my aid?
[close]

Progressive hints towards "Can I leave the room inside the labyrinth?":

Spoiler
Examine the door to the locked room. The message you get should give you a bigger hint.
[close]

Spoiler
The weight on the scale is the minimum weight to spring the trap. Once sprung, it won't unspring until you are dead.
[close]

Spoiler
If you're trapped, it's too late. Restart the game.
[close]
#74
You can do this inside your repeatedly_execute:

Code: ags
GUIControl *theControl = GUIControl.GetAtScreenXY(mouse.x, mouse.y);
if (theControl == ButtonQuit) {
  LabelInfo.Text = "Quit Game";
}

Replace ButtonQuit and LabelInfo with whatever yours are called.
#75
Thank you for the explanation. It actually does get called for inventory windows if you have "Override built-in inventory window click handling" set to true in your inventory settings. That uses eMouseLeftInv / eMouseRightInv for inventory item clicks. I was just wondering what I was missing regarding the default settings.
#76
I've just beat Skrexeval and it definitely had that king's quest feel to it, as well as the sliding puzzle :)

I'll leave thoughts about all three when I manage to beat the last one - going to need to properly map that one, I can already tell.
#77
Quote from: Ponch on Fri 07/02/2025 23:49:23
Quote from: WHAM on Fri 07/02/2025 13:40:47I'm kind of struggling to decide how to vote on these. Do I vote for the game I feel is genuinely the best designed entry, or the one that breaks the most rules of game design? Hmmmm...
As I see it, you have several crucial criteria to consider...

Spoiler
1) You could vote for the person who finished their game first (whoever that may be).
2) You could vote for the person whose game you were actually able to finish (whoever that may be).
3) You could vote vote for the person who was clearly farming for votes in a desperate bid to win (whoever that may be).
[close]
:=
Once again, thanks for playing the MAGS games on your channel. And thanks for once again finding a game-crashing bug in one of my MAGS games while the world was watching.  :embarrassed:

UPDATE: Just uploaded a new version of the game that fixes the bug WHAM found.  Whoops!

Don't forget

Spoiler
1) You could vote for the person who has the least amount of completed adventure games before this one
2) You could vote for the game with the best adventurer's hats :)
[close]

(And actual spoiler)

Spoiler
3) You could vote for the game with no in-game voting plugs  (laugh)
[close]

I've completed the sliding puzzle game myself and have barely scratched the surface of the other two, though I'm trying. So far I am enjoying them but I get the feeling that after a while I won't  (laugh)
#78
So essentially you can code whatever you want even though AGS is designed for adventure games...

repeatedly_execute, repeatedly_execute_always and late_repeatedly_execute_always are the functions that are going to define your game loop (the help file covers the difference between those functions)

Those game loops will run once per frame, so you can do whatever custom thing that you want to do within those loops, whether or not you're not using AGS's built in click handling events, etc.
#79
For my game, Artifact, I had started on a blank game in AGS 3.5.1 (so had no code at all) except that I wanted a simple right click / left click interface with inventory displayed on screen. So I copied some trimmed down parts of the BASS code which worked for left clicks/right clicks in the room itself. Meaning I wanted left/right clicks on inventory items to do something, because right now they were doing nothing.

I asked for help on the Discord, and I didn't exactly get a full answer to my questions. I was told, basically, that AGS is supposed to handle inventory actions on its own, but I was asking what cursor mode the mouse had to be in for the mouse to do that (was told it didn't matter).

Eventually we settled on "Override built-in inventory window click handling" and when I toggled that to true, the BASS stuff with click handling worked again, but I still don't know what I was missing for the built-in inventory stuff to work, though I solved the problem my own way.

Here's my script (minus stuff specific to inventory interactions): https://pastebin.com/W4VuUa57

It does have an on_mouse_click function but that function didn't seem to get triggered at all by inventory/GUI stuff until I overrode the default AGS behavior. Can someone explain to me what I was missing so that I know for the future?
#80
Quote from: cat on Fri 07/02/2025 20:09:30I'm a bit torn regarding this MAGS. Initially, I wanted to continue my last year's strike of playing every MAGS game. But this topic makes me think that all the games will include stuff that I do not enjoy. So I think I will pause for a month and continue playing the February games.

I tried not to be *too* terrible with mine, but I definitely kept the theme in mind :P
SMF spam blocked by CleanTalk