AGS 2.61 Pre-final Edition

Started by Pumaman, Sat 28/02/2004 23:04:11

Previous topic - Next topic

Robert Eric

CJ, I put in a DisplayTopBar function for whenever the player talks to himself.  It shows, then if you click on the character multiple times, you get this error.

---------------------------
Illegal exception
---------------------------
An exception 0xC0000005 occured in ACWIN.EXE at EIP = 0x77FCBD36 ; program pointer is +6, ACI version 2.61.716, gtags (0,32)

AGS cannot continue, this exception was fatal. Please note down the numbers above, remember what you were doing at the time and notify CJ on the Tech forum.

(Global script line 83)
----------------------------

Of coarse, line 83 held the function DisplayTopBar.
Ã, Ã, 

Pumaman

Hmm, strange. Unfortunately I can't trace anything from that error message.

How does it happen? Does the TopBar text display, then you click it away, then you talk to yourself again, and it displays again, and so forth, until finally it crashes?

Is the game small enough to upload for me to take a look at?

Robert Eric

#22
Quote
How does it happen? Does the TopBar text display, then you click it away, then you talk to yourself again, and it displays again, and so forth, until finally it crashes?

Yup

Yeah, you can take a took.  I uploaded a bare test program for you to look at that shares the same problem.  Here.  Right click three times to get to the correct cursor mode.
Ã, Ã, 

Pumaman

Thanks - with the help of your game I've found the bug, I'll get it fixed for the next beta. :)

Kinoko

"Empty game" = Awesome ^_^ Thanks!!

evilspacefart

Quote* Added SetGraphicalVariable script command.

w00t! easier for me now because i sometimes use it alot but didn't have a way of scripting it.

Radiant

A few details I noticed that may have to be changed in a next version... none of this is really important though.

- Apparently, when deleting a GUI, its contents remain within the game. Its labels still show up when you do a text dump, and its sprites still cannot be deleted.

- When you try to delete a sprite that's in use on a GUI, you are told which button it is - but not on which GUI.

- If I (accidentally) use ctrl-F4 to get rid of the pop up window in the GUI section, clicking on any GUI item causes the editor to crash.

- Why can't I use RawDrawFrameTransparent with the current frame? There is a point to this. I wanted to implement a night mode with RawClearScreen (0); RawDrawFrameTransparent (0, 50);

Gilbert

Quote from: Radiant on Thu 18/03/2004 15:26:11
- Why can't I use RawDrawFrameTransparent with the current frame? There is a point to this. I wanted to implement a night mode with RawClearScreen (0); RawDrawFrameTransparent (0, 50);
Well in that case, why don't you import a blank bg as a frame for this?

Radiant

Well, that's what I'm doing now. But that requires adding a frame to each room where it's relevant (i.e. most of them); the RawDraw stuff could have been put in the global script with the on_event (ENTER_ROOM) function. So I thought I'd mention it.

Let's see, what else came up...
It would be nice if you could use a hotkey, say ^L or something, to edit the local (room) script (just as ^G and ^H edit the global one)

It would also be nice if the scriptnames of characters could be used in #defines, at least it seems intuitive to me (i.e. #define CallGuard character[GUARD].room = character[EGO].room )

Currently the right mouse button in the inventory triggers a 'look' action. I would like, as an alternative, to have it switch between the different icons available (look / touch / select) just like it does in the main screen.

Finally, when I load an invalid save game (i.e. from an earlier version of my game, or even an entirely different game) I get a critical error and the game crashes. Would it be possible for me to give a user-friendly error message instead, and have my game continue or restart rather than crash.

Pumaman

Quote from: Radiant on Thu 18/03/2004 15:26:11
- Apparently, when deleting a GUI, its contents remain within the game. Its labels still show up when you do a text dump, and its sprites still cannot be deleted.

Hmm that's a bug - thanks for reporting it, I'll get it fixed.

Quote
- If I (accidentally) use ctrl-F4 to get rid of the pop up window in the GUI section, clicking on any GUI item causes the editor to crash.

Yeah, this is a known issue. There's no X button on the window but if you use Alt+F4 it will cause problems. It's a low priority fix for obvious reasons.

Quote- Why can't I use RawDrawFrameTransparent with the current frame? There is a point to this. I wanted to implement a night mode with RawClearScreen (0); RawDrawFrameTransparent (0, 50);

The reason you can't is due to the implementation of the command. It would be possible for me to allow it - but generally, to implement a night mode people will have an alternate night background that looks 'bluer' - just drawing the day background at 50% transparency won't tend to give a very good effect.

QuoteIt would also be nice if the scriptnames of characters could be used in #defines, at least it seems intuitive to me (i.e. #define CallGuard character[GUARD].room = character[EGO].room )

I tend to discourage using #defines for that sort of thing, because they're hard to debug and track down problems with. You can always just do:

function CallGuard() { character[GUARD].room = character[EGO].room; }

instead.

