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 - GarageGothic

#1101
The non-deleted sprites are not really an issue since your operating system takes care of freeing up the memory once the game closes. Also, the whole point of killing the program with keyboard shortcuts like Ctrl+Alt+Del, Alt+F4 and Alt+X is that it allows you to quit whenever the game freezes (usually because of a scripting error). In such cases an on_close_game event would never be run anyway. A better solution to the problem would be simply make the engine only generate the error log when running in debug mode. There's no reason to worry end-users with something that's not even an issue.
#1102
For incidental animations, you can use Character.LockViewAligned and Character.LockViewOffset to position the sprite. However if you want to use AGS' own handling of talking and idle views instead of writing new functions (that call LockViewOffset first), the only way to go around it is adding some transparent pixels on the side of the character so that the character stays at the center of the sprite. For instance, if he stretches out his left arm (from our point of view) you would have to add the same extra width to the right side of the sprite.
#1103
This seems like a bug in the Direct3D engine that nobody caught yet. I'd recommend you mention this issue in the 3.2 BETA thread (with a link to this thread) to make sure that CJ sees it, perhaps it could be fixed before final v. 3.2.
#1104
I think a set of genitals would improve realism considerably  ;)

Kidding aside, his lower legs need some work. Currently his calves are almost as thick as his thighs, it almost looks like he's wearing boots underneath flesh-colored tights. Good work though, you've come quite far from that original lo-res style.
#1105
Sweet. I don't have many sounds in my game yet, but I'll definitely take the new audio functions for a spin.

Quote* Added Applies To feature to custom properties, so that you can have properties that only apply to Rooms or Characters, for example

Sounds very practical, I was actually thinking about the problem with the properties window becoming cluttered just the other day.

Quote* Fixed no line number provided when DynamicSprite.CreateFromDrawingSurface threw an error

Thanks, now I can start troubleshooting that code.

Great work as always, CJ!

Edit: Perhaps this has been reported before, but if you try to "Open" the game you're currently editing (a save/reload is apparently necessary for changes to the "applies to" value of custom property to register in the editor), you get the message "Cannot load the game, because it is already open in another copy of the AGS Editor".

