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

#1901
Please post the actual code you're using.
#1902
QuoteI need to script "wait for move to finish".

Commands that pause the script/game while they are being executed are called "blocking" in AGS.
Use the MoveCharacterBlocking function.
#1903
Quote from: Pumaman on Sun 02/01/2005 17:44:24Can you give an example?

If I choose "Text Scripting" -> "Character functions and properties" from the contents and click
  SetCharacterProperty
it jumps to its position on the page, but when I click
  View property
for example, it jumps to the top of the page. This happens with a lot of the new entries. As I said, it may be a quirk of the Linux program I'm using.

Quote from: Pumaman on Sun 02/01/2005 17:44:24The reason I haven't done this is that I didn't want to obsolete more functions than necessary, where there wasn't a clear benefit in making the switch.
However, you may be right -- it might be better to get it all over with now and change the lot, rather than coming back in a few months time and deciding to change them after all.

If you intended to change them anyhow, I agree now would be the time to do so.

Quote from: Pumaman on Sun 02/01/2005 17:44:24That would indeed be possible now; I'd have to rename PlaySound in order to do so, however. Perhaps this can wait until and if the global functions like PlaySound get objectised.

Ok, I didn't realize the function would have to be renamed. In that case it can probably wait.

Quote from: Pumaman on Sun 02/01/2005 17:44:24Unfortunately this is non-trivial to fix... this is one reason why it'd be nice to make everything object-based to clear the global namespace, but it's not something I'm too concerned about at the moment.

I see, no problem.

Quote from: Pumaman on Sun 02/01/2005 17:44:24
Well spotted -- this happens if a single array is bigger than 32 KB. I'll get it fixed.

Cool, thanks.
#1904
I think he tried to run acwin.exe by itself, which doesn't work. You have to run it with the game exe as parameter: "acwin gamename.exe"
or just rename the game.exe to ac2game.dat
#1905
QuoteQu'est ce que vous mean by thread?

Look it up it an dictionary. I honestly don't know how to describe it. It's this topic here we're discussing.

QuoteI can't quite visualise how animating the character will work because if you want to animate the character throwing a sword attached to the rope whilst in a boat to a lifebuoy...

Just draw animation frames containing the character, the rope and sword and animate the character with this animation. Just move the character to the place where the animation best fits into the background before starting the animation (so he hits the lifebuoy).
#1906
The "Edit this .AGSGame" is just for making an association with the AGS editor so you can double-click it to load the game into the editor:

Quote from: Pumaman on Mon 10/05/2004 21:54:42In the version of AGS that was distributed as a windows installer, it created an association for ".AGSGame" files so that you could double-click the "Edit this AGSGame" file to open the game in the editor.

You can create this association manually if you like, just set up .AGSGame files so that their association is:

c:\path\to\ags\agsedit.exe -shelllaunch "%1"

But isn't there a .dta file in the source that you can open with the editor?
#1907
You're very welcome. :)
#1908
Ok, here's how to do it with a custom GUI:

Code: ags

//put this where you want the name query to pop up
  //...

  // First, set gui's visibility to "Popup Modal"
  GUIOn(MYINPUTBOX);

  //...


Code: ags

// main global script file

function interface_click(int interface, int button) {

  if (interface == MYINPUTBOX) {
    if (button == 0 || button == 1) { // if pressed Enter key in textbox or clicked on OK button
      string buffer;
      GetTextBoxText(MYINPUTBOX, 0, buffer);
      if (StrLen(buffer) < 5) Display("Please enter a name at least 5 characters long.");
      else { // entered name is long enough
        StrCopy(character[EGO].name, buffer);
        GUIOff(MYINPUTBOX);
      }
    }
  }

}
#1909
Have you set the GUI's visibility to "Popup Modal"? This should pause the game as long as the GUI is displayed.

Edit:

Yeah, happens to me too. I'll experiment a bit more...

Edit2:

Ok, "Popup Modal" doesn't actually pause the script.
Wouldn't work anyway, since AGS can't run two functions at the same time, so you wouldn't be able to process any clicks on that GUI through the interface_click function.
Modal just means that no new functions will be called while the GUI is displayed.
However, the script you call the GUI with is executed until the end.
Since we have a while loop in there, it loops forever since we have no chance to change the text to meet the condition that quits the loop.
Just FYI. ;)
#1910
You mean the "OK" button?
Put this in the interface_click function in the global script:

  if (interface == MYINPUTBOX) {
    if (button == 0 || button == 1) { // if pressed Enter key in textbox or clicked on OK button
      GUIOff(MYINPUTBOX);
    }
  }
#1911
Change

  InputBox("What is your name?", buffer);

