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

Topics - Lufia

#1
So, here's a GUI background:


Here's a button:

And here's how it looks like in Photoshop and AGS:


I clicked on "use alpha channel" when I imported the sprites. Am I doing something wrong, or is this an engine limitation, or what?
#2
So, I can't find a section in the manual devoted to arrays. How would I go about appending a value at the end of an array? And clearing the entire array? Upon creating an array, is it filled with null elements, or some default value depending on the type I set? Can you compare two arrays? Is there a way to get the size of an array?

I also need a refresher on import / export statements and using script headers.
Say I write some function in a script, and I want to use it in another one. I gathered that I should write my import statement in the header of the script where the function is defined. But am I not exporting said function from that script, rather than importing it? And what exeternal scripts are able to access my newly "imported" function, exactly? All of them?
As for importing / exporting variables, I get that I should write my export statement somewhere below its declaration in the body of the script. Where do I write the import? In the header as well?
And lastly, if I define a custom struct in the header of a script, am I able to use it wherever I want?

If this stuff is answered somewhere in the help file, direct me to the right section. Thanks.
#3
Critics' Lounge / Walkcycle
Tue 28/09/2010 19:10:03
This is the first walkcycle I've "finished". How does it look?

#4
Critics' Lounge / Sprite
Sun 14/03/2010 22:26:50
I need some advice.


I don't quite know what to do with the face. How should I draw a mouth ? Are the eyes all right ? I know the hair looks a bit odd, I'll correct it. I'm not quite sure about the placement of the arms. I tried marking the shoulders a bit since then, but I'm not sure it's such a good idea.

Comments and edits very welcome.
#5
Critics' Lounge / A font
Sun 29/11/2009 21:20:19
How does this look?

#6
Is there a built-in way to keep track of the time that was spent playing per game save? I can't find anything anywhere.
#7
I'm trying to import a custom-made ttf font in AGS but the editor has another idea... The font works fine in Word. Do I have to pay attention to something special when making a font, like not include some characters, always include others... ? Is my font just doomed ?
#8
There's something wrong with his sleeves, I think. And his face. I messed up coloring his shoe properly, please disregard that.

Any remarks on the shading would be greatly appreciated but all comments are welcome, really.



Next step is teaching him how to walk, open doors, bend down, swim, mend socks, ...  so I'd like to have a clean base as a reference.
#9
Hey, me again.

I'm setting up a simple system where hotspot names are displayed nex to the mouse cursor. I have a problem to check whether the label would end past the right edge of the screen.

Here's the relevant code from my repeatedly_execute function :

Code: ags
lblHotspotLabel.Text = String.Format("@OVERHOTSPOT@");
largeur = GetTextWidth(lblHotspotLabel.Text, eFontTahomaOutline);
lblItemLabel.Text = String.Format("%d", largeur);
if (mouse.x+largeur >= 800) 
  gLabels.SetPosition(mouse.x - largeur, mouse.y + 15);
else gLabels.SetPosition(mouse.x + 10, mouse.y + 15);
gLabels.Visible = true;


largeur is always equal to 109 no matter what's under the mouse cursor. (Well, it changes if I change the font passed as an argument for GetTextWidth.)
I've tried various things, like pass String.Format("@OVERHOTSPOT@") or String.Format("%s", lblHotspotLabel.Text) as arguments for the GetTextWidth function but to no avail. The label, on the other hand, displays the correct text.

What am I doing wrong?
#10
So, I'd like to make a picture fade in on top of the background of a room and later fade out. I first thought of using an Overlay but I didn't see anything about setting transparency for these. So then I looked at DrawingSurface. And I found that :

QuoteTIP: If you want to gradually fade in a second background, create a copy of the original surface and then restore it after each iteration, otherwise the backgrounds will converge too quickly.

lol wut?
Iterations of what ?

Thanks for your help.
#11
I'd like to have a save GUI consisting of four slots represented by the screenshots of the respective saves. For that, I call this function upon loading the GUI :

Code: ags
function show_save_game_dialog() {
  gSaveGame.Centre();
  gSaveGame.Visible = true;
  int i = 1;
  
  while (i <= 4) {
    screenshot[i-1] = DynamicSprite.CreateFromSaveGame(i, 128, 96);
    GUIControl *control = gSaveGame.Controls[i];
    if (screenshot[i-1] != null) {
      control.AsButton.NormalGraphic = screenshot[i-1].Graphic;
    }
    i++;
  }
  mouse.UseModeGraphic(eModePointer);
  gInventory.Visible = false;
}


screenshot is defined by DynamicSprite* screenshot[4];

When I run this, the place where the screenshots should be is transparent : I can see the background of the room. The game is properly saved in each slot and I can restore them without problem.

Any suggestion is welcome.
SMF spam blocked by CleanTalk