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

#261
You should use:
Code: ags
tInv = inventory[game.inv_activated];


...because checking what is under the mouse isn't 100% reliable (I'm not sure that is the issue here though)

Quote from: bx83 on Mon 29/07/2019 12:10:51
But why don't the lines:
Code: ags

      if (player.ActiveInventory==null) {
        if (tInv.IsInteractionAvailable(eModeInteract)) {
          tInv.RunInteraction(eModeInteract);

do anything? Surely they should make the inventory item you just right-clicked on the ActiveInventory?

At a guess, you aren't ever setting player.ActiveInventory to anything. If you are handling the clicks yourself you need specifically set it.
#262
I don't think there is. Maybe this is because this editor component doesn't support line numbers (or doesn't support them without also enabling breakpoint controls - perhaps this is a separate problem), or just because no-one ever turned the line numbers on. Dialog scripts preserve leading and trailing whitespace, but maybe when dialog commands are substitued for actual script commands there is a risk of line numbers changing.
#263
You can try disabling the managed cursor speed by setting this in the config file:
Code: ini
[mouse]
control=never
#264
Quote from: Crimson Wizard on Thu 11/07/2019 15:33:32
Quote from: notarobotyet on Thu 11/07/2019 14:03:46
Are sound clip and audiochannel volumes always relative to the global volume? In other words, if I have my global volume set at 70 and I do Audiochannel.Volume = 40, will the volume of Audiochannel be 40, in absolute terms, or 40% of 70%

Unfortunately this is silly, but they all are absolute values. If you want relative values you'd have to script this on your own, keep track of master volume and adjusting channels accordingly.

The manual implies that it is 40% of 70%:
https://adventuregamestudio.github.io/ags-manual/System.html#volume

Surely if they were absolute then the volume wouldn't change at all when this value was adjusted?
#265
Configure your anti-virus programs to not scan your game development folder. If executables aren't signed then anti-virus can only guess what it is. It'll see executable code with a payload attached to it, so sometimes you will get false positives. You would have to submit it to Kaspersky if the detection is incorrect.
#266
Because the context would be subjective. Someone would click it and then be reported to the police for committing a hate crime.
#267
I can't really imagine how the built-in 'alternate' option would work in practise, it sounds like it is alternating but that the result isn't very usable.
AGS 3.5 does already have support for a custom say implementation, where speech calls are redirected through an extender function. I know of one person who has used it and it seemed to work OK, although there are still some restrictions about using it.

https://www.adventuregamestudio.co.uk/forums/index.php?topic=57133.msg636605743#msg636605743
#268
Does it only look wrong because there is no damping / dead zone on the camera?
#269
The Rumpus Room / Re: Name the Game
Tue 25/06/2019 16:43:20
Spot on.
#271
The Rumpus Room / Re: Name the Game
Mon 24/06/2019 09:53:56
MicroLeague Waxing
#272
Here is a non-blocking version that doesn't use the background, it isn't particularly readable and the starting values are hard-coded but you might want to compare the effect to your orginal one. As a concept though, this doesn't care how many rooms you have. It just just fades in where you are and fades out where you are not. If you go with this approach it is probably easier to also have each room on its own so you can process each room separately (instead of including a faded version in each object).

Code: ags
int room = 0;
int ROOM_MAX=1;

function room_Load()
{
  oLivingRoom.Visible = true;
  oLivingRoom.Transparency = 0;
  oBedroom.Visible = true;
  oBedroom.Transparency = 100;
}

function region1_WalksOnto()
{
  room = 1;
  object[0].Baseline = 2;
  object[1].Baseline = 1;
}

function region2_WalksOnto()
{
  room = 0;
  object[0].Baseline = 1;
  object[1].Baseline = 2;
}

function room_RepExec()
{
  for(int i = 0;i <= ROOM_MAX;i ++)
  {
    if (i == room)
    {
      if (object[i].Transparency > 0)
      {
        object[i].Transparency = object[i].Transparency - 2;
      }
    }
    else if (object[i].Transparency < 100)
    {
      object[i].Transparency = object[i].Transparency + 2;
    }
  }
}
#273
Quote from: notarobotyet on Fri 21/06/2019 16:46:38
So in other words, if I remove the whole fade and leave only these lines just for the sake of troubleshooting, what I see is the living room with a bunch of holes shaped like my walk-behind areas, through which I can see the "greyed out" living room
It sounds like an internal issue with the rendering, rather than something intentional. Can I just check, which renderer is your game set to use? When the game is running you can press CTRL+ALT+V to display this information.

Quote from: notarobotyet on Fri 21/06/2019 16:56:45
Quote from: morganw on Fri 21/06/2019 16:29:10
This sounds fine, I'd just add that:

  • Technically, you don't need a background frame at all if you create the room entirely from objects - I guess it just depends on the visual effect you want to achieve and whether there is a benefit to keeping it
That's what I was thinking too, I might give it a try and simply not use backgrounds at all, but an issue that I'm anticipating is that I would have to switch their baseline value all the time so that one of them has a value of 1 and the other is 2, for example, in order to control which one is on top of the other. Seems very doable though!
It probably depends exactly how the rooms join together and what overlaps, but yes, modifying the baseline values to be slightly re-ordered is probably not too hard compared to running the transparency changes.

Quote from: notarobotyet on Fri 21/06/2019 16:56:45
Quote from: morganw
  • I've never tweened transparency to know if the tween module works around the rounding issues in the transparency value. Typically you can't do things like Object.Transparency ++ so when modifying this value manually I usually do it on alternate game loops (i.e. change it ever-other time the repexec function is called)
I thought the whole purpose of the tween module was precisely to allow you to do non-blocking transparency fades and stuff like that? I haven't used it yet though, so I'm not really aware of its limitations and issues.
You don't have to use it just to get a non-blocking fade, it just means that you need to implement the fade as a gradual change that takes places over multiple executions of your scripts, not one that blocks later execution of the script. So I typically try to avoid any kind of loop that blocks, like this:

Code: ags
while (oLivingRoom.Transparency < 100) {
    oLivingRoom.Transparency++;
    Wait(1);
}

Using the tween module is a good way to avoid this type of blocking, it is just that for the transparency property the returned value is dependent on the blocking nature of this loop and I don't know for certain that the tween module works around this. It probably does, I just can't say for sure.

Quote from: notarobotyet on Fri 21/06/2019 16:56:45
Quote from: morganw
  • You might want to generalise this concept so that instead of hard-coding what to do for each room, you just track which room you are in and then look to fade out all other rooms
Depends on how often we're going to use this idea, it definitely might be worth the trouble. But if we end up using it in just 2 or 3 settings and everything else are regular room transitions, it's probably quicker to just code the behaviour for each room and moving on to other things. We'll see, we're still in the very early stages of level design!
Yes, definitely. Unless this is for some government contract, if you can read it back and understand it, that is good enough!
#274
This sounds fine, I'd just add that:

  • Technically, you don't need a background frame at all if you create the room entirely from objects - I guess it just depends on the visual effect you want to achieve and whether there is a benefit to keeping it
  • I've never tweened transparency to know if the tween module works around the rounding issues in the transparency value. Typically you can't do things like Object.Transparency ++ so when modifying this value manually I usually do it on alternate game loops (i.e. change it ever-other time the repexec function is called)
  • You might want to generalise this concept so that instead of hard-coding what to do for each room, you just track which room you are in and then look to fade out all other rooms
#275
Quote from: notarobotyet on Fri 21/06/2019 13:57:14
Would this also avoid any objects / items in the room that are not part of the background (say, those flower pots in the front) being covered by my Big Room-Sized Background Object?
Yes, if the baseline of other objects is just set normally, or is set to a less extreme value than the 'background' object, they should appear in front of the 'background' object.
#276
For an Object you'd override the walkbehind baseline, not the option to ignore it, but just set it to an extreme value where the object is always treated as being 'behind' everything else. I'm not sure about GUIs, z-order is documented as working within the context of other GUIs.
#277
I'd probably try the same approach, but with room objects instead of GUIs. This would also let you call Object.MergeIntoBackground to permanently disable an area and remove the overhead of the object if you no longer needed it.

Edit: hopefully the merge would use the current transparency state, I've never tried this
#278
The Rumpus Room / Re: The Movie Quote Game
Tue 18/06/2019 11:46:24
Correct.
#279
Quote from: VampireWombat on Mon 17/06/2019 13:40:04
Have to make sure the gif is the type that replaces each frame but that shouldn't be too hard.
This is quite important as the if not using AGS 3.5 the GIF decoder in the Editor is part incomplete and part broken.
<-- 3.5     3.4 -->

[imgzoom]https://user-images.githubusercontent.com/14958747/51088409-1ac19a80-1757-11e9-97aa-98779e69de7a.gif[/imgzoom]

Also, you may find you have to preload the sprites before displaying them in order to make sure that a full sequence runs without any stuttering. If this is fullscreen and/or high resolution then I think I'd stick with an actual video (if game uses integer scaling then the pixels in the video should remain the correct shape) or the tween module + new camera system.
#280
The Rumpus Room / Re: The Movie Quote Game
Sun 16/06/2019 22:12:12
"Never rub another man's rhubarb"
SMF spam blocked by CleanTalk