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

Hi, folks.

Well I'm now venturing into dialog territory, and I wanted to set up a system akin to the CMI style - a transparent background overlay, different text colors than AGS' defaults, arrows for scrolling copious dialog options, etc.

I quickly gathered that I couldn't have all of these things with the built-in system, so naturally I turned toward using a custom GUI (not a text window GUI either, because I wish to control the placement of the GUI and don't want a border), but now I've hit a few roadblocks. I read through several older posts about similar matters, but am not sure if some things that were previously considered impossible now have workarounds. I also went through the 'custom dialog options rendering' article in the manual and tried implementing some of the functions, but it wasn't quite working out for me (not sure if it's not applicable for what I'm trying to do or if I was just doing it wrong).

Here's what I'm after but haven't been able to figure out:

1. The default color for dialog options. I believe this is normally tied to the player character's speech color, but (if possible) I'd like to be able to adjust this.

2. The highlight color for dialog options when hovered over with the mouse. I know this can be done with a text window GUI, but again I'm not using that here (for the reasons given above), and I saw that someone in an older thread was able to figure out how to change this for Sierra style dialog, but at the time it seemed like it wasn't possible to do so with the method I'm using. I'm hoping this has changed or that one of you clever wizards can come up with something.

3. How would I implement arrows (using custom graphics, no less) for scrolling through excess options? Is it anything like how it's done for inventory pages?

4. This one's just a minor niggle: Is there any way to constrain the act of highlighting an option to hovering over only the actual text of each option, rather than the entire width of the GUI for each line?

Any assistance with these is much appreciated.
Hi folks,

I'd like to figure out (if possible) how to variate characters' speech views so that the player won't see the exact same animation every time they talk.

For example, in a game like CMI, you'll notice that the characters' heads bob and mouths move in a different pattern for each line, even if you repeat the same line of dialogue over and over. This small detail helps to break up the monotony and add pleasing variety to the talking portions of the game.

So how can something like this be achieved in AGS?

I was thinking maybe you could randomize which frame of a long speech view to start with each time a character speaks, but the SpeechView function doesn't have a parameter for the starting frame. I know that the Animate function does, but is that what we'd want to use here?

Getting even more advanced than that, there are also different animations depending on the mood of the dialogue. For instance, the character might be shocked, their eyes wide and arms outstretched, or angry, with a furrowed brow and hands on their hips. And these animations too appear to be varied in their patterns. I'd love to be able to look under the hood and see how they went about doing all of this back then.

But can these things also be done in AGS? I reckon it'll take a significant number of views to animate, but I'm up for it if the results can be as desired.

Hi folks,

