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

#1581
You're welcome! :)
#1582
Quotecharname == ""

This is not allowed. You have to use StrComp/StrCaseComp to check string values.
#1583
QuoteIt would be nice to have strings similar to C#/VB6 instead of using StrCpy(), etc.

http://www.adventuregamestudio.co.uk/tracker.php?action=detail&id=258
#1584
QuoteHoping that CJ didn't add it without me noticing

You can check the status of a particular feature on the bug tracker: "For" loops
#1585
SetCharacterView is for setting the character view temporarily so you can animate him.
If you want to permanently change his normal view, use ChangeCharacterView instead.
#1586
It think the example code for RunInventoryInteraction in the help file is what you're looking for.
#1587
QuoteWhat was the bit at the start of the original script about...

This and the extra brace at the end are the header and footer of the room's repeatedly execute function. They are generated automatically and you won't see them if you open the script through the interaction editor, only when opening the whole room script via the "{}" button.
I wrote them in my script example to show where to paste it.

Quote
The "DisplaySpeech" makes the mouse pointer go into thinking mode (can't tell the player character to do anything). It's not that bad because the player character will still move and do what he was doing before the "DisplaySpeech", but it would be nice to fix if possible.

If you only want to disable the wait cursor for DisplaySpeech commands, you could define a custom function that you can call instead of the regular DisplaySpeech command:

Code: ags

// main global script

function myDisplaySpeech(int charid, string text) {
  int oldmode = GetCursorMode(); // save current cursor mode
  SetCursorMode(7); // change cursor mode to wait
  SetMouseCursor(oldmode); // change wait mode cursor graphic to previous mode
  DisplaySpeech(charid, text);
  SetDefaultCursor(); // change wait mode cursor graphic back to default sprite
  SetCursorMode(oldmode); change cursor mode back to previous mode
}


Code: ags

// Main header script

import function myDisplaySpeech(int charid, string text); // to make function available in room scripts
#1590
I'm bumping this so you don't forget. :)

I support this, it would also make it easier for beginners to paste our suggestions in their room scripts without having to create the interaction first.
#1591
Hm, you're working with RawSaveScreen/RawRestoreScreen in your strategy game, right?
Maybe the frame is set but overwritten with the previously saved raw copy of the old frame?

If that's not it, without the game in front of me I'm out of ideas.
#1592
I'm sure it's just a matter of fixing the coordinates.
Please post the script you have now so we know what coordinates you want.
#1593
Yes, graphical variables are different from global variables. They are not interchangeable.

To access graphical variables (used in the interaction editor) in script, use Get/SetGraphicalVariable.
You can't access GlobalInts (used in script) in the interaction editor.

Please don't dig up old threads.
#1594
Try this:

Code: ags

// main global script file

int guimb; // stores mouse button clicked on gui

function on_event(int event, int data) {
  //...

  if (event == GUI_MDOWN) { // if mouse clicked over a gui
    if (IsButtonDown(LEFT)) guimb = LEFT; // if left mouse button pressed, store it in variable
    else if (IsButtonDown(RIGHT)) guimb = RIGHT; // if right mouse button pressed, store it in variable
    else guimb = 0; // if pressed any other buttons, reset variable
  }

  //...
}

function interface_click(int interface, int button) {
  //...

  if (interface == NAMEOFGUITHEINVENTORYISON) {
    if (button == NUMBEROFTHEINVENTORYCONTROL) {
      if (guimb == RIGHT) // if right mouse button was pressed
        on_mouse_click(RIGHTINV); // call on_mouse_click function for RIGHTINV action
    }
  }

  //...
}


Note that for this particular script to work, the on_mouse_click function has to be located before the interface_click function in the global script so that the latter can call the former.
Or you can define a custom function that you can call from both on_mouse_click and interface_click. That is in fact the safest and recommended way.
#1596
I can't stress enough how much I love the script module system. Easily my favorite new feature. Thanks again, CJ!

How about a Disable/Enable button in the module manager to help in debugging conflicting modules? I know you can save them to disk, remove them and later load them again, but that's a bit tedious IMO.
#1597
General Discussion / Re: About soundfonts
Sun 06/03/2005 20:52:34
QuoteThe first SoundBlaster to use soundfonts is, as far as I know, the SB Live! Series.

I think the old SB AWE series supported soundfonts as well. I had one but didn't use this feature.

QuoteDoes anybody know of any free solutions?

For Linux, there's Timidity, a software synthesizer supporting soundfonts.
There's also a Windows port called twsynth.

Haven't used either, since I have a SB Live!.
#1598
Are you sure you had saved the room beforehand?

If you re-import a room background of a different size than the current one, all room areas will be reset. This is by design.

Edit:

Just a note to say that AGS v2.7 RC2 now displays a confirmation dialog with the ability to cancel.
#1599
Use character[NAME].y
#1600
QuoteSince I'm here, I'm curious as to whether there's a room limit. There's nothing about it in Game Statistics.

You can have up to 1000 rooms, but any numbered >300 will not have their state saved when the player leaves the room.
SMF spam blocked by CleanTalk