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

#261
This is how the arrow keys for scrolling through the listbox items is done in the global script:

Code: ags

function on_key_press(eKeyCode keycode)
{
  if (gInvListBox.Visible == true)
  {
    if (ListBoxInv.ItemCount > 0)
    {
      if (keycode == eKeyDownArrow)
      {
        if (ListBoxInv.SelectedIndex < ListBoxInv.ItemCount-1)
        {
          ListBoxInv.SelectedIndex = ListBoxInv.SelectedIndex + 1;
        }
        else if (ListBoxInv.SelectedIndex == ListBoxInv.ItemCount-1)
        {
          ListBoxInv.SelectedIndex = 0;
        }
        selectedItemText = ListBoxInv.Items[ListBoxInv.SelectedIndex];
      }
      else if (keycode == eKeyUpArrow)
      {
        if (ListBoxInv.SelectedIndex > 0)
        {
          ListBoxInv.SelectedIndex = ListBoxInv.SelectedIndex - 1;
        }
        else if (ListBoxInv.SelectedIndex == 0)
        {
          ListBoxInv.SelectedIndex = ListBoxInv.ItemCount-1;
        }
        selectedItemText = ListBoxInv.Items[ListBoxInv.SelectedIndex];
      }
    }
  }
#262
Quote from: FormosaFalanster on Thu 25/02/2021 11:04:12
yes but

Spoiler
the door is locked
[close]
Ah, ok, You missed out something:

hint 1:
Spoiler
you will need a key to unlock the bedroom door
[close]
hint 2:
Spoiler
in the tower room you will find a crystal skull
[close]
hint 3:
Spoiler
the crystal skull contains a hidden item
[close]
hint 4:
Spoiler
you need somehow to break the crystal skull
[close]
hint 5:
Spoiler
use the magic wand on the crystal skull and get the key
[close]
#263
ah, right.
#264
Quote from: Crimson Wizard on Thu 25/02/2021 11:16:21
Are you sure this is not controlled by some custom script?
I'm sure no custom script is controlling this.
Strange thing is when I use a SimulateKeyPress one time, the focus is correct:

Code: ags

else if (keycode == eKeyTab)
{
  if (gInvListBox.Visible == false)
  {
    gInvListBox.Visible = true;
      
    if (ListBoxInv.ItemCount == 1)
    {
      if (Game.DoOnceOnly ("scrollInvListBox"))
      {
        Game.SimulateKeyPress (eKeyDownArrow);
      }
    }
  }
}
#265
When typing <labelname>.TextAlignment = " the dropdownbox with the text alignment values (for gui labels) shows an obsolete value (eAlignCentre):

Code: ags
eAlignCenter
eAlignCentre
eAlignLeft
eAlignRight


The properties-box in the editor shows correctly the 3 values:
Code: ags
Center
Left
Right
#266
Quote from: FormosaFalanster on Thu 25/02/2021 09:10:54
What to do after you

Spoiler
put the crystal ball on the altar? No idea where to go from there.
[close]

After that you might want to check out the
Spoiler
bedroom
[close]
#267
Info:
The game is keyboard only
It has a GUI containing a listbox, the GUI is hidden by default.
Pressing TAB opens up the listboxgui.
DownArrow and UpArrow are for scrolling through the list.
After pressing Return (Enter), the code checks what the current selectedItemText is and then displays a specific custom description string.

The issue:
But when the list is shown, pressing Enter doesn't bring up the description.
I first have to cycle one step through the list with DownArrow or UpArrow. After that, pressing enter does give the correct description. (If I close and re-open the listboxgui, pressing enter still does give the correct description)
So it looks like the listbox doesn't have the focus.

'Workaround':
To set the focus to the listbox I currently do the following:
- pressing TAB opens up a listbox.
- check if listbox ItemCount == 1. If so, run a Game.DoOnceOnly Game.SimulateKeyPress (eKeyDownArrow)
- pressing enter now does give correctly the listbox item description

Question:
Is there a (more delicate) way to set the focus to the listbox codewise?
#269
For some reason I fail to see why this is happening, so I hope someone here can explain this:

The roomscript code (as shown below) is working correctly: ENTER does load game.
(in this case the Global script has no (keycode == eKeyReturn) section in the on_key_press(eKeyCode keycode) function)

But:
The Global script code (as also shown below) is NOT working correctly: ENTER does NOT load the selected game.
(in this case the Room script has no (keycode == eKeyReturn) section in the on_key_press(eKeyCode keycode) function)

Room script:
Code: ags
function on_key_press(eKeyCode keycode)
{
  if (keycode == eKeyReturn)
  {
    if (gRestoreGame.Visible == true) 
    {
      if (lstRestoreGamesList.SelectedIndex >= 0)
      {
        RestoreGameSlot(lstRestoreGamesList.SaveGameSlots[lstRestoreGamesList.SelectedIndex]);
      }
    }
  }
}


Global script:
Code: ags
function on_key_press(eKeyCode keycode)
{
...
  else if (keycode == eKeyReturn)
  {
    if (gRestoreGame.Visible == true)
    {
      if (lstRestoreGamesList.SelectedIndex >= 0)
      {
        RestoreGameSlot(lstRestoreGamesList.SaveGameSlots[lstRestoreGamesList.SelectedIndex]);
      }
    }
  }
...
}


EDIT:
darn, this was why:

Code: ags

else if (IsGamePaused() || !IsInterfaceEnabled())
  {
    keycode = 0;
  }
#271
@andy:

The Branch is your initial weapon when fighting a guard. Without the branch the damage from a guard is higher, hence you die easier/quicker. You can also find a knife (recieve less damage) and a sword (recieve lowest damage). The best weapon is used during a fight, and a weapon is automatically used during a fight.

The pebbles are, as heltenjon said, for throwing at the door/gate. That us the second way to get in the castle. The other way is knocking on the door. When using the pebbles, a guard comes out, when knocking you run i to the guard in the hallway of the castle.
#272
You might want to check: Character.Solid
#273
For all the available options you can use, see the struct info in the lake script header.
Here's a small and very simplistic roomscript example (game res is 320x200):

Code: ags

// room script file
Lake swimmingPoolSurface;

function room_Load()
{
  swimmingPoolSurface.DefaultConstruct();
  swimmingPoolSurface.baseline = 150;
  swimmingPoolSurface.x = 50;
  swimmingPoolSurface.y = 100;
  swimmingPoolSurface.w = 100;
  swimmingPoolSurface.h = 50;
}

function room_RepExec()
{
  swimmingPoolSurface.Update();
}
#274
for AGS 3.5 or above, just replace the following in the Lake 1.4 script:

GetViewportY() with Game.Camera.Y
GetViewportX() with Game.Camera.X
#275
Quote from: heltenjon on Tue 02/02/2021 12:21:06
I cannot download from the earliest of the two and don't recall if I have been able to do so before. The second one is clearly also the beta - the file name is sq7mania2_betaversion.rar

Seems to be a duplicate.
Both AGS Databse pages of this game offer the exact same download.
Both download files have the exact same filesize and have the same upload date and time (as shown on both mediafire pages).

https://www.adventuregamestudio.co.uk/site/games/game/2446-sq7-mania-episode-2/
http://0s.o53xo.nvswi2lbmzuxezjomnxw2.cmle.ru/file/l6jvtqp8wp3rr36/sq7mania2_betaversion.rar/file
and
https://www.adventuregamestudio.co.uk/site/games/game/2472-space-quest-7-mania-episode-2/
https://www.mediafire.com/file/l6jvtqp8wp3rr36/sq7mania2_betaversion.rar/file
#276
As I'm working on the Blackjack table for my LSL1 EGA remake, and not being a blackjack pro myself, I stumbled upon some questions I can't seem to find an answer for when searching online. Hope someone here knows the answers.

My question is:
At what exact moment can you take Insurance, Split and Double down and
in what sequence and order will the complete flow goes?


Initially there are these 3 basic actions:

  • Bet
  • Dealer deals hand 1 to player
  • Dealer deals hand 1 to dealer

But there are some specific actions:

  • a) Insurance (dealer's up-card is an ace)
  • b) Split (after initial 2 cards have been dealt AND cards are identically ranked)
  • c) Double down (after initial 2 cards have been dealt AND combined value is 10 or 11)

