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

#881
roomedit.clb is part of AGS, a file that it requires, and it is included in the full distribution.

Are you running agsedit.exe from inside the zip file? You have to extract ALL files from the zip before you can run AGS.
#882
AGS Beginners FAQ

Or search the forum for "run-script" and/or "dialog_request".
#883
Quote from: Ashen on Mon 03/10/2005 00:21:08
It just seems a bit of a waste of time to be processing the animations, when you can't see the Inventory anyway.

Problem is, any character could have the item in his inventory and for all I know the user could have this character's inventory displayed on any GUI. It seems quite messy to automatically check all GUIs for an InvWindow containing the item. On the other hand I don't want the user to have to edit the module or specify what InvWindows to check or something.
So I think for simplicity's sake I'll leave it the way it is. I don't think the animation routines use that many resources anyway. If you disagree, feel free to modify the module to your needs.
#884
Quote from: Ashen on Sun 02/10/2005 22:51:40Wouldn't this mean the module won't work if the Inventory GUI is popup modal?

You're absolutely right. Thanks for the hint. I use it in my own game which has a non-modal inventory GUI, that's why I haven't noticed it.
Fixed version 0.90b is now up (just commented out that line).

Quote from: Candle on Sun 02/10/2005 22:56:08Where do I can the script part to use it? I can't seem to find any info on how to use it in the help file or I'm over looking it.

This module provides script functions written by me. Such script module functions are not built into AGS itself, therefore cannot be found in the manual.

To use the script module, import it into your game, as Ashen said, via menu "Script" -> "Module manager...". Then you have access to the functions detailed above.
Where you have to put the functions depends on when you want the animation to start/stop. If you want the torch to be animated right from the beginning of the game, put InvItemAnimation.Start in your game_start function. You could also, for example, start the animation only if the torch has been lit first (using lighter on torch or whatever).
#886
Also, if you try to use a beta version, note that only files modified from the the latest stable version are included. So you have to exteact AGS v2.71 Beta over an existing AGS v2.7.
#887
Line breaks in strings are done with the [ character.
I take it the problem is doing a line break in the editor? I don't know if that's possible.
You can of course just break up the string like this:

Code: ags

string message;
StrCopy(message, "Invalid parameter 'topic' to function 'ScrollingDialog::GetText'.");
AbortGame("%s[Range: 0 to %d[Value: %d", message, eScrollingDialog_MaxTopics, topic);
#888
I think it will take me a while longer because I've noticed that the template isn't completely faithful to (VGA) Loom (no queuing of notes, label displaying notes, colored staff animations and much more).
I will work on it on and off but I'm afraid I can't promise any timeframes, sorry.

Edit:

Btw, I'm not working on this anymore.
#889
Quote from: Pumaman on Wed 28/09/2005 20:05:34Yeah, it is about time I looked at those, I'll consider it.

Thanks!
Another thing I forgot to mention (again) is repeatedly_execute in room scripts. I think it's a bit inconsistent and sounds so easy to do, seeing as repeatedly_execute_always already works.
Wasn't it supposed to be fixed already?
#890
You probably have "When interface disabled: GUIs grey out" selected in the General settings. That means that whenever your game is paused, all your GUIs/GUI controls will be greyed out.

So either remove the cause for the pausing/blocking (code?) or set "When interface disabled" to "GUIs unchanged".
#891
Quote from: Janik on Wed 28/09/2005 20:20:20
I timed myself walking somewhat quickly, and it takes about 1.2 seconds per step. If I'm limited to 20 frames per step, that means the effective frame rate of the walking animation would be 15 or so frames per second - that's probably low enough to look less than fluid.

Have you tried it? You'll be amazed what you can do with 15 frames.


10 frames

(made by big brother)
#892
Have you started your game using the "Empty game" template? If so, the sprites used by the built-in inventory GUI are probably missing, causing the crash.

So you have to use a custom inventory GUI or simply start your game using the "Default game" template.

Edit:

What you can also try is recreating the missing sprites:
Import 5 sprites or use existing ones, right-click each of them in the Sprite manager and select "Change sprite number...". Give them these numbers:
4 - Up arrow
1 - Down arrow
2041 - Look at
2042 - Select
2043 - OK/Close
#893
Glad I could help. :)
#894
Quote from: Mr_Threepwood on Wed 28/09/2005 02:00:42The big problem though is there doesnt seem to be a way to check the players inventory within dialog scripts.

That's what the "run-script" dialog script command is for. Try this:

Code: ags

// dialog script file

@S  // dialog startup entry point
run-script 21
//...