QuoteCurrently the right mouse button in the inventory triggers a 'look' action. I would like, as an alternative, to have it switch between the different icons available (look / touch / select) just like it does in the main screen.

Enable the "Handle inventory clicks in script" option in General Settings, and you can make the mouse clicks do whatever you want.

QuoteFinally, when I load an invalid save game (i.e. from an earlier version of my game, or even an entirely different game) I get a critical error and the game crashes. Would it be possible for me to give a user-friendly error message instead, and have my game continue or restart rather than crash.

It would be possible, but I don't think it's worth the hassle in all cases. Sometimes, the incompatibility may not be found until most of the save game has been loaded - in which case, the current game state has been overwritten. It's possible to fix, but not something I can really justify the time to do.

Vel

 :o

That view preview feature is really useful!

Rui 'Trovatore' Pires

There's an issue with SkipUntilCharacterStop - when it is called, any music that's playing will stop. I think.

Specifically, my case is - If the player presses ESC when Larry's walking, he SkipsUntilCharacterStops. Now, in some rooms (the room I played just before writing this), I've got a code that repeatedly checks for whether music is playing, and if it's not, play Random(etc, etc, etc. Now, the issue is, in this room I move Larry, press ESC - and lo and behold, he SkipsUntilCharacterStops AND a new song begins!
Reach for the moon. Even if you miss, you'll land among the stars.

Kneel. Now.

Never throw chicken at a Leprechaun.

Pumaman

Ah, yes - that's probably because IsMusicPlaying returns 0 while skipping the character move. I'll change that behaviour.

rtf

Woo-Hoo!

I was like "No way am I gonna download this one.  I just downloaded BETA 2!"
Then I saw VEl's reply, and I rushed back to the first page and pressed ctr-F, saerched for view, and it turned out I missed the whole "View Preview" line.
I have been previeing views ever since I downloaded Beta3.  Horray!

Also, that Repeatedly Execute Always () command it extremely practical(For me at least).  I am sure I can find some use for it in my next game.

Great Work, Chris!
I fail at art.

Kweepa

repeatedly_execute_always! Great! Thank you CJ. Now I can do particle effects and animate object positions.

You know what would also be great though? A room-based repeatedly_execute_always. To avoid the if {} else if {} else malarkey...

Speaking of which, it would be great if there was some alternative in dialogs to the run_script idiom. It's not pretty. Maybe a dialog could have a normal function (taking the selected option as parameter) as an alternative to the specialised script. That would facilitate expressive dialogs...

Cheers,
Steve
Still waiting for Purity of the Surf II

Alynn

So THATS why my game slowed down, and my midi's went haywire when a text box was showing... (I reported it a long time ago but the problem was never figured out)

Horray!

Hrm.. repeatedly execute always... probably the best place for my game total playtime counter....

Yes... I can see this coming in handy....

SSH

Yay for view preview and RawDrawImageResized. The two things I wanted most for a while! Now  I can complete my game (yeah, like laziness and lack of time wasn't a bigger factor...)
12

Gilbert

BTW, CJ, as we now have RawDrawImageResized() and RawDrawImageTransparent(), I think someone may like to raw draw a resized image with transparency. My thought was that you can actually have a RawDrawImageEx() function that handles both of them.

Just a thought, I won't need it anyway, as I probablly will stick to 256 colour graphics forever.

Radiant

If it's not too much trouble I have two small feature requests.
I'd like to be able to set a background picture for a GUI slider, or at least change the color of its border (which now is always white and gray lines)
Also, it would be nice if you could set a background picture for a textbox GUI. This picture would have to be clipped or tiled to fit the textbox size.

Oh and I found one thing that may be a bug.
It appears that MoveToWalkableArea (EGO) doesn't work if EGO's coordinates are outside the screen. I have a script that moves EGO outside the screen when leaving a room (i.e. MoveCharacterStraight (EGO, 330, 100, 1); ) so this happens at times. Of course I can work around it with little problems but I thought I'd mention it.

By the way a fun quirk... in a largish game, check the usage for sprite #0 (the blue cup).

As to the nightmode I mentioned earlier, I'm currently using a 320x200 semi-transparent object that is blue. That works, of course, but I would still prefer RawClearScreen (bluish_color_number); RawDrawFrameTransparent (0, 50);

Anyway thanks for your time Pumaman! I love your work.

Gilbert

Quote from: Radiant on Mon 22/03/2004 09:46:13
Oh and I found one thing that may be a bug.
It appears that MoveToWalkableArea (EGO) doesn't work if EGO's coordinates are outside the screen. I have a script that moves EGO outside the screen when leaving a room (i.e. MoveCharacterStraight (EGO, 330, 100, 1); ) so this happens at times. Of course I can work around it with little problems but I thought I'd mention it.

Hmmm, is your room a scrolling one (so (330,100) is indeed a point inside the room bg) ? If not, the character is standing outside the background, which is probably considered a nonwalkable area, so he may not be able to walk anywhere (I'm not sure if it really behaves like this though).

SMF spam blocked by CleanTalk