Note: I'm aware that Split has two variants (a regular split and a Split With Double Down) but these are not related to my question.

Now let's assume the situation is as follow:

  • you've placed your bet,
  • you've got a pair of 5 (triggers Split and Double down),
  • dealer got an ace for the face-up card (triggers Insurance).

At what moment can you take Insurance, use Split and Double Down?
I've noted 6 possible flows (vertically shown) in the table below, but I don't know if the correct flow is among them:








v1:v2:v3:v4:v5:v6:
BetBetBetBetBetBet
Dealer deals card 1 and 2 of Hand 1 to playerDealer deals card 1 and 2 of Hand 1 to playerDealer deals card 1 and 2 of Hand 1 to playerDealer deals card 1 and 2 of Hand 1 to playerDealer deals card 1 and 2 of Hand 1 to playerDealer deals card 1 and 2 of Hand 1 to player
Dealer deals card 1 and 2 of Hand 1 to dealerDealer deals card 1 and 2 of Hand 1 to dealerDealer deals card 1 and 2 of Hand 1 to dealerDealer deals card 1 and 2 of Hand 1 to dealerSplitDouble down
SplitDouble downInsuranceInsuranceDouble downSplit
Double downSplitSplitDouble downDealer deals card 1 and 2 of Hand 1 to dealerDealer deals card 1 and 2 of Hand 1 to dealer
InsuranceInsuranceDouble downSplitInsuranceInsurance
#277
Have you changed the character's baseline somewhere?
#278
Code: ags