@3  // option 3
run-script 87
//...



Code: ags

// global script

function dialog_request(int parameter) {

  if (parameter == 21) { // if "run-script 21" used (topic 1 startup entry point)

    if (player.InventoryQuantity[3] == 0) { // if player doesn't have inv item #3 (anymore)
      SetDialogOption(1, 4, eOptionOff); // disable option 4 in topic 1
    }

  }
  else if (parameter == 87) { // if "run-script 87" used (topic 1, option 3)

    if (player.InventoryQuantity[3] > 0) { // if player has inv item #3
      SetDialogOption(1, 4, eOptionOn); // enable option 4 in topic 1
    }

  }
//else if (parameter == xx) { // and so on, for other run-script commands

}


Not sure how/when/if you want what dialog options to dis/appear so you may have to tweak it a bit.
#895
I've taken a look at the Loom template.

The mouseover stuff is done from within each room's repeatedly execute. You probably forgot to add your objects/hotspots to the code.
Go to Room Editor, load (double-click) "room 1", press the "i" button and double-click the "Run script" entry under Repeatedly execute. You have to add mouseover script for your stuff in there.

The template is kind of messy since it was made with an older version of AGS that probably didn't support things like custom properties and so on, so you have to script what sprite to display for each object/character/hotspot.
I've just started converting everything to AGS v2.7 and simplifying it so you may just want to wait a few days.
#896
To start a new game you have to restart the editor, you can't do it from the menus. (See tracker entry)
#897
You can export/import pointers just like variables:

Code: ags

// main global script

GUI *myGui; // define pointer for use in global script
export myGui; // export pointer for use in room scripts


then

Code: ags

// main script header

import GUI *myGui; // import pointer for use in all rooms


or

Code: ags

// room script

import GUI *myGui; // import pointer for use in this room


I hope I have understood you correctly.

Edit:

Quote from: Ashen on Tue 27/09/2005 13:56:47
So, I know how to make a GUI pointer (GUI *myGui;), and I know that if I put that in the script header, the myGui pointer will be available in every room/script.

If you define variables/pointers in the script header, a seperate variable will be created for the global script and every room script. So if you change the pointer in the global script, it doesn't affect the pointer in the room script.
#898
True, I didn't mention that as not to confuse people any more than I probably already did. :)

Btw, for anyone stumbling across Gilbot's code, contrary to the Display function, Character.Say allows only a single parameter, so you would have to do

Code: ags

  //...
  string tempstr;
  StrFormat(tempstr, "I'm number %d!", i);
  character[i].Say(tempstr);
  //...


or, in the upcoming AGS v2.71:

Code: ags

  //...
  String tempstr = String.Format("I'm number %d!", i);
  character[i].Say(tempstr);
  //...
#899
Quote from: Mr_Threepwood on Tue 27/09/2005 04:13:50is the Character[charName].Say("String") the way you would normally go about making a character say something if you want them to say different things each time they look at something?

First up, to clarify:
For backwards-compatibility reasons you can still do

  character[CHARNAME].Say("Blah"); // i.e. character[ROGER].Say("Blah");
or
  character[NumberOfCharacterAkaID].Say("Blah"); // i.e. character[2].Say("Blah");

but the recommended way since AGS v2.7 is
  cCharacterscriptname.Say("Blah"); // i.e. cRoger.Say("Blah");

You can also use
  player.Say("Blah");
if you want the player character to say something, regardless of what character that may be at the moment (think multiple player characters like in Day Of The Tentacle).

Quote from: Mr_Threepwood on Tue 27/09/2005 04:13:50Or would you normally use the game display method as long as you have the option to display messages as speech?

That totally depends on you. Both ways work, see LucasArts / Sierra. Personally I prefer the LucasArts way.
#900
Quote from: Mr_Threepwood on Tue 27/09/2005 02:06:37
Code: ags

sectionstart hotspot1_a  // DO NOT EDIT OR REMOVE THIS LINE
function hotspot1_a() {
  // script for Hotspot 1 (tree): Look at hotspot

  int x=1;

  //...


At the moment you define the variable inside the function, so it gets destroyed when the function ends.
Everytime the function runs, the variable gets re-created with a value of 1.

Place variable definitions outside of any functions to make the variable a static (global) one. This way, it retains its value:

Code: ags

int x=1;

sectionstart hotspot1_a  // DO NOT EDIT OR REMOVE THIS LINE
function hotspot1_a() {
  // script for Hotspot 1 (tree): Look at hotspot

  //...


And it's
object[0].Visible = true;
AGS is case-sensitive.
SMF spam blocked by CleanTalk