Edit 2: Fixed the scripting problem that I couldn't locate in previous version because DynamicSprite.CreateFromDrawingSurface didn't return a line number. Good thing I waited, because it turned out it was somewhere else entirely than I suspected. Many thanks!
#1106
Try using the Character.Moving property instead of Character.Animating. Also, you may want to put this in repeatedly_execute_always rather than repeatedly_execute so it isn't stopped by blocking routines.
#1107
It seems that you are using two different IsDrawing variables with the same name, one defined in the room script, the other in the global script (within a function - which means it doesn't exist outside that function). Try sticking to one or the other. Here's an example using only global script, but it can be moved to a room script as well:

Code: ags
bool IsDrawing;
int prevx;
int prevy;

function repeatedly_execute() {
  if (IsDrawing == true) {
    if (Mouse.IsButtonDown(eMouseLeft) == true) {
      DrawingSurface *surface = Room.GetDrawingSurfaceForBackground();
      surface.DrawLine(mouse.x, mouse.y, prevx, prevy, 5);
      surface.Release();
      prevx = mouse.x;
      prevy = mouse.y;
      }
    else IsDrawing = false;
    }
  }

function on_mouse_click(MouseButton button) {
  if (button == eMouseLeft) {
    IsDrawing = true;
    prevx = mouse.x;
    prevy = mouse.y;
    }
  }


In your example you only draw a pixel, not a line (because you draw it from the current mouse coordinate to the same coordinate, thus plotting a single pixel). This is why it looks blotchy when you draw too fast.
#1108
Quote from: jfarwyke on Thu 30/04/2009 22:46:39Now I'm trying to figure out a way that if the icon is enabled, and he tries using a radish on himself, it'll display a message saying something like "you've already eaten" and not allow him to lose the radish until he uses the ability and disables it. Maybe I have to use variables?

Why use variables when AGS is already keeping track of the icon's status for you ;)? Simply add this to the top of your script:

Code: ags
function cPup_UseInv() {
  if ((cPup.ActiveInventory == iRadish1) || (cPup.ActiveInventory == iRadish2) || (cPup.ActiveInventory == iRadish3)) {
    if  (btnIconStare.Enabled == true) Display("You've already eaten!"); //added line
    else if (scarestare == 0) { //changed line


and keep the rest the same.
#1109
Edit: Monkey beat me to it

The way you put the final "else" only relates to the statement "if ((cPup.ActiveInventory == iRadish3)&&(scarestare == 0)) [...]0 else if ((cPup.ActiveInventory == iRadish3)&&(scarestare > 0))", so as long as any of the previous statements (iRadish1 or iRadish2) are true, the final else will still run. One way around this is to simply put an "else" in front of every "if" except the first. The code could also be cleaned up a bit, since all three radishes seem to have the same effect - but perhaps they are only placeholders?

Code: ags
function cPup_UseInv() {
  if ((cPup.ActiveInventory == iRadish1) || (cPup.ActiveInventory == iRadish2) || (cPup.ActiveInventory == iRadish3)) {
    if (scarestare == 0) {
      scarestare += 1;
      btnIconStare.Enabled = true;
      cPup.LoseInventory(cPup.ActiveInventory);
      Display(" New Ability Aquired: SCARE STARE!");
      Display(" Upon eating anything that's edible, Pupshaw will gain the ability to intimidate with SCARE STARE. However it may only be used once until Pupshaw finds something else to eat. The SCARE STARE ability can be found in the icon bar above.");
      }
   else { //I'm assuming here that scarestare can never be negative
      scarestare += 1;
      btnIconStare.Enabled = true; //should this be necessary if scarestare is already larger than 0? Depends on the rest of your code
      cPup.LoseInventory(cPup.ActiveInventory);
      Display(" SCARE STARE activated!");
      }
   }
else Display(" You can't use that on yourself.");
}

#1110
It's perfectly possible (SSH's Walkcycle Generator is an example of a very basic implementation), but far from easy. I recommend you start looking into DrawingSurface functions in the AGS manual and once you know how to use those, you can start coding the interface (using on_mouse_click events and checking the current cursor coordinates in repeatedly_execute).

The most simple way to allow freehand pixel drawing would be something like:
1) Register mouse click (on_mouse_click event), set a variabel (for example "bool isdrawing = true")store mouse.x and mouse.y coordinates (let's call them prevx, prevy).
2) In repeatedly_execute, check if "isdrawing == true", if so, check if mouse button is still down - if not set "isdrawing = false", otherwise call DrawingSurface.DrawLine(mouse.x, mouse.y, prevx, prevy). Update prevx, prevy to current mouse coordinates.

If you want to go beyond simple pixel drawing, you'll also have to code a few of your own drawing functions such as line drawing (for use with sprite brushes) and flood fill.

#1111
Yeah, it should be possible. You need to keep a global pointer to the DynamicSprite though, or it will be destroyed as soon as the function finishes. Where do you define the DynamicSprite, inside or outside your function?
#1112
Quote from: Jared on Wed 29/04/2009 09:18:27* Stealing somebody's mobile phone just to change the time, language and send offensive text messages to all of their contacts is a simple one.

Or better yet, switch the names in the numbers list so they find themselves sending steamy love messages to their own mother instead of their girlfriend.
#1113
Yeah, I also though "Starfall" even before Revan posted. However, as much as I like that title (reminds me of Gaiman's "Stardust"), it perhaps suggests sci-fi more than fantasy - the Infocom game "Planetfall" comes to mind. A variation could be "Fallen Stars" - that could even be turned into something metaphoric if the story lends itself to it.
#1114
For my current game I pencil backgrounds by hand, then scan the artwork and color it in Photoshop. There's a tutorial detailing my art style here. Once I have the composition worked out (which could take days) it takes about 5-8 hours to finish a background.

The characters are customized Poser models which are then rendered with flat shaders. I'm not proud of using Poser art, but I think I've achieved a style which doesn't trigger knee-jerk reactions from the anti-Poser crowd. For my next game, I'm going to use digitized actors. I dumpster dived a fully functioning treadmill, so now I just need to paint it chroma-key green and get a green backdrop and I'll be all set to go.
#1115
Wow, the human characters in Discworld Noir really made zero impression - not even seeing the screenshot I can remember that dame. Thanks for a great game, Kastchey - that was a lot of fun. Hoping to see another round soon!
#1116
I suggest you notify CJ again, once you've reached 29,000 sprites. I'm sure increasing the limit shouldn't take any longer than it will you to draw another thousand sprites.
#1117
Are you importing multiple .PNG's at once or just a single one? At least when importing them individually, I get a message box saying:

QuoteThis image appears to have an alpha channel. Do you want to use it?

When importing multiple sprites (using "Quick import"), I believe the transparency setting will be identical to that of the last individual sprite you imported.
#1118
Can't place 7 or 10. The rest I'm pretty sure of:

Spoiler
1. Laverne (DOTT)
2. Bobbin (Loom)
3. Robert Foster (Beneath a Steel Sky)
4. Zanthia (Hand of Fate)
5. The Arrogant Man (Trilby's Notes/6 Days a Sacrifice)
6. Fingus & Winkle (Gobliins 2)
8. Gabriel Knight (GK1)
9. Faye Russel (Flight of the Amazon Queen)
11. Indiana Jones (LC/FOA)
12. Guybrush Threepwood (MI series)
[close]

Edit: Just realized who 3 was after understanding what was on the shirt (first I thought it was a Star Trek sort of emblem, making me think Space Quest 5) - very subtle reference there :)
#1119
Critics' Lounge / Re: Carousel Poster
Tue 21/04/2009 22:20:37
I tried calling (555) 555-1234, but it seems not to be a valid number  ??? I will track down the director, Mr. John Doe and demand an explanation!!!  :P

Nah, looks great Drawken. I think it's eye catching but harmonious at the same time. I'm not really crazy about the blurry patches of light cast from the windows (especially the ones on the roof of the two-story building seem a bit distracting), but the atmosphere is wonderful and the moon really turned out great.
#1120
I think you should turn the black surfaces of the bed, bookcase and table into a dark blue. I get that they're up against a wall and therefore in total shadow, but since we can't see that 4th wall, they really stand out. The black edge of the table leg not against the wall should have an even lighter shade. Overall I really like the pastel style, it's unique and sets the mood very well.
SMF spam blocked by CleanTalk