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

#1861
The first obvious thing is, as I've told you already, that you check GlobalInt 1 twice in your if-clause:

if ((GetGlobalInt(1) == 0) && (GetGlobalInt(1) == 2)

A global integer can't be two values at once. It's either 0 or 2. I guess the second part is supposed to read

(GetGlobalInt(2) == 2)

?

As for your inventory, you say it works in room 1, 2 and 3 but not in 4. How can that be if your inventory is on a fixed-size gui?
How large is your gui? How large is the inventory area?
The default size for inventory slots it 40x22 pixels, so your width should be a multiple of that: You want 4 inv items visible at a time? Make the inventory area 4*40 pixels wide. To set a custom size for inventory slots, use the SetInvDimensions function.

To see how to implement inventory scrolling, I recommend searching the forum, and checking out some templates (unfreezes January 9th) and game sources: Airbreak, Exile, Keptosh.
#1862
Use http://www.2dadventure.com/ags/upload/upload.html to upload your image (please use jpg or gif format) and then enter
Code: ags

[img]http://www.2dadventure.com/ags/yourfilename.jpg[/img]

when composing your message.
#1864
The interface you're referring to is called "Verb coin". Try searching the forum for this topic.

I think there are templates for this on RedruM's site (http://www.freewebs.com/skimbleshanks/) but it's currently frozen. Try the site again in two days, it gets unfrozen the 9th of every month IIRC.
#1865
Normal background: Night (Frame 0)
Animated frame 1: Day (Frame 1)

Code: ags

  // script for room: Player enters screen (before fadein)
  //...

  SetBackgroundFrame(0); // disable background frame animation
  RawSaveScreen(); // save night background for restoring

  //...


Code: ags

  // script for interaction where you want the transition to happen
  //...
  
  int trans=99;
  while (trans >= 0) {
    RawRestoreScreen(); // restore night background
    RawDrawFrameTransparent(1, trans); // draw day background on night background at trans transparency
    Wait(1); // wait 1 gameloop (increase this to slow down transition speed)
    trans -= 1; // decrease transparency by 1
  }

  //..


Note: As the manual states, this only works with hi-color backgrounds.
#1866
Image Zoom - An invaluable tool for the Critic's Lounge

Tab Clicking Options - Customize what happens if you middle-click, double-click tabs or the tab bar.

FlashBlock - I don't mind ads as long as they are not intrusive. FlashBlock replaces flash animations with a play button so I can play them only if I want to.

BugMeNot - I hate having to register at some site I'll use maybe once to read an article. BugMeNot gets existing usernames/passwords from a database and fills them in for me.
#1867
Quote4. At this point, immediately press the power button, and hold it down until the computer turns off.

Or simply press the F8 key (repeatedly) before Windows XP starts loading to bring up the menu.  ;)
#1868
Quote* Changed Character.AddInventory/LoseInventory to take the inventory item object rather than the number. For example:
player.AddInventory(iSmallKey);

You need to update the example script for InventoryItem.ID in the manual.

Edit:

QuoteObject-ised GetHotspotAt/GetCharacterAt/GetObjectAt/GetRegionAt/GetInvAt to work like GetGUIAtLocation does.

Shouldn't we rename xxxAtLocation(int x, int y) to avoid confusion with future Locations?
Also, GetCharacterAtScreen sounds more intuitive to me than GetCharacterAtLocation.

I think we should find a consistent terminology to differentiate functions expecting screen or room coordinates.

I propose:

  GetLocationName -> GetNameAtScreen
  GetLocationType -> GetTypeAtScreen
  Mouse.SaveUntilLocationChange -> Mouse.SaveUntilTypeChange

  Character.FaceLocation -> Character.FaceScreen
  GetGUIAtLocation -> GetGUIAtScreen
  GetGUIControlAtLocation -> GetGUIControlAtScreen
  ListBox.GetItemAtLocation -> ListBox.GetItemAtScreen
  GetCharacterAtLocation -> GetCharacterAtScreen
  GetHotSpotAtLocation -> GetHotSpotAtScreen
  GetInvAtLocation -> GetInvAtScreen
  GetObjectAtLocation -> GetObjectAtScreen
  GetWalkableAreaAt -> GetWalkableAreaAtScreen

  GetRegionAtLocation -> GetRegionAtLocation or GetRegionAtPosition or GetRegionAtCoordinates

