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

#941
Are you sure you're pressing the correct button (no. 7)? Make sure by putting a
  // scroll up
    Display("Up pressed");
in there.
#942
Quote from: Akumayo on Sun 11/09/2005 20:10:17I can't find the InvWindow control

Well...it's a rectangular-shaped control. When it's selected, the small floating window's title should say "GUI 2 Control 0 (Inventory)" (as opposed to (Button)) or some such.

Quote from: strazer on Sun 11/09/2005 20:03:32You use AGS v2.7, yes?

Meaning, what version of AGS are you using? .ScrollUp and -Down work with AGS v2.7+ only.

Why don't you take a look at the default game (Start new game, select "Default game" template) to see how the scrolling is done there?

Quote from: Akumayo on Sun 11/09/2005 20:10:17I accidently created a second inventory window within GUI INVENTORY, and now all my items appear twice, how do you kill a window?

Select the GUI control, then press the [DEL] key on your keyboard.
#943
You use AGS v2.7, yes?
Go to the "GUIs" pane in the editor, select the InvWindow control and in the small floating window, double-click the "Script name" row.
#944
INVENTORY => gInventory

Edit:

Oh, and I think it's

gInventory.Controls[0].AsInvWindow.ScrollUp();

Edit 2:

But as I said, it's easier to just give the InvWindow a name in the editor, then you can access it directly:

TheInvWindowControlNameYouGaveItInTheEditor.ScrollUp();
#945
You have to give the InvWindows control a name in the editor first. If you want to access it with its number (ID) only, you have to do:

  gYourgui.Controls[0].ScrollUp();
or
  gui[1].Controls[0].ScrollUp();
if you don't want to use the GUI's name.
#946
Putting YourInvWindow.ScrollUp() resp. YourInvWindow.ScrollDown() in the GUI button scripts should do it.
#947
Advanced Technical Forum / Re: AGS 3D
Sun 11/09/2005 19:28:36
Yes, please open another topic. I don't want to untangle another thread. :)

Edit:

All further discussion here please: http://www.adventuregamestudio.co.uk/yabb/index.php?topic=22615
#948
The ezine is now hosted at AdventureDevelopers.com.
Demo is here (Right-click/Save as...)

Beginner's Forum sticky: Can I Make an RPG with AGS?

Search the forum for "battle system".
#949
How do you tint the character? If you do it directly via Character.Tint, try using a region and vice versa.
#950
Thanks for the update.

Quote from: That Guy on Mon 05/09/2005 19:31:30This script assumes your player character has a script name of "cPlayer".  So wherever you see "cPlayer", substitute your own character's script name, characters[EGO], or whatever.  However you refer to your main character in the script.

What I meant is using just "player" which always points to the current player character. This way the user won't have to substitute his player character's name.
Can you please try if it works?

Unless there any more comments or bug reports, I'll move the thread to the Tech Archive once it leaves the first page.
#951
There are several options:

(- Put the character in room -1)
- Move the character off-screen
- Assign the character a blank view
- Set the character's .Transparency to 100 and his .Clickable property to false
- Set the character's (undocumented) .on property to false. This has the same effect as the "Hide player character" checkbox:
  cPlayertwo.on = false;

The last one is probably the best solution in your case.
#952
Beginners' Technical Questions / Re: Gauges
Fri 09/09/2005 05:39:34
Use a GUI button with a graphic of the fully charged bar, set the button's .ClipImage property to "true" and adjust the button's width using the .Width property.
#953
Wouldn't you have to insert line breaks manually into the text? GUI labels don't wrap automatically, do they?
#954
Very nice. We need a proper, current tutorial for this kind of thing.
Has anyone worked with this and can give some comments?

A few things I've noticed:

Quote from: That Guy on Mon 05/09/2005 19:31:30Well, what it does is first see if the interface we clicked is our SCUMM bar.  If it's the first GUI you created, it should have an ID of 1.  Otherwise, substitute whatever ID# you defined it as.

There are certain situations where using the interface_click function is indeed easier. So if you want to use it, I suggest doing this:

    if (interface == gScummbar.ID)

(in AGS v2.62, this also works: if (interface == SCUMMBAR) )

Makes the code easier to read. Likewise you can do

      if (button == btnGive.ID)

and you don't need those constants.

This is especially important because deleting a GUI control renumbers the remaining ones and the script could get messed up.

Btw, for the purpose of this tutorial, you should replace "cJustin" with "player".

Please edit your first post to complete your tutorial. Once it's finished, I'll clean up this thread and move it to the Technical Archive.

Thank you!
#955
Exactly my point. ;)
#956
Quote from: Gilbot V7000a on Thu 08/09/2005 02:32:42
I think you have enough stuff to start a thread in the "Games in Production" forum already. :D

Another one?
#957
Quote from: Guybrush Peepwood on Thu 08/09/2005 01:58:46the ctrl+tab shortcut didn't work with Firefox last time I tried

If that's supposed to switch between the open tabs, it does now.
#958
The properties of the GUI used for text windows don't seem to change when text is displayed on it, so even trying to resize the transparent GUI via repeatedly_execute_always won't work.

Following your approach, you could try calculating the dimensions yourself and activate the GUI shortly before the Display call, like this:

Code: ags

// global script

function DisplaySpecial(string message) {

  int textwidth = GetTextWidth(message, 0);
  if (textwidth > 233) textwidth = 233; // not quite accurate, see note 2 below
  gOther.Width = textwidth + 4; // 4 = border
  gOther.Height = GetTextHeight(message, 0, textwidth) + 4; // 4 = border
  gOther.Centre();
  gOther.Visible = true;
  Wait(1);
  Display(message);
  gOther.Visible = false;
  Wait(1);

}


Code: ags

// main script header

import function DisplaySpecial(string message);


Problems with this code:

1.) Doesn't work with text containing manual line breaks because GetTextWidth returns the width of the text including the [ line break character.
2.) If text is wider than 233 pixels (in my tests this seems to be the maximum width for Display texts) and gets wrapped, it's hard to determine the exact width of the text window. Transparent GUI might be a tad too wide.

I don't think either of these is a big issue at the moment, so I won't work on this any further.
But I'm sure both can be solved, so if anyone is up for it, give it a go.
#959
Quote from: Pumaman on Wed 07/09/2005 20:29:06
Hmm yeah, interesting point ... the left-to-right precedence affects only the main operators, and not the - operator. It's probably too late to change it now, though.

I completely understand and support your desire to avoid having to break someone's script, but I think in instances like these it's more important to make things correct, consistent and predictable. Just fix it, add a note to the changelog and be done with it.
#960
I just hide characters and objects in the room and rawdraw their current frames behind or on top of the raindrops, according to their baselines. Yours is a nice idea, too.
SMF spam blocked by CleanTalk