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

#1461
Quote from: Pumaman on Sat 25/09/2004 23:00:35
This has been discussed before; the general feeling was as Gilbot and Geoffkhan have said, that it was not really necessary functionality for an adventure game engine. Although it could be handy for a couple of minigames, the vast majority of players wouldn't use a joystick in an adventure game.
#1462
http://www.adventuregamestudio.co.uk/yabb/index.php?topic=12296.msg147022;topicseen#msg147022

Edit:

eEventGUIMouseUp/-Down are missing from the enum reference page.
#1463
I don't think you can change the z-order display of objects in the editor.

If you're talking about run-time, it's all in the baselines:

If object A's baseline is further down than the baseline of object/character B, object A is drawn in front of B.
By default, character and object baselines are at their coordinates, the bottom of the sprite.

So if object A is positioned below object B, A is drawn in front of B.
Now, if you want object A to be drawn behind object B, you can simply re-position the objects so object A's bottom is above object B's bottom or set a new baseline for object A ("Set baseline" button) and place it above object B's bottom or set a new baseline for object B and place it below object A's bottom. Or set a new baseline for both and make sure object A's new baseline is above object B's new baseline.

But keep in mind that the baselines also affect how characters are drawn. The same principle applies: If the character's baseline (also bottom by default) is below object A's baseline, he is drawn in front. If it's above object A's baseline, he is drawn behind it.
Just play around a bit and find out what works best for your situation.
#1464
Does this Knowledge Base entry still apply? If so, it should be noted in the manual.
#1466
Yes, you can use the GUI's "Controls" property:

Code: ags

gDialog.Controls[line + shift].AsLabel.SetText(text);
#1467
Do the sound files exist in the game folder?
Are you sure you're using the correct view number?
Is the region enabled?
Is the region event triggered at all? Put
  int soundnum = GetGameParameter(GP_FRAMESOUND, 20, 0, 6);
  Display("%d", soundnum);
in there to see if the Display command executes at all and to see if the new frame sound has been set.
#1468
Not directly. Depending on what you want to do exactly, you can use animated objects instead.
What effect are you trying to achieve?
#1469
The way your dialog_request function is set up now, ANY run-script command gives you the item if you have enough money since you don't check the parameter.
It should be

Code: ags

// main global script file

function dialog_request (int parameter) {

  if (parameter == 5) { // if function called via "run-script 5"
    if (GetGlobalInt(2) >= 15000) { // if player has enough money
      AddInventory (6); // give player inventory item 6
      SetGlobalInt (2, GetGlobalInt(2)-15000); // deduct cost from money
    }
    else { // if player doesn't have enough money
      Display ("you don't have enough money");
    }
  }
//else if (parameter == 78) { // if function called via "run-script 78"

}
#1470
You have to use StrComp or StrCaseComp to check strings:

Code: ags

 if (StrCaseComp(answer, "Yes") == 0) {


Check the manual.
#1471
QuoteCharacter.GetAtScreenXY(mouse.x,mouse.y).StopMoving();

Basically correct. But the so-called pathing isn't allowed in this case since there could be no character at this position and you can't use StopMoving on null.

Do this:

Code: ags

Character *thechar = Character.GetAtScreenXY(mouse.x,mouse.y);
  // declare a pointer named "thechar" of type Character and fill it with the character at the mouse position
if (thechar != null) thechar.StopMoving(); // if there's a character there, stop it moving


It's basically the same in the old-style scripting:

Code: ags

int thechar = GetCharacterAt(mouse.x, mouse.y);
if (thechar != -1) StopMoving(thechar);
#1472
Quote(Oh, by the way: Happy Birthday, strazer!)

Oh, didn't see that until now. Thank you! :)
#1473
QuoteI thought that if the speed is set at a higher number the character is supposed to move more slowly.

No, higher numbers mean faster walking speed.
A walk speed setting of 0 instantly moving the character to his destination is a feature.
#1474
For the web, PNG is preferrable, but in AGS, no matter what graphics file format you use for import, the resulting data is the same:
Sprites are NOT compressed for performance reasons and room backgrounds are compressed by an internal lossless algorithm.
#1475
I run Debian/testing and the editor and even games work with WINE (20050310-1.1).

Edit:

I just haven't managed to get keyboard input working in games (in WINE that is).

Here is my WINE config file if you're interested.
#1476
Quote from: Pumaman on Sat 05/03/2005 12:30:46
Yes, the script does not have a command to say "appear on the right hand edge" or anything.

It's not a bad idea though -- perhaps NewRoomEx could accept some special values like LEFT_EDGE and RIGHT_EDGE for the X co-ordinate that would use the room edges rather than having to specify a co-ordinate.

Tracker'd: http://www.adventuregamestudio.co.uk/tracker.php?action=detail&id=517
#1477
The default game speed SETTING is 40 game cycles (frames) per second.
The debug "Frames per second" displays the ACTUAL speed, so if you have extensive graphical stuff going on that can slow the game down, this displayed frame rate may drop below the set game speed.
#1479
*Faints
#1480
Just go to the Room settings, create a new object and set its image to one of the imported animation frames so you can more easily move it to where it looks correct.
Then, in the "Player enters screen (before fadein)" interaction of the room, add a "Run Script" action, then put this in there:

Code: ags

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

  SetObjectView(THEOBJECTNUMBER, THEVIEWNUMBER); // set the object to the view containing the animation frames
  AnimateObjectEx(THEOBJECTNUMBER, 0, 0, 1); // animate the object using loop 0 of the view you have just set it to


You might also want to set the object's baseline to the very top of the room so it's always displayed behind everything else.
SMF spam blocked by CleanTalk