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

#1841
Hm, maybe those random crashes are the result of out-of-bounds accesses to some array? That has been known to cause weird, hard to track down issues.

AGS v2.7 will have array bounds checking in addition to various other improved script checks, so try making a backup of your game and then load it with the latest beta. See what the compiler says when you try to save the game or what error messages you get when changing rooms.
#1842
Quote from: Pumaman
Quote from: SSHI suppose these are like read/writeable propertty schemas, so it could be doen through that.

Well, a cleaner solution here would be to make custom properties changeable at run-time, I think. It has been requested, but not a high priority.

http://www.adventuregamestudio.co.uk/tracker.php?action=detail&id=191

Quote from: SSHit would be nice if the GUI as a whole had a script, so that buttons which do NEARLY the same function can run in the old way (e.g. verb buttons on a SCUMM gui)

Why not keep using the interface_click function? I'm not aware of any plans to remove it?

Quote from: Gilbot V7000a
Quote from: Pumaman
Quote from: SSH
As well as having inventory items, it would be nice if AGS had (at least one) another general purpose item list, which could be used for spells, icon-based dialog options, etc. It would be in the editor like the inv item list where you could set a sprite, cursor hotspot and property schema for each item. Ideally, there would be a generalised tree system where "Item lists" was the top level, with Inv items being a special case and default on the list, but the user could add other lists themselves.

Yeah, that's a pretty good idea; I can see it coming in handy.

Or, if it can be made that you can set manually which character's inventory you're displaying on a specific inventory window in a GUI (WITHOUT the need to change to that character) that'll be okay too.

That would be a nice workaround for now, we even have a tracker entry already:
http://www.adventuregamestudio.co.uk/tracker.php?action=detail&id=245
#1843
Quote* Object-ised Overlay functions now that global pointers are supported.

How do we use the return value of Character.SayBackground now?

Quote* Added "Built in enumerated types" page to the manual, listing all the built-in enums.

Shouldn't this be under "Reference"?
#1844
QuoteIt appears that when I click the mouse (and the cursor mode is walk and the player is walking), that the player is set back to the first frame in the view.

Doesn't happen here (v2.62) with
  ProcessClick(mouse.x, mouse.y, GetCursorMode());
There's a very short pause while the pathfinder calculates the new path, but the last frame is retained.

Are you sure you aren't stopping the character beforehand or releasing/re-setting his view somewhere in there?
#1845
You're using the PlayMP3File function, right?
LFN is a long filename. Try shortening the filename.

AGS v2.62 removed the 25 character limit, don't know why it would still give that error message. You are using v2.62, right?

If you are using the normal PlayMusic function, what is the full filename of the file you're trying to use?
#1846
Quoteif you put an object on top of another object , it hides the top object.

It's all in the baselines. The default baseline of an object is its bottom-left corner.
So if the bottom-left corner of one object is further down than the bottom left corner of the other one, the former one gets drawn on top.
You can set object baselines manually in the room editor. Just set the baseline of the object that should be drawn on top higher (down) than the baseline of the one that should be drawn beneath.

Do you have pixel-perfect click detection enabled? If not, transparent parts of an object will obscure any objects beneath, hence not triggering their interactions where obscured.
#1847
QuoteStrazer: I used to use bugmenot, but I was never able to actually get a working username/password pair for any of the sites I tried. Have you had greater luck?

The few times I have tried it worked very well. It sometimes takes a few tries when sites closed some fake accounts.
#1848
Which version of AGS was the template made with?
It doesn't show up for me in either AGS 2.62 or 2.7 Beta 10. Please try giving the file a shorter name when creating it.
#1849
Yeah, looks like that GUI.GetControl(int number) would come in handy.
#1850
AGS is case-sensitive, so it's
  Display("Message");
What error message did you get?
Where did you put the script?
#1851
Yes. ;)
#1852
Yes. :)
#1853
The internal FindGUIID function is included in the autocomplete pop-up.

So are all member variables of GameState, unless that's intentional.

QuoteWell, there is a wider issue of whether all functions that take a CHARID as a parameter should now take the actual character object instead; what do people think?

Ah, now I get it. Sorry SSH, I thought you were talking about making the function a member of GameCharacter.
I'm for objectising.
#1854
Glad I could help. :)
#1855
Then maybe try this after all:

Code: ags

if ((GetHotspotAt(mouse.x, mouse.y)) || (GetCharacterAt(mouse.x, mouse.y)>=0) || (GetObjectAt(mouse.x, mouse.y)>=0)) { //If the mouse is hovering over something...
    overhotspot = 1; //Then the variable is set to one.
    }
  else{ //If the mouse isn't hovering over something...
    overhotspot = 0; //I think you get the idea.
  }
#1856
QuoteBTW, you can't use F8 if your keyboard is a USB keyboard instead of a PS/2 keyboard

I think that depends on the mainboard/BIOS of your PC. I think some newer ones let you use USB keyboards in the BIOS setup.
#1857
(removed)

I think the if-clause is missing two brackets, so the logic gets screwed up:

if ((overhotspot == 0) && ((GetHotspotAt(mouse.x, mouse.y)) || (GetCharacterAt(mouse.x, mouse.y)>=0) || (GetObjectAt(mouse.x, mouse.y)>=0))) { //If the mouse is hovering over something...
#1858
The problem could be that the variable "overhotspot" isn't updated correctly.
Could you please post the contents of your repeatedly_execute function? I suspect it's there that overhotspot is assigned its value.

Edit:

Btw, you should update the code with proper indentation to make it more readable:

Code: ags

function on_mouse_click(int button) {
  // called when a mouse button is clicked. button is either LEFT or RIGHT
  
  if (IsGamePaused() == 1) {
    // Game is paused, so do nothing (ie. don't allow mouse click)
  }
  else if (button==LEFT) {
    if (overhotspot == 1) {
      if (GetCursorMode() == MODE_USE) {
        ProcessClick(mouse.x, mouse.y, MODE_USE);
      }
      else if(GetCursorMode() == MODE_USEINV) {
        ProcessClick(mouse.x, mouse.y, MODE_USEINV);
        SetCursorMode(MODE_USE);
      }
    }
    else if(overhotspot == 0) {
      ProcessClick(mouse.x, mouse.y, MODE_WALK);
    }
  }
  else if (button==RIGHT) {
    if(GetCursorMode() == MODE_USEINV) {
      SetCursorMode(MODE_USE);
    }
    else {
      ProcessClick(mouse.x, mouse.y, MODE_LOOK);
    }
  }

}
#1859
It's possible the GUI template you use internally switches cursor modes but uses the same cursor graphic for all of them.
If you click on something in Walk mode, nothing will happen. Interactions are only triggered by the other cursor modes.
#1860
QuoteHow about "GetCharacterByPosition"?

Nah, that sounds like the Position refers to the character's position, not the screen position.

Quote
QuoteI think "GetxxxAtXY" or "GetxxxAtCoords" is meaningful and clearest

'Coords' isn't a bad idea ... we should really have some way to distinguish GetRegionAt because it takes room co-ordinates, as strazer says. I'm not sure what would be best for that.

But XY, Coords or even Position wouldn't be any different than Location. No indication of what kind of coordinates. How about AtScreenXY and AtRoomXY?
StrLen(ScreenXY) = StrLen(Location) ;)
SMF spam blocked by CleanTalk