So I'm trying to have my player character blink at random intervals while idle, and I'm having a little trouble wrapping my brain around how to get it to work right. (I know not to use the Blinking View, as I'm not doing a Sierra-style game.)

I have a view (#4) with a single blink animation. Then, in my global script, I tried this:

Code: ags

function repeatedly_execute()
  int i;
  i = Random(10);
  cEgo.SetIdleView(4, i);

But that's not working as desired. The animation appears to be zipping by more rapidly than if I left it as an ordinary, evenly spaced idle view, and is also occurring way too frequently. I imagine it's got something to do with my randomized SetIdleView delay (which I assumed, from my understanding of the manual description, would be the delay between each playing of the view), but I'm unsure as to what exactly the problem is, and how to fix it.

Any insights (or tips on how to better achieve this in general)?
Hey guys,

I'm trying to have the cursor switch to one of four directional arrows when over different regions that lead to other rooms.

- I have a sprite for each arrow: left (sprite slot 46), right (47), up (48), and down (49).

- I made an "Arrow" cursor mode out of the Usermode1 cursor, with the default image set to 46 (the "left" arrow sprite).

- I have a global variable set up (in the Global Variables pane) named "region_direction", string type, initial value: left.

In my room script, I have the following function to set the "region_direction" accordingly depending on the specific region. In this instance, for region 1, I want to use the "up" arrow.
Code: ags

function room_Load()
  Region* r = Region.GetAtScreenXY(mouse.x, mouse.y);
  if (r == region[1]) {
    region_direction = "up";

Finally, in the verb coin script (where all of the other cursor related functions are), in the "repeatedly_execute" function, I have the following code to switch the cursor back and forth from the arrow mode to the standard walkto cursor, with the intention of the arrow graphic changing to the appropriate sprite depending on the "region_direction" variable (in this case, sprite 48 for "up"):
Code: ags

Region* r = Region.GetAtScreenXY(mouse.x, mouse.y);
if (r != region[0]) {
  if (region_direction == "up") {
    mouse.ChangeModeGraphic(eModeArrow, 48);
  mouse.Mode = eModeArrow;
else {
  mouse.Mode = eModeWalkto;

With this, the cursor switches back and forth as expected, but the arrow sprite does not change, just stays on the initial "left" sprite.

I've been trying different variations of this all day. It seemed to make sense in my head but I just can't get it to work. I've read several older threads of similar scenarios, but nothing's seemed to help me so far. I don't know if I'm just missing one important point here, like how script types work with each other, or if the solution is more complex than I initially thought.

Can someone please tell me what I'm doing wrong, or how else to achieve what I'm trying to?

Thank you!
Hey, guys. I'm trying to script (what I thought would be) a simple "save slot overwrite" function in a custom save GUI, but all I'm getting is overwriting of the slot at the top of the save list, no matter which other slot I have selected. Can you please take a look and tell me what I've gotten wrong here?

Code: ags

bool slot_selected = false;    //for signaling whether an existing save slot is selected; no selection by default

function lstSaveList_OnSelectionChanged(GUIControl *control)    //selection of an existing save slot
  slot_selected = true;

function bSaveConf_OnClick(GUIControl *control, MouseButton button)
  if (slot_selected == false)    //no existing save slot is selected
    SaveGameSlot(lstSaveList.ItemCount ++, tbSaveName.Text);    //save to the next slot up from the existing total count
    gSaveGame.Visible = false;    //close save GUI
  else if (slot_selected == true)    //an esiting save slot is selected
    SaveGameSlot(lstSaveList.SelectedIndex, tbSaveName.Text);    //save to the selected save slot, overwriting it (???)
    gSaveGame.Visible = false;    //close save GUI
Hi all,

Hope you're doing well.

I've spent a couple of hours searching the forums, manual, and wiki, but haven't found the answers to exactly what I'm looking for (nor much on the general topic that's at all recent). I feel I've done my due diligence before posting, so I'll feel really dumb if something flew right over my head.

I'm trying to create a game with The Curse of Monkey Island style verb coin, inventory, and game menus. I've started with the Verb Coin template, which seems the right start, but I've got some questions on its intricacies and how to expand upon it:

1. How can I replace the default, plain graphics with my own custom-made images/sprites (e.g., in CMI: a literal coin for the verb coin, a treasure chest for the inventory, a journal for the main game menu)? Any links that I found in old threads that might've shown such examples all appear to be long dead, and I don't see (in the various GUI properties in AGS) where to assign a graphic to use. Surely this kind of thing is possible...?

Edit: Forgive me, I just saw the BackgroundImage parameter right there under the GUI properties, but I swear it wasn't there before. You believe me... Right?...

    1a. Can I assign an animated view to a GUI (e.g., how the coin in CMI shines when activated)?

    1b. Is there a problem with having a singular options menu, containing save, load, quit, etc. buttons all in one? All of the menus that I've seen so far appear to handle just one of those functions each. Is there something wrong with setting up a global main menu GUI with all options that link to sub-menus to carry out those options, the way most modern games function?

2. I'd like to retain identical functionality of the CMI interface (e.g., click and hold to bring up the verb coin, verb coin functionality within the inventory, etc.). I've gathered that this is how it might have worked in the Verb Coin template previously, but appears to have been changed in more recent iterations. Is there a simple way to restore these desired behaviors?

Again, most of the threads I've found on these topics are quite old, and I don't know what information in them is still relevant/useful, so if any of you all can assist me with these points, or at least point me in the right direction, I'd very much appreciate it.

Thank you!
SMF spam blocked by CleanTalk