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

#5281
in your global script, add 'int health;' at the top, and 'export health;' at the bottom. In your global header, add 'import int health;'.
Then in repeatedly_execute, add something like
Code: ags

  if (AreCharactersColliding (EGO, enemy)) health --;
  if (health <= 0) GUIOn (GameOverGUI);

#5282
That's kind of interesting because you can, in fact, place GUIs partially or wholly off-screen.
My guess is that RMWID,RMHIT mean room width and room height, respectively. What kind of GUI are you using (modal, y-popup, persistant...) ?
#5283
Wow, another quick update! Cool!


Quote from: Pumaman on Fri 26/03/2004 17:47:57
Quote from: Radiant on Wed 24/03/2004 11:45:22

QuoteIf I use a blue cup or similarly sized image, I don't get a screenful of blue cups, I get only a couple and they're spaced five to ten pixels apart.
I haven't been able to replicate this. What game resolution are you using?
320x200. My point is that AGS seems to put a certain border between any two instances of the background image. So you get (cup)(space)(cup) instead of (cup)(cup)

Quote
Quote- the image offset for slider controls works fine while viewing a GUI from the editor; however in the game the offset works from the center of the slider rather than its left edge. Can be worked around easily of course, but slightly confusing.
I don't know what you mean here - the offset simply adds a fixed amount to the X co-ordinate of the handle. It has the same effect in the editor and engine.
Strange. Whichever way I set a GUI slider image in the editor, it appears roughly ten pixels more to the left within the game itself. So I have to put it too far to the right in the editor to make it appear correctly in the game.

Quote
Quote
- FaceCharacter (EGO, EGO) always turns EGO to the left. For that matter, so does FaceLocation if EGO is standing on that location.

Hehe I guess it should really leave the direction unchanged if you do this. Quite why you would use  FaceCharacter(EGO, EGO); is beyond me though :P
I was testing the unhandled_event() function, and coded it so that whenever you click on a character, EGO turns to face that character. So if you click on EGO himself...

Oh and one more detail I noticed. When I set a character's speed to zero, the game crashes. I figured it would have been a nice way of stopping that character from moving, and am now using another workaround.
#5284
Beginners' Technical Questions / Re:death
Fri 26/03/2004 14:03:47
Alternately, make a 'restore/restart/quit' gui and pop it up modally.
#5285
You'd need the on_event () function, check the parameter GUI_MDOWN. Not every mouse click passes to on_mouse_click ().
#5286
Oh sorry for the misunderstanding. I'd give it a try but I won't have any time for the next two weeks. After that it's holiday so if you haven't found anybody by then drop me an e-mail.
#5287
Hints & Tips / Re:kings quest 1
Wed 24/03/2004 15:58:26
Ken.
No, you know that's not right.
Check your fairy tales for a gnome that spins straw into gold, and taunts that nobody knows his name.
Close, but no banana.
Now read the note in the witch's hut and do the math.
#5288
No, it's because Def is also known to stand in front of moving couches, to walk on shipdecks at thirteen-beaufort, and to catch nasty deadly diseases at random times :D
#5289
Create a ten-button Gui that looks like a keypad, and pop it up when touching the safe.
Then it's a simple matter of ifs.

Code: ags

function on_gui_click [sp] 
...
if (gui == SAFE_GUI) {
if (button == 1 && sequence == 0) sequence ++;
else if (button == 3 && sequence == 1) sequence ++;
else if (button == 8 && sequence == 2) play_open_safe_stuff ();
else sequence = 0;
}

#5290
What I would do is make a new room for it (which turns the player off, and disables all icons but touch and look). Then make an object of each moving part.

And add scripts. If you touch the chimney, it moves up if already down; it moves down if not, but only if the window is open. If you touch the door, it opens halfway if the window is open, all the way if the fish is in the bowl. Etc. Scripting is probably easier here than interaction editing.

Of course one could use a three-dimensional matrix for physical simulation but that seems overly complicated.
#5291
Okay another bunch of tiny bugs. Hope this doesn't bother you. Again most of them are not very important, but a couple actually are this time. And thanks for the efforts put into the new beta, esp. repeatedly_exec_always.

- adding a background graphic to a slider doesn't seem to work well. If I add one the exact size of the control, it doesn't appear. If I add a (much) smaller one, it is tiled but starts roughly ten pixels to the left of the actual control. If I use a blue cup or similarly sized image, I don't get a screenful of blue cups, I get only a couple and they're spaced five to ten pixels apart. Sorry if this sounds confusing.

- the image offset for slider controls works fine while viewing a GUI from the editor; however in the game the offset works from the center of the slider rather than its left edge. Can be worked around easily of course, but slightly confusing.

- maybe the background image for a textbox GUI should be tiled, just as one for a slider control? After all you never know how large it's going to be. Currently I have a 320x200 image just to make sure.

- would it be possible to add a background pic for the topbar in DisplayTopBar?

- currently the global (and local) messages are encrypted by the engine, but the strings used within scripts are not. I tend to put most of the information in scripts so if it isn't too much trouble I'd really appreciate encryption there, too.

