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

#141
Here's the new version - sorry for refactoring so much code after the 1.0 release.
All template settings are now grouped in a separate module and you can change them from anywhere in your code. I've also removed the old doubleclick code and integrated CW's module instead.

Btw. thanks to CW and Snarky for telling me about attributs and how they work :D Also thanks to Monsieur Ouxx who brought the issue up.

This version also contains two bugfixes:
1) Alpha transparency for the dialog GUI is now a thing
2) Running works on everything, not just plain areas.
#142
For some reason I thought that this would be the way to do it. But apparently you can doubleclick-walk to everything in Thimbleweed Park.
So yeah, it seems to be an intentional bug which I'll fix right away :)

In the meantime you can comment out the 'if condition' in line 2075 and it's bracket in 2085. In line 2095 remove this piece from the if condition: 
"&& location_type == eLocationNothing"

I'll test it some more and see if this fix breaks anything.
--edit: of course it broke something :P Gotta fix the door handling now.
#143
Just a quick guess, but have a look at 'General Settings' in the AGS Editor. In the category 'Visual', check the setting "When player interface is disabled, GUIs should" and make sure it's set to 'Display normally'.
That could be at least one cause of the icons disappearing.
#144
Sorry for accusing AGS: I messed up :X.
I forgot to set info.HasAlphaChannel = true;

@imsomnia212
In line 382 (function dialog_options_get_dimensions) add this

Code: ags

  if ((CDG.bg_img_transparency > 0 || CDG.bg_img_transparency == -1) && CDG.bg_img!=0 ) {
    info.HasAlphaChannel = true;
  }
#145
@imsomnia212 I can replicate this, but I'm clueless why it isn't working anymore. Drawing images with an alpha channel used to work on dialog GUIs - at least in 2017. I'm trying to find out in which version of AGS, this feature broke again. It never broke, see below ;)

#146
Great that you've sorted it out.

And since we're at it, I've added the fixes to Github and updated the template.
So after over a year in RC state, I now proudly call it 1.0 :-D
#147
The Rumpus Room / Re: Name the Game
Wed 02/05/2018 08:59:23
Hehe, you got it. I initially searched for a screenshot of 'Heart of China' when I stumbled upon this one :)
#148
The Rumpus Room / Re: Name the Game
Mon 30/04/2018 14:08:44
(wrong)

:)
#149
The Rumpus Room / Re: Name the Game
Mon 30/04/2018 12:31:24
Whoops, I almost forgot my turn. Sorry!

[imgzoom]https://i.imgur.com/9XYsRey.gif[/imgzoom]
#150
A good thing, that I called this a release candidate ;)

Here's your bugfix.

In globalscript.asc at line 25 edit your code like this:
Code: ags

  if (keycode == eKeyF5) {
    //gOptions.Visible=true; // F5 - OPTIONS
    Verbs.UpdateActionBar();
    OptionGui.ShowOptions();
  }

That fixed the issue for me.
#151
The Rumpus Room / Re: Name the Game
Tue 24/04/2018 17:58:14
Isn't this Revenge of Shinobi on the Arcade?
#152
Hi and thanks for the kind words.

Without testing it I'd say you need to init the door object every time the room loads.
GetDoorState just return the state of the door, but doesn't apply it. InitObject does both: it get the state and modifies the object if needed.

Code: ags

Room_First_Load {  
//Set up a doors with ID 20 and set it to open
 Doors.Setdoorstate (20, 1);
}
 
 
Room_Load{
 //check if door is closed or open
Doors.InitObject (20, oDoor.ID);
}
#153
@zurik
I think the trick was to set the action label to an empty string after an action was executed or the GUI gets disabled. The GUI gets disabled once a dialog starts, so we use this effect.

This is from the tumbleweed script, so there's a bit work left to adapt it to the 9verb GUI variable and function names.

Code: ags

function repeatedly_execute_always() {
  
  
  if (!IsGamePaused() && !Verbs.IsGuiDisabled()) {
  
    // Update Actionbar
    if (classicGui == false) {
      Verbs.CheckDefaultAction();

      // Update Actionbar after command is executed
      if (location_clicked != null && location_clicked.Length > 0) {
        if (location_clicked.IndexOf(">") > 0) temp_location = location_clicked.Truncate(location_clicked.IndexOf(">"));
        else temp_location = location_clicked;
      }
      else temp_location = "";

      if (IsInterfaceEnabled() || temp_location != location || location == "") {
        Verbs.UpdateActionBar();
        location_clicked = "";
      }
      Verbs.AdjustActionBarPosition();
    }
    // Doubleclick Timer
    if (dc_timer_run == true)
    {
      if (disableDoubleclick) {
        dc_timer_run = false;
      }
      else {
        dc_timer_click++;
        if (dc_timer_click >= dc_speed){
          dc_timer_click = 0;
          dc_timer_run = false;
        }
      }
    }
  }
}

#154
@zurik I'll have a look tomorrow

@Monsieur Ouxx
Hehe, thanks for the hint. I'll update the graphics in the future. How comes that you stumble upon this template almost exactly a year after it's release? (laugh)
Quote
We've just finished integrating the 9verb into the "custom save with screenshots" and bam, just at the same time you release it packaged.
Did I release something recently?

The main additions are double click running and the new save gui. And of course the whole code reorganizing and refactoring stuff, but technically these aren't features ;)
#155
The Rumpus Room / Re: Happy Birthday Thread!
Tue 03/04/2018 21:05:07
Wow, I'm still getting birthday wishes after all these years?!
Terrific! Thanks a lot!


... and one day I hopefully will be spending time here again (and with AGS in general)
#156
Hi,
as long as you know your ways around AGS, it should not be too hard. The whole GUI stuff is already pretty much modulized.
You need to export the optiongui module from the template, as well as the GUIs: gSave, gSaveConfirm, gLoad (and optionally gOptions).

In gOptions you might want to remove the Layout slider and the code behind it, since this is the only(?) template specific thing in this module.
#157
No, it is most certainly not your fault cat. The project was just too ambitious for the spare time we had.

But hey, if people are still remembering this game after all these years, we did at least something right ;)

The game files are still there btw. if anyone dares to continue the game (which is not me at the moment)
#158
Yup, every door is unique (nod)
#159
1. in addition to that, you can also use "any_click_on_door_special". In this function you can set a custom audioclip for each door. (Useful if you have a wooden and an iron door.)

2. Make sure you keep track of your door ids. It sounds like some doors share the same id.
#160
Sure, that is actually not a big deal. First you need to resize the gAction GUI to your game's screen resolution (eg 320x200)
Now you need to copy over this adjusted  AdjustActionBarPosition function to your template and make sure it is called in repeatedly_execute_always

Code: ags

void AdjustActionBarPosition() 
{
  int actionLabelWidth = GetTextWidth(ActionLine.Text, eFontTextOut) + 4;
  int actionLabelHalf = actionLabelWidth / 2;
  int xpos = mouse.x - actionLabelHalf ;
  int ypos = mouse.y - Game.SpriteHeight[mouse.GetModeGraphic(mouse.Mode)] - 4;
  
  if (xpos + actionLabelWidth >= System.ScreenWidth) xpos = System.ScreenWidth - actionLabelWidth;
  else if (xpos < 0) xpos = 0;
  
  if (ypos < 0 ) ypos = 0;
  
  ActionLine.X = xpos;
  ActionLine.Y = ypos;
  ActionLine.Width = actionLabelWidth;
}
SMF spam blocked by CleanTalk