to

  // First, set gui's visibility to "Popup Modal"
  GUIOn(MYINPUTBOX);
  GetTextBoxText(MYINPUTBOX, 0, buffer);

I haven't actually tested this, so let me know if it works. :)
#1912
string buffer;
while (StrLen(buffer) < 5) {
  InputBox("What is your name?", buffer);
  if (StrLen(buffer) < 5) Display("Please enter a name at least 5 characters long.");
}
StrCopy(character[EGO].name, buffer);
#1913
General Discussion / Re: what is a good gui?
Fri 31/12/2004 13:11:21
Quotebut I dislike it because of other reasons, for example having to select Walk explicitly in order to walk somewhere, instead of having walk as the default action if the selected area isn't a hotspot, especially if it's a scrolling screen

Yeah, that annoys me too in a lot of games. It's easy to avoid, so please, people, start doing it.

QuoteUnfortunatley there hasn't been much discussing on this in this thread so far. I wonder if I should start a new thread over at Adventure-related stuff...?

Babar opened a similar thread about talking puzzles recently: http://www.adventuregamestudio.co.uk/yabb/index.php?topic=18419.0
#1914
string buffer;
InputBox("What is your name?", buffer);
StrCopy(character[EGO].name, buffer);

DisplaySpeech(EGO, "My name is %s.", character[EGO].name);
//or
Display("Your name is %s.", character[EGO].name);
#1915
Quote from: Radiant on Tue 28/12/2004 21:35:31
Little bug: GUIs are displayed under 'display' text, but over 'displayspeech' text.

Quote from: Rui "Puss in Boots" Pires on Tue 28/12/2004 22:11:06
Hmmm, but that one's been there for a loong time now, ain't it? I thought it even had it's own tracker entry.

http://www.adventuregamestudio.co.uk/tracker.php?action=detail&id=126
http://www.adventuregamestudio.co.uk/tracker.php?action=detail&id=256
#1917
Yes, it's possible, although it requires a bit of fiddling.

AGS doesn't support overlapping walkable areas natively, so you will have to use workarounds, turning on/off walkable areas on-the-fly.

Check out this template by Scorpiorus, for example:
http://www.geocities.com/scorpiorus82/stairs10.zip (right click/save as)
#1918
Without knowing how you've set up your views, but here's probably what you want:

Code: ags

  // script for character1: Use inventory on character
  if (player.activeinv == 3) { // if used gun item on character
    if (gun == 0) { // if character is in no-gun mode
      gun = 1; // turn gun mode on
      SetCharacterView(JACK, 18); // set view for animation
      AnimateCharacterEx(JACK, 1, 3, 0, 0, 1); // play animation blocking (whipping out gun)
      ReleaseCharacterView(JACK); // revert to normal view
    }
    else if (gun == 1) { // if character is in gun mode
      gun = 0; // gun mode off
      SetCharacterView(JACK, 18); // set view for animation
      AnimateCharacterEx(JACK, 2, 3, 0, 0, 1); // play animation blocking (putting away gun)
//      ChangeCharacterView(JACK, 1); // <-- View 1 is Roger, no?
      ReleaseCharacterView(JACK); // when you don't block the animation, this gets run immediately afterwards
    }
  }
#1919
QuoteThe animation is 640 by 480 and fills the entire screen rather than a portion of the screen.  When I call SetBackgroundFrame(1) it probably 'does' display the background but it it can't be seen because the last frame of the animation is in the foreground.  Could this be the case?

Absolutely! I should've read the thread more carefully, I didn't realize you were doing this.
It's generally not a good idea to use such large animation frames as the sprites (contrary to room backgrounds) are stored uncompressed in the game exe (for performance reasons) and thus increase the file size dramatically.
But if you really want to do it that way, why not turn off the object after the animation has finished?
I suppose since the object you've used is in the lower left corner, it covered all other objects you had in the room? In that case just set this object's baseline to the very top so that all other objects are always in front of it.

But since you want to animate only the character anyway, I suggest you simply animate the character, not fill the whole screen with an object animation.
#1920
Quoteprogram pointer is -189

This seems to be related to the free disk space check. Does he have enough free space on the hard disk (i.e. it's not full)?

We had a few reports about this error message recently.
You can try running the game with the engine of the latest beta:

Quote from: CJ* Possibly fixed EIP=-189 error happening on some systems.

Copy the acwin.exe from this release
http://www.adventuregamestudio.co.uk/yabb/index.php?topic=19369
into the game directory and run "acwin yourgame.exe".

Edit:

And please let us know if it solved the problem. Thanks.
SMF spam blocked by CleanTalk