- the character view preview is cool. However, when I check 'skip frame 0', the preview does pause for a short while whenever frame 0 would have been displayed.

- in the character view preview, the sprites are drawn without transparency, thus gaining a permanent pink border.

- when searching the help file, most tutorial pages ('getting started with ags, part X') have no title and are thus displayed as 'nameless' in the search result listing.

- Search function in the text editor always starts at the beginning of the script, rather than current cursor location

- Pressing ^G then ^Z in the text editor displays a 'BEL' character. Of course that's not important, just a bit weird.

- Pressing ^T in the text editor swaps the current line with the previous. Also not important at all but I was wondering if this was intentional, and if so, for what.

- FaceCharacter (EGO, EGO) always turns EGO to the left. For that matter, so does FaceLocation if EGO is standing on that location.

- repeatedly_execute_always does not execute when text is being Displayed, but will execute during a DisplaySpeech. However, in the latter case, IsGUIOn(MY_TEXTBOX_GUI) doesn't detect the presence of the textbox used during speech. In other words, how do I detect if speech is active?

- it could be me but it seems that the generated executable suddenly is a lot larger. Upon inspection it was found to contain a number of help texts for the scripting editor (?) and a whole range of names for extended ASCII characters. My ac2game.ags file is still roughly 900 kb, but the executable has leapt up to 2 Mb. Again, not really important.

Thanks for your time!


#5292
Kind of. In the top menu bar, below 'edit global script' are a number of options that let you edit parts of the global script. As of the latest beta you can customize which parts that would be, by moving certain #sectionstart and #sectionend lines around in your code (I'm not sure if that was intented by Pumaman but it does work that way :P )
Also you can use structs, and you can add member variables to characters, objects and invitems. It's not OO but it comes close.
#5293
As a CS major I can't help but appreciate good TLAs (okay, DETLAs) as that.
How about -Force?
#5294
Okay some more bug reports. All of these are of little importance but I just thought I'd mention them.

- the editor hot keys (^G and ^T for instance) don't work as long as the GUI information window is active (i.e. has its title bar blue)

- when displaying speech as 'sierra style with background', the text is displayed with a shadow / outline, even if it's on the textbox GUI. Kind of looks weird. However, this can be worked around by using a font without outline, or setting text_shadow_color to whatever your GUI background is.

- when loading a font file, AGS will (apparently) keep that file open, or at least locked, until AGS is quit. This means that it is not possible to rename or delete the file until AGS quits.

- reverting to default fonts does not remove all .WFN files from your directory (apparently it does remove some of them)

- dragging a GUI object does not update that object's X and Y positions as shown on the popup window, until you click on the GUI object once more

- when the 'write text backwards / hebrew' flag is set, text on GUI buttons is still written forwards. Labels are written backwards as they should. Also, I'm not really familiar with hebrew, but shouldn't numbers (1234) still be written forward?

- when 'handling inventory clicks in script' is on, the function on_mouse_click is not called when I click on a part of the inventory GUI that doesn't have a button, nor when I click on part of the inventory box that doesn't show an item. (however on_event does get called with GUI_MDOWN, which evades the problem)

- it would be nice if the value for 'lock GUI items in place' (and similar things) were stored in Editor.Dat so that they are kept for the next session

I'm right now downloading the newest beta so my apologies if any of the above are already fixed, but I did read the changelog at the beginning of this thread and didn't see it mentioned anywhere.

By the way I have a two-room demo game that works fine, except it crashes nastily if 1) I compile it in DOS rather than windows, or 2) I set speech to 'qfg4 full screen' (neither of which I actually need but it just came up when I was fiddling around). Would you like me to send it to you for checking?
#5295
Well, in the function at_start_of_game (or whatever the name was), add
SetGlobalInt (100, 50);

Then in repeatedly_execute, do something like
if (AreCharactersColliding (EGO, ENEMY)) SetGlobalInt (100, GetGlobalInt (100) - 1);

(edit) Okay, game_start it is. <grin> we must have been typing at the same time, I hadn't seen your post when writing mine
#5296
This sounds interesting, but since I've never played Lighthouse or Black Dahlia I'm not sure what you mean. Is it one of those 4x4 boxed sliding puzzles?
#5297
repeatedly_execute (_always)
#5298
Yes.

SetInvDimensions

SetInvDimensions (int width, int height)

Allows you to change the default width and height of the inventory item picture slots used by the Lucasarts-style inventory window. By default, the LEC inv window is made up of 40x22 pixel cells, but if all your inventory item pictures are bigger or smaller than this, you can use this function to adjust them.

Example:

SetInvDimensions(60,30);

if your inventory graphics are 60x30 pixels or smaller.
#5299
Gilbot -> the point (330,100) is outside the room bg. I'm assuming it's unwalkable, yes.

SSH -> okay, point taken. I'll shut up now.
#5300
You should pull a BTTF effect... you start at moment X, then do something in the past at moment Y, then return. And moment X has changed! I believe Legend has a game with this setting but I haven't really played it so I don't know how well they handled it.
SMF spam blocked by CleanTalk