Show Posts

You can view here all posts made by this member. Note that you can only see posts made in areas to which you currently have access.


Messages - Khris

Pages: [1] 2 3 ... 530
1
I'd convert everything to ogg / ogv in general. It's the only way to guarantee it'll play on every system, afaik.

2
Implementing general behavior on a per hotspot basis is not just tedious but not required.
Try this:

Code: Adventure Game Studio
  1. // in repeatedly_execute_always()
  2.   if (IsInterfaceEnabled()) {
  3.     Flashlight.SetFollowMouse();
  4.     cFlashlight_Dummy.x = mouse.x + GetViewportX();
  5.     cFlashlight_Dummy.y = mouse.y + GetViewportY();
  6.   }
  7.   else {
  8.     Flashlight.SetFollowCharacter(cFlashlight_Dummy);
  9.   }

In the Flashlight module, use

Code: Adventure Game Studio
  1. function late_repeatedly_execute_always() {
  2.   Flashlight.Update();
  3. }

3
It seems like the module is already using _always, otherwise it incidentally would work as desired by rongel, with the blocking action also blocking the module's GUI update.

So while one could store the click coordinates, then move the mouse in rep_exe to offset the scrolling, a much easier way seems to be to change the module so it's blocked, too.
It could in theory be as simple as moving all its repeatedly_execute_always code to its repeatedly_execute.

4
Yeah, it won't work for multiple inventories. Like I said, the module replaces the inventory item's image. It's also hardcoded to only look at the player's inventory.
And calling StackingInv.Setup a second time will just overwrite the first call. The invWindow parameter is only used to get ItemWidth and ItemHeight.

What you are looking for is much more complicated since it requires another way to show the numbers. And the only way to do that is to show a non-clickable GUI or Button on top of the inventory. This requires manually creating a suitable GUI element and much more code.

5
In order to solve this problem, just use Objects instead of Hotspots.

If the overlay doesn't appear, it's because MapField isn't 1 when the map room is loaded. It's the only possibility I can see.
If you upload your game files, I can take a look.

6
A hotspot's status is retained when you leave and re-enter the room, but an Overlay has to be re-created.
Which means when you go to the map room from some other room, MapField isn't 1, and the code you showed doesn't run.

Which brings me to my next question: you *do* have a separate global variable for each hotspot, right?

7
One way is to create an Array of DynamicSprites, one for each inventory item. That way the image can be changed arbitrarily at any time. When the player gains or loses an item, the image is redrawn: first, a copy of the original sprite is created, then the number is drawn on top.

Edit:
Here's a first version: download

1. In General Settings -> Inventory, make sure "Display multiple icons for multiple items" is set to FALSE.

2. Example usage (in game_start / first room_Load):
Code: Adventure Game Studio
  1.   StackingInv.Setup(invCustomInv, eFontWestwoodOutline, 15, true);
This will grab inventory item dimensions from invCustomInv, use the stated font, use white (color #15) as font color, and show a "1" for a single item (as opposed to only showing values >= 2)

Disclaimer: Since this version 0.1 of the module simply replaces the inventory item's graphic, the graphic used for eModeUseinv has to be manually changed to the original item graphic when an inventory item is selected, otherwise the quantity number is part of the cursor image. This is hard-coded using late_repeatedly_execute_always so might interfere with other things.

8
My guess is that built-in inventory click handling was hard coded to work with the standard Sierra interface.
Just use custom handling and eMouseLeftInv.

9
General Discussion / Re: Winzip or 7Zip
« on: 21 Sep 2018, 18:41 »
But, luckily all of that is irrelevant since we can just create self-extracting archives.

10
General Discussion / Re: Winzip or 7Zip
« on: 21 Sep 2018, 11:57 »
I really like 7zip because it lets you customize the explorer menu. And you can extract into a new folder in the current folder from said menu. Perfect.

11
as ags isn’t really set up for this kind of game
Not quite true; the engine is quite flexible and can easily deal with held down keys.
All you need to do is use repeatedly_execute and IsKeyPressed() instead of on_key_press().

12
I'm guessing you must've also sacrificed a goat and mumbled a spell, because those two things are completely unrelated.

13
AFAIK, the mouse cursor changing to the pointer graphic is hardcoded for PopupY GUIs, meaning the current cursor mode is retained.
The alternative is to implement the PopupY behavior yourself. Switch the GUI's visibility to "Normal, initially off", and use this:
Code: Adventure Game Studio
  1. int prevMode;
  2.  
  3.   // the following inside repeatedly_execute
  4.   if (mouse.y < 10 && !gInventory.Visible) {
  5.     gInventory.Visible = true;
  6.     prevMove = mouse.Mode;
  7.     mouse.Mode = eModePointer;
  8.   }
  9.   else if (gInventory.Visible && mouse.y > gInventory.Height) {
  10.     if (mouse.Mode == eModePointer) mouse.Mode = prevMode;
  11.     gInventory.Visible = false;
  12.   }

14
Declare the sprite and overlay outside your function.

Code: Adventure Game Studio
  1. DynamicSprite* sprite;
  2. Overlay* myOverlay;
  3.  
  4. function Bubble::Render(int x, int y)
  5. {
  6.   int radius = 10;
  7.  
  8.   sprite = DynamicSprite.Create(radius, radius, true);
  9.   // ...

Like dayowlron says, all variables / Pointers declared inside a function don't survive it ending.

15
You cannot change which function runs initially after a click at runtime, but you can of course change the button's behavior in other ways, namely by then calling other functions / code based on variables.

If you tell us what your goal is, we can tell you the best way to achieve it.

16
General Discussion / Re: Google Chromes fancy idesa...
« on: 30 Aug 2018, 10:23 »
Because the free quota expired.

17
General Discussion / Re: Google Chromes fancy idesa...
« on: 29 Aug 2018, 08:08 »
This has nothing to do with Chrome, which is a browser. They removed the button from their website three months ago.
In 99% of cases you can still right-click and select "Show Image" to get the same result though (and there's nothing Google can do to prevent this either).

18
Site & Forum Reports / Re: Bug reports
« on: 27 Aug 2018, 16:46 »
Looks like the Google Maps API key has expired; the profile page map is showing "for development purposes only".

19
I took a look and noticed that it's not just walking but also right-clicking while in the lower half that didn't work.
Which means it has to be a GUI that catches the click.
gCursorText is moved under the mouse when the y coordinate is > 120, so all you need to do is turn its Clickable property to "False".

20
Can you put your game files on google drive or something, so we can take a look?

Pages: [1] 2 3 ... 530