Or, if we'll call Locations "Markers" instead, we have:

  GetLocationName -> GetNameAtLocation
  GetLocationType -> GetTypeAtLocation
  Mouse.SaveUntilLocationChange -> Mouse.SaveUntilTypeChange

  GetRegionAtLocation -> GetRegionAtPosition or GetRegionAtCoordinates
  GetWalkableAreaAt -> GetWalkableAreaAtLocation

Obviously less functions to rename, but, again, I think xxxAtScreen is much more intuitive.

Edit 2:

Manual -> Tutorial -> Advanced room features -> Lighting effects:
"NOTE: Light levels affect characters only - they do not affect objects" is obsolete.
#1869
QuoteMy characters are twins, and I wanted one of them to pretend to be the other one.

This sounds to me like it could easily be achieved just changing the character's view.
Interaction editor: Character - Change character view
Then use the code I wrote above to check the character's current view.

If you're comfortable with scripting at all, I suggest using it from the start.
Eventually, some things you'll have to do via script anyway, since not all commands are available through the interaction editor.
It's more more organized since you won't have a mix of interaction editor and script and it's easier to reuse code snippets via copy&paste.
#1870
Which Windows version does he use?

Any chance you could update your game to the latest stable version (v2.62)?

- Try running the game from the root of the drive (c:/game/ instead of c:/games/lotsofagsgames/downloadedtoday/1/versiona/game/).
- Try (re-)installing the latest version of DirectX.
- Try running the game with a more recent engine.
#1871
Critics' Lounge / Re: Phantom Character
Thu 06/01/2005 19:37:55
The Phantom has skin-tight costume, doesn't he?
Then you shouldn't have much problems painting over Eric's character template.
#1872
Sorry to bring this up again, but would it be possible to reserve some obscure extended character instead? Since it won't have to be displayed anyway, there should be no problems with SCI fonts.
Just a thought.
#1873
Quote from: Rui "Puss in Boots" Pires on Thu 06/01/2005 18:22:10I had to replace a "GUIOff(guinumber);" by 18 lines, each turning off the GUI in question if the variable "guinumber" was that GUIs!

Beta 9 has a gui[] array, so you can do
  gui[guinumber].Visible = false;
#1874
I'm not certain but I think you don't have to use the colors from the AGS editor. AGS just maps the mask's palette slots to the different walkable areas, i.e. color slot 1 is used for walkable area 1 (blue), slot 2 for walkable area 2 and so on.
Maybe your blue is in a color slot higher than 16?
#1875
Quote from: SSH on Wed 05/01/2005 15:05:18
Be good if you could specify whether the dialog GUI goes away after an option is selected, or if it stays. Alternativley, specify a function to be called before and after any dialog

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

Quote from: SSH on Wed 05/01/2005 15:05:18
and it would be nice if a GUI could have a click handler rather than just GUI controls

http://www.adventuregamestudio.co.uk/tracker.php?action=detail&id=198 ?
#1876
Quote from: Pumaman on Tue 04/01/2005 19:52:21
Quote
However, I would prefer for "volume" to be the second parameter, so we need not specify a channel if we want to play a sound at a specified volume.

On the other hand, having to specify the volume would be annoying if you just wanted to loop the sound. Actually, thinking about it I can't see any ideal order for these parameters. Hmmm :P

Seeing as it would be called PlaySoundChannel, maybe the "channel" parameter shouldn't be optional, but passing -1 for example would choose a free channel like PlaySound.
Would it be too much trouble to implement the x and y parameters? I think it would be nice being able to pan the sound.
#1877
Quote from: Pumaman on Tue 04/01/2005 19:21:21

I agree about PlaySoundEx being nasty ... in fact, I hate "Ex" naming. But, adding extra parameters later would pose the same compataibility problem.
However, in this case I'm really not convinced of the need for the (x,y) parameters, so how about:
PlaySoundChannel(sound, optional channel, optional loop, optional volume);

Works for me.
However, I would prefer for "volume" to be the second parameter, so we need not specify a channel if we want to play a sound at a specified volume.
Because PlaySoundChannel(sound,,, 80); doesn't work, right?

Btw, would that volume affect the whole channel or only that sound?
I was thinking about how to implement "adjust volume with scaling" for frame sounds, so being able to play only the sound at the specified volume would make that possible.
Almost sounds like a suggestion...sorry. :P
#1878
Yes, you can move characters ignoring walkable areas with the "direct" parameter of the MoveCharacterBlocking function.
#1879
Quote from: Bombadil on Tue 04/01/2005 10:52:33
By the way, could you be so kind enough to post the image with indy-4 walkcycle or tell me where you got it? I kind of need it for a project I'm in. Thanks

You can find some walkcycles here.
SMF spam blocked by CleanTalk