// room script file
bool matchesUsed = false;
bool fluidUsed = false;

function startFire()
{
  cEgo1.Say("Alight let's make a fire!");
  cEgo1.FaceDirection(eDirectionUp);
  oFire.Visible = true;
  oFire.SetView(VFIRE);
  oFire.Animate(0, 4, eRepeat, eNoBlock, eForwards);
}

function hFirepit_UseInv()
{
  if (cEgo1.ActiveInventory == iFluid)
  {
    if (matchesUsed == false)
    {
      player.LoseInventory (iFluid);
      fluidUsed = true;
      cEgo1.Say("I've put the fluid over the firepit, now I still need something to ignite it with.");
    }
    else if (matchesUsed == true)
    {
      player.LoseInventory (iFluid);
      startFire();
    }
  }
  else if (cEgo1.ActiveInventory == iMatches)
  {
    if (fluidUsed == false)
    {
      player.LoseInventory (iMatches);
      matchesUsed = true;
      cEgo1.Say("I'm going to need something to help start the fire. The wood is too damp.");
    }
    else if (fluidUsed == true)
    {
      player.LoseInventory (iMatches);
      startFire();
    }
  }
}
#279
Futurama: Who Said That!?!

AGS Database download page


A trivia party game containing 288 different quotes from the TV series.
It's up to you to guess per round by who of the five shown Futurama
characters a shown quote was said. There's 10 round per game, and it
can be played from 1 up to 10 players.






#280
Barahir's Adventure: Askar's Castle (Remake)

AGS Database download page

This is a remake of the 1993 Atari game Barahir, and is a fantasy themed,
1st-person perspective, point and click adventure game with a slight rpg
element in the form of a health system. The game has 8-bit graphics in a
320x240 resolution and uses flip-screen room transition.
You can play the game in 40 different palettes, which you can switch
between at anytime while playing the game.



SMF spam blocked by CleanTalk