AGS 3.1.1 Final 3 - Christmas Edition

Started by Pumaman, Wed 12/11/2008 01:33:40

Previous topic - Next topic

Gilbert

I think the problem is, because when you clicked a character the GUI thus popped up under the cursor will now make the locationtype eLocationNothing. So the '!=eLocationCharacter ' part will also be executed and thus gEquip also pops up. You can actually solve this in a more systematic way by using some 'else' instead of 'return'

Code: ags

function on_mouse_click(MouseButton button) {
  if (button == eMouseLeft) {
    if (GetLocationType(mouse.x,mouse.y)==eLocationCharacter) {
      if ((chr==cNoTea)||(chr==cBrush)) {
        gOtherCharacters.SetPosition(mouse.x,mouse.y);
        gOtherCharacters.Visible=true;
      } else if ((chr!=cNoTea)&&(chr!=cBrush)){
        gChars.SetPosition(mouse.x,mouse.y);
        gChars.Visible=true;  
      }
    } else {
      gEquip.SetPosition(mouse.x,mouse.y);
      gEquip.Visible=true;
    }
  }


I didn't check how different was the original behaviour of the functions so I don't know why it worked in the past though.

Dualnames

That's what I'm wondering. It shouldn't have worked in the past version. However for a reason it did.
Worked on Strangeland, Primordia, Hob's Barrow, The Cat Lady, Mage's Initiation, Until I Have You, Downfall, Hunie Pop, and every game in the Wadjet Eye Games catalogue (porting)

freshpaint

#62
With my Darkdevil game, I hear no music running with the latest (rc2) version.  I will do more testing later, but thought you should know initial trial.  I've been having a few problems with my computer lately, but I can play both the mp3 files and the .ogg files in the game thru audacity.  The sound files seem to play ok, just not the music.

Don't know whether the same problem was in the rc1, since because of the comma error problem with the dialogs I never had a successful, runnable compile.

How I executed it:  just downloaded the new exe and ran the installer.  I have 3d drivers 800 px. I use 120 dpi and XP Professional with 3.0 upgrade and all the latest drivers (I think).

UPDATE: I removed the lines that were causing RC1 to fail and have the same problem with music not playing in that version too.  Music plays fine elsewhere and in all the other games I have, and in my current online demo, etc., so don't think it's anything to do with my computer. Also, ambient sounds play fine, and all the playsounds are fine.  Just seems to be the music.

UPDATE2: .mid and .ogg files play just fine using playmusic. It's just the .mp3 files for playmusic.  If I play the same mp3 file using playsound, it works.



Pumaman

QuoteSpeaking of savegames, is there any chance that the name could be stored as a String (or even just a 255 char string) rather than the currently very limited number of characters? I like to use it for storing additional information such as time of save, room ID and the current day in the game, which doesn't leave much space for whatever the player types.

Sorry, it's too late for requests for this version. Please can you open another thread or use the wishlist thread for suggestions at this point.

QuoteThe code below works fine without the return commands for any character in 3.1.0. And in 3.1.1  it works only when I put the return. So this difference does it have to do with something that changed on the GetLocationType command(I recall seeing a post about it)?
Other than that everything seems to be in perfect order.

Hmm, as Gilbert says it looks like it shouldn't have worked before. Thanks for reporting it though, I'll have a think if there's any reason why that might be.

QuoteWith my Darkdevil game, I hear no music running with the latest (rc2) version.  I will do more testing later, but thought you should know initial trial.  I've been having a few problems with my computer lately, but I can play both the mp3 files and the .ogg files in the game thru audacity.  The sound files seem to play ok, just not the music.

Thanks for reporting this, I'll look into it.

Pumaman

Ok, the 3.1.1 Final release is now available, which fixes the music issue.

This version is now ready for release, so if you're still using 3.1 please try upgrading to this version and let me know if you have any problems.

Once I'm happy that people are using this Final release and it's working properly, I'll make it official and release it to the website.

Dualnames

Quote from: Pumaman on Wed 10/12/2008 22:49:25
Ok, the 3.1.1 Final release is now available, which fixes the music issue.

This version is now ready for release, so if you're still using 3.1 please try upgrading to this version and let me know if you have any problems.

Once I'm happy that people are using this Final release and it's working properly, I'll make it official and release it to the website.


Well, I was about to post something concerning 3.1 but well I'll try upgrading to 3.1.1,however here's what happened.

Instead of using an inventory sprite when the player selects due to I want two sprites per inventory item, I have a function that changes mode graphic.

Situation:
Accidentally, you could open the menus and save your game having as inventory cursor that sprite. Thing is I saved the game. When I load it the sprite that I set as starting sprite appeared.

To make things totally clear:
sprite number 1(imagine a big blue cup, not set in a inventory item)
sprite number 2(inventory  1 sprite)
now when you open the inventory sprite number 2 appears in the inventory window and that's what i want ,so fine with that.
If you click on a button called select the mouse changes graphic, but the inventory window still has the same sprite..so that's fine too.
However if I click on select and then save, for no reason explained by script the sprite that is supposed to be on the inventory window is set as mouse graphic instead of sprite 1.

Thing is this happens on the older versions of the game too. Which is totally weird.
Worked on Strangeland, Primordia, Hob's Barrow, The Cat Lady, Mage's Initiation, Until I Have You, Downfall, Hunie Pop, and every game in the Wadjet Eye Games catalogue (porting)

OneDollar

Brand new AGS project in 1024x768 resolution. I'm trying to use a DynamicSprite to load a bitmap and draw it on a button, but when I run
Code: ags

function LoadTilesBtn_OnClick(GUIControl *control, MouseButton button)
{
  TilesSprite = DynamicSprite.CreateFromFile("Edges.bmp");
  TilesBtn.NormalGraphic = TilesSprite.Graphic;
}

I don't get the right-hand column or the bottom row of pixels drawn.

However if I do...
Code: ags

function LoadTilesBtn_OnClick(GUIControl *control, MouseButton button)
{
  TilesSprite = DynamicSprite.CreateFromFile("Edges.bmp");
  TilesBtn.NormalGraphic = TilesSprite.Graphic;
  TilesBtn.Height += 1;
  TilesBtn.Width += 1;
}

I get the whole picture drawn on the button. Looks like when the button's resized to the imported bitmap is 1 pixel out on both the width and the height.

Other than that everything's all fine and dandy. Thanks for all the hard work!

Trent R

Quote from: OneDollar on Sat 13/12/2008 21:05:30Looks like when the button's resized to the imported bitmap is 1 pixel out on both the width and the height.
Actually, I think I had a similar problem like that with a label. The text of it would show in the editor, but not in-game(I believe it was wrapping to the next line, but the height too short). I solved it by increasing it's width by 1 pixel.

I think it was with 3.1 release.

~Trent
To give back to the AGS community, I can get you free, full versions of commercial software. Recently, Paint Shop Pro X, and eXPert PDF Pro 6. Please PM me for details.


Current Project: The Wanderer
On Hold: Hero of the Rune

OneDollar

I'm getting the missing pixel row and column when changing the height and width of buttons as well (no dynamic sprites). I've got another button that I'm setting the height and width to 2, but when its drawn I only see 1 pixel. You can click on all 4 pixels, so it seems like there's an invisible border being added.

By the way, I should have mentioned earlier that I've got the Clip Image setting on true.

Shane 'ProgZmax' Stevens

This is a bug barely worth a mention, but when I started an empty game with this version it defaulted the first room created to 301 for some reason.

DoorKnobHandle

#70
In AGS 3.1.0.59, 16-bit game:

(ignore 'r' -> 'are' through spelling corrector)

Code: ags

function CRenderer::SetDrawingColorRGB ( int are,  int g, int b )
// sets drawing color
{
      // select new color
      this.Surface.DrawingColor = Game.GetColorFromRGB ( are, g, b );
}

// then later
Renderer.SetDrawingColorRGB ( 0, 255, 0 );


Gives completely wrong, random results when I draw something after calling DrawingColorRGB. Calling the function with ( 0, 255, 0 ) should give me green, it gives me pink, calling it with ( 255, 0, 255 ) gives me white, ( 255, 0, 0 ) gives black etc.

Code: ags

function CRenderer::SetDrawingColor ( int color )
// sets drawing color
{
      if ( this.Surface.DrawingColor != color )
      // if new color is not already selected
            // select new color
            this.Surface.DrawingColor = color;
}


The above function works, however, which is why I think that it's a bug in AGS. Can anybody confirm?

EDIT: Also, I imported a module named "Renderer" in another project, in AGS 3.1.0.59 it renamed it to "renderer" (lower case) and whenever I try to capitalize it, it says "Module 'Renderer' already exists". I can rename it to "renderer2" or "rensjfkdgsdkf2", but even when capitalizing THAT it'll say "Module 'Rensjkfdjkdfsd2' already exists".

freshpaint

#71
Errors for 3.1.1 Final:

Ok, the .mp3 problem has been solved, but one other problem persists.  A few weeks ago I posted the problem about getting warnings/error codes in the dialogs with "unnecessary" returns following goto-dialogs (UPDATE: also happens with new-room).  Decided to clean up the code a bit and removed the return statements. 

This is what I now get -- red circle-with-x errors, not warnings.  I put the offending "return" for Dialog 9 line 22 back to show what I was trying to correct.  If I remove it, I get the error message as well, and the game won't compile.

Dialog 0(26): Script commands can only be used in the area between a @ entry point and the closing return/stop statement
Dialog 0(36): Script commands can only be used in the area between a @ entry point and the closing return/stop statement
Dialog 5(51): Script commands can only be used in the area between a @ entry point and the closing return/stop statement
Dialog 8(7): Script commands can only be used in the area between a @ entry point and the closing return/stop statement
Dialog 8(10): Script commands can only be used in the area between a @ entry point and the closing return/stop statement
Dialog 9(22): The command 'return' will be ignored since the script for this option has already finished
Dialog 10(20): Script commands can only be used in the area between a @ entry point and the closing return/stop statement
Dialog 11(14): Script commands can only be used in the area between a @ entry point and the closing return/stop statement
Dialog 24(24): Script commands can only be used in the area between a @ entry point and the closing return/stop statement

Gilbert

Can you post your dialog script here for us to check?
(If you don't want us to see the actual dialog texts you can just change them to something like 'bla bla'. We only need to see the structure of the codes.)

freshpaint

#73
// Dialog script file
@S  // Dialog startup entry point
PLAYER: Let's see... where do I want to go?
return
@1
new-room 12
return

@2
new-room 8
return

@3
new-room 13
return

@4
stop


****************
This generates 3 warnings.  If I remove the offending 3 return statements (after the new-room statements) I get the red-circle-with-x errors instead, so the game can't be created.  UPDATE: I think it might be a whitespace thing -- I removed the blank lines and don't get the error messages when I recompile after removing the returns. This still not good, since I like to use a lot of whitespace, comments, etc. in my code.  Could get tricky, since the new way of handling dialogs uses leading spaces to figure out whether it's "dialog" or "script".



Gilbert

#74
Hmmm I didn't check much. But if the problem really came form the blank lines and you like to leave them in you may make a compromise by making them into comments instead, like:

@1
new-room 12
return
//
@2
...

(I'm not quite sure and I didn't check it, but I think it's possible that those blank lines are treated by AGS as dialog text also, so leaving some blank lines (speech texts) after the return's can cause problem.)

freshpaint

Is just easier for me to live with the warnings for now.  Seems like something Chris might want to fix at some point.  I can't be the only one with this problem. THanks for looking at it.

Shane 'ProgZmax' Stevens

The problem with blank space is probably a parsing issue and I'm sure CJ will want it fixed regardless.

abstauber

#77
Just encountered a bug in AGS 3.1.1

I'm modifying Akumayos weather plugin right now and stumbled across this.
Whenever a function in a struct has more than 10 parameters, I get an "unresolved import error". With less than 10, it works fine.

Code: ags

function WeatherModule::BeginEnvEffect(int slota, int slotb, int slotc, int slotd, int slote, int slotf, int slotg, int envfallingspeed, int envwindspeed, int weathergoing)


for example calling this function returns:
unresolved import 'WeatherModule::BeginEnvEffect^10'

When I remove e.g. 'int slotg', it works fine. Of course a workaround is obvious, but this might be still worth mentioning.

SSH

I think its been said before that no AGS function can have more  than 10 arguments...
12

abstauber

oops ;)

Well I've only searched for unresolved import errors - nevermind then.

SMF spam blocked by CleanTalk