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

Topics - Lewis

#41
Hi. Yeah, another problem. Sorry.

I'm trying to incorporate a two-button interface, which I've botched together via various examples of how to do it that have been posted on the AGS boards over the year.

Left-click interacts, right-click examines. Moving the mouse over a hotspot, object or character changes the cursor to 'interact'.

That's all working fine, but I'm struggling to get it working with the always-on inventory bar I have down the right of the screen. I'm pretty sure it's a problem with the repeatedly_execute function, I'm just not quite sure what I'm doing with it.

At the moment, when you hover over any part of the inventory (which exists past x=610), the mouse cursor flickers 'interact' mode on and off at about a billion frames per second. You can only select the inventory item if you click during one of the frames when it's in interact mode, so it doubles up as both a graphical bug and an interaction one.

I'm pretty sure this is my problem:

Code: ags

    // Mouse flickers between interact and pointer when over anywhere on the far right of the screen.
    
      if (mouse.x > 610)
  {
  if (!gInventory.Visible) mouse.Mode = eModePointer; }
  
    // End of problematic code


because it's specifying that it should turn the mouse to 'interact' whenever the mouse is over the inventory portion of the screen, not over individual inventory items. I've tried searching for what would be a better code, but to no avail.

But I'm not quite sure as to why it's flickering on and off in the way it does. Any help would be really appreciated.

Full rep_ex code below:

Code: ags
function repeatedly_execute() {

  if (IsGamePaused()) return;

  int mm = mouse.Mode;
  int nm;     // new mode
  Hotspot*h;
  Object*o;
  int lt = GetLocationType(mouse.x, mouse.y);   // what's under the cursor?

  if (mm != eModeUseinv) {
    if (lt == eLocationNothing) nm = eModeWalkto;
    if (lt == eLocationHotspot) {
      h = Hotspot.GetAtScreenXY(mouse.x, mouse.y);
      nm = h.GetProperty("def_curs");
    }
    if (lt == eLocationObject) {
      o = Object.GetAtScreenXY(mouse.x, mouse.y);
      nm = o.GetProperty("def_curs");
    }
    if (lt == eLocationCharacter) {
      nm = eModeInteract;
      
    }
    
    // The offending code is presumably in here.
    
      if (mouse.x > 610)
  {
  if (!gInventory.Visible) mouse.Mode = eModeInteract; }
  
    // End of problematic code

    if (nm != mm) mouse.Mode = nm;  // only change if necessary to not disturb animated cursors
  }
}
#42
I imagine this is going to become massively obvious after a night's sleep, so I apologise in advance. However, I just cannot get my head around the following.

I have a character who has two possible dialogue files for a particular room. The idea is that if you click on him at the start of the scene he'll have one conversation with you, but if you click on him later in the scene he'll have a completely different one.

But there's no obvious change of state between the two occasions. The scene starts, there's a bit of minor interaction, then there's a cutscene. It's after this cutscene that the dialogue upon interaction should change.

I've sat scratching my head for ages, battled with the forum's search function, and I'm none the wiser. I think my ability to parse logic has just exploded.

EDIT: Actually, that's confusing, let me simplify it.

Scene starts.
When player clicks on cChar1, dDialogue1 should start.
After this, there's a small puzzle that doesn't utilise inventory or anything.
Then a cutscene plays.
Now, when player clicks on cChar1, dDialogue2 should start.

Thanks in advance!
#43
Ugh, I hate to do this. And I'm sure we can get this thread locked soon.

However. As some of you may/may not know, when I'm not making AGS games, I'm working as a professional games journalist. I'm looking to write something about Adventure Game Studio, and it would be great to get Chris' input as the creator of this lovely toolset we all use.

But the only email address I can find for him bounced back.

Is there any chance anyone has any contact details for him? Or, Chris, are you reading? Could you hit me up via private message or something?

Thanks in advance!
#44
Hi everyone,

While by night I make indie games (or at least try to), by day I'm a games journalist. And I'm currently working on an investigation into people's attitudes towards the gaming habits of children.

http://beefjack.com/news/beefjack-wants-to-know-what-you-think-about-games-and-children/

I would appreciate it so much if you could take just a few minutes to follow that link and take the survey. It'd also be amazing if you could share it with people you know. We're interested not just in the views of gamers, but anyone, of any age, from anywhere. This could be really interesting.

Thanks, folks!
#45
MASKED
An experimental short-form adventure game.



By Lewis Denby. Music by Kevin MacLeod.

***DOWNLOAD***

---

Masked is a room-escape game infused with a dark, mysterious and ambiguous story. What is the cracked, crumbling room in which you find yourself? Who is the woman behind the mask? What is your history? And how, if at all, can you escape?

---

KNOWN ISSUES
While most inventory items disappear after being used, one key remains. It can be re-used, so does serve a purpose, but this did confuse one tester.
Can collect an inventory item in the final scene multiple times. [SHOULD BE FIXED]
#46
AGS Games in Production / [RELEASED] Masked
Tue 17/01/2012 21:43:25
UPDATE: It's out!

***

Introducing...

MASKED
a room escape game by Lewis Denby
with music from Kevin MacLeod




A while back I made a Half-Life 2 mod in three days, and Masked is an attempt to set myself another similar project, albeit giving myself a week this time around. All in my spare time, granted. I decided upon a room escape game, primarily because there are bloody thousands of the things and yet so few of them attempt to do anything interesting with the format. Masked is a short game, but it's infused with a rich and sinister story that you uncover as you progress through a sequence of light puzzles. It should be available by the end of the week. (Don't hold me to that.)

#47


Reality Falls is an idyllic place. At least, it is on the surface.

Yet beneath the green of the trees and the blue of the sky lies a seedy underworld â€" and you’re a part of it.

You’re Jack, and you’re a drug dealer. You act as a middleman between a major supplier and the guys who pedal the product on the street. But when an ordinary transaction turns weird, you find yourself caught up in a mystery that reaches beyond the confines of your black-market business and into the unusual nature of the town itself...


A first-person point-and-click adventure by games journalist Lewis Denby (with music from the ever-wonderful Kevin MacLeod), Reality Falls will be released when it is finished, which should hopefully be at some point in the first half of 2012. Follow development both here and at http://realityfalls.wordpress.com.

(Click images to enlarge.)





PROGRESS REPORT (updated 16th December '11):

Art: 40%
Sound: 65%
Story: 95%
Puzzles: 85%
Scripting: 40%

13th December 2011
Looking for a small group of people to test the game so far. See most recent thread update and PM if interested.
#48
Hello!

I'm having some problems with the if/else commands.

The situation is this.

The player has several inventory items at this point in the game. Most of the inventory items need to just bring up a "that won't work" kinda display. One of them is *almost* right, and needs to bring up a display saying as such. And then another one is the right one, which should initiate a dialogue.

The problem is that, when you use the correct inventory item, it displays the 'else' text *before* going on to initiate the conversation. In other words, the dialogue initiation works correctly, but it displays text beforehand that should only be displayed if another inventory item is used.

I'm probably missing something mega stupid with this, so apologies in advance.

Here's the code:

function cHomeless_UseInv()
{
 if (cJack.ActiveInventory == iTwenty1)
{dHomeless2.Start();
 cJack.AddInventory(iDirtyShoes1);}
 if (cJack.ActiveInventory == iMoney1)
{Display("I *really* can't dip into Mike's money for a homeless person, as much as I'd like to help."); }
 else Display("I don't think he'd appreciate that.");
}
#49
Hello!

I'm probably missing something really obvious here but I've been banging my head against a wall for ages with this, as well as scouring the internet. Anyway.

I require it to be so that a room change - activated by clicking a hotspot - only happens if the player has a certain inventory item. If not, a message is displayed instead.

I can get this to work, pretty much... except that the message STILL displays even when the player has this specific inventory item. It's just that it's displayed, and then the room change happens afterwards.

Code is below. What it's obviously doing is waiting for the script to finish before applying the room change, which means it displays the message as well. I want to get rid of the message as part of the HasInventory condition. Any help massively appreciated.


function hExit1_AnyClick()
{
 if (cJack.HasInventory(iPackage1)) {
 cJack.ChangeRoom(2);
 }
 Display("I shouldn't leave before I've spoken to Mike.");
}

***

UPDATE: Have solved this problem. Stumbled - via a completely separate bit of learning - on stuff about 'else'. Final code, in case anyone else is stuck with this sorta thing:

function hExit1_AnyClick()
{
  if (cJack.HasInventory(iPackage1)) {
  cJack.ChangeRoom(2);
  }
  else Display("I shouldn't leave before I've spoken to Mike.");
}
SMF spam blocked by CleanTalk