AGS v2.7 Final: Yet Another Edition

Started by Pumaman, Sat 13/11/2004 21:02:00

Previous topic - Next topic

strazer

QuoteMouse.SaveCursorUntilLocationChange ?

A bit unwildy but the autocomplete feature should safe us there Smiley

Yeah, "Cursor" should definitely be in it, since that is what will be saved, but I think we should avoid using the term "Location".
Hm, Mouse.SaveCursorUntilLeave?

Pumaman

QuoteIt didn't work for me. I loaded my v2.62 game up, changed a few local variable names (gui, object and so on), then tested it. The inventory items didn't show up (as they used to).
I resized the inventory control to the default dimensions set in the properties window, then they showed up.

Ah yes you're right, it's not working as it should; I'll get it fixed.

QuoteAnother thing: Is InventoryItem.RunInteraction still a delayed function? If so, it should be noted in the manual.

No, the RunInteraction commands aren't delayed. However, obviously if the interaction runs a script then that won't happen until the calling script finishes.

QuoteAll the names in autocomplete are alphabetically sorted (and that's cool I think, because we can for example group the related properties, variables and functions together by adding a lowercase prefix). But would it be possible to make sorting case-sensitive so that instead of:

I can see how that'd be handy, but I'm not sure whether scintilla (the text editor control that AGS uses) supports this behaviour. I'll look into it.

QuoteMouse.SaveCursorUntilLocationChange ?

A bit unwildy but the autocomplete feature should safe us there

Yeah, perhaps that would be best.

As strazer says, I don't really like "Location"; it's a pity there's no one word meaning "interactable thing" I guess ;)

strazer

QuoteNo, the RunInteraction commands aren't delayed. However, obviously if the interaction runs a script then that won't happen until the calling script finishes.

Heh, right, I completely forgot about those strange interaction editor commands... ;)

QuoteAs strazer says, I don't really like "Location"; it's a pity there's no one word meaning "interactable thing" I guess

Hey, how about "entities"? Mouse.SaveCursorUntilEntityChange? Or Mouse.SaveCursorUntilLeaveEntity?

Rui 'Trovatore' Pires

Oh brother, here I go again.

checkhot=GetHotspotAtLocation(mouse.x, mouse.y);

"checkhot" is something I globally defined as a "hotspot". HOW do I set it to "whatever hotspot the mouse is over" with the new functions?

EDIT - This is probably silly and very easy, but my brain's fried right now...
Reach for the moon. Even if you miss, you'll land among the stars.

Kneel. Now.

Never throw chicken at a Leprechaun.

Pumaman

Quote from: strazer on Sat 15/01/2005 22:26:09Hey, how about "entities"? Mouse.SaveCursorUntilEntityChange? Or Mouse.SaveCursorUntilLeaveEntity?

That's not a bad idea; but then, I don't really want to confuse people with too much new terminology, and 'Entity' would only cause questions I feel. It's a tricky one to be sure.

QuoteOh brother, here I go again.

checkhot=GetHotspotAtLocation(mouse.x, mouse.y);

"checkhot" is something I globally defined as a "hotspot". HOW do I set it to "whatever hotspot the mouse is over" with the new functions?

I'm not entirely sure what you're asking, but the replacement for GetHotspotAtLocation is Hotspot.GetAtScreenXY, so you'd just do:

checkhot = Hotspot.GetAtScreenXY(mouse.x, mouse.y);

Rui 'Trovatore' Pires

Oh? I can use "Hotspot"? I thought I HAD to use a specific hotspot in there, a hotspot name or a hotspot[2] or something. Great! I thought objectised functions made these more generic things impossible... but if in things like this I can use Hotspot, Character and whatnot... yay! I thought flexibility had gone, and yet it's still here! Thankee sai!
Reach for the moon. Even if you miss, you'll land among the stars.

Kneel. Now.

Never throw chicken at a Leprechaun.

Scorpiorus

#306
QuoteHey, how about "entities"? Mouse.SaveCursorUntilEntityChange? Or Mouse.SaveCursorUntilLeaveEntity?
Or maybe SaveCursorUntilLeaveArea - meaning some screen area where interactable thingies are. Then again, not the perfect and can be confused with a walk-able area. Is there some equivalent word to "leave" accenting its mouse-to-move relation?

Quote from: Rui "Puss in Boots" Pires on Sun 16/01/2005 23:37:49
Oh? I can use "Hotspot"? I thought I HAD to use a specific hotspot in there, a hotspot name or a hotspot[2] or something.
Yeah, you type "Hotspot" to access general (not a certain hotspot specific) functions and "hotspot[ x ]" or a hotspot script-o-name if you mean a certain hotspot to work with.

RickJ

Quote
Or maybe SaveCursorUntilLeaveArea ...
How about something like SaveCursorUntilPositionChange or SaveCursorUntilDeltaXY

SSH

#308
Rick: but its not an XY change that restores the cursor, its moving off the char, object or HS

I found a problem with dynamic sprites: I can't have an array of them either inside or outside of a struct! Arrrgh!

A way to solve this problem would be to have a function:
DynamicSprite *GetDynamicSpriteFromSpriteNumber(int spriteno)

which basically does the opposite of the dyanmic sprite Graphic property. That way I can have an array of sprites like I used to before 2.7


Oh, and the manual page for CreateFromSaveGame still has a link to DeleteSprite at the bottom
12

Necro

That AGS QuickRef is gonna need an overhaul SSH  ;D

As for the CursorChange , can it not simply be simplified, Mouse.SaveCursor

I see no reason why if needs to be elaborate, and like someone said above If you do make it lengthly Mouse.SaveCursorModeUntillItLeavesTheHotspotLocation then we still have the autocomplete ^^

Pumaman

QuoteOh? I can use "Hotspot"? I thought I HAD to use a specific hotspot in there, a hotspot name or a hotspot[2] or something. Great! I thought objectised functions made these more generic things impossible... but if in things like this I can use Hotspot, Character and whatnot... yay! I thought flexibility had gone, and yet it's still here! Thankee sai!

Yep, these are what's called "static functions". I'll add some sort of explanation to the Upgrading Guide.

QuoteOr maybe SaveCursorUntilLeaveArea - meaning some screen area where interactable thingies are. Then again, not the perfect and can be confused with a walk-able area. Is there some equivalent word to "leave" accenting its mouse-to-move relation?

How about SaveCursorUntilLeavesArea (with the 's' implying the fact that it's talking about the cursor leaving)?

Quoteor a hotspot script-o-name

Ooooh, "script-o-name", I like it. Sounds like something you'd find at a fairground :)

QuoteI found a problem with dynamic sprites: I can't have an array of them either inside or outside of a struct! Arrrgh!

Good point. The easiest solution here might be to implement arrays of pointers, I'll look into it.

QuoteOh, and the manual page for CreateFromSaveGame still has a link to DeleteSprite at the bottom

Thanks; it also occurs in a couple of other places, I'll fix it.

QuoteAs for the CursorChange , can it not simply be simplified, Mouse.SaveCursor

I see no reason why if needs to be elaborate, and like someone said above If you do make it lengthly Mouse.SaveCursorModeUntillItLeavesTheHotspotLo cation then we still have the autocomplete ^^

Well, it's such an odd piece of functionality that "SaveCursor" could well mislead people about what it does, so I think it justifies a longer name.


strazer

#311
QuoteHow about SaveCursorUntilLeavesArea (with the 's' implying the fact that it's talking about the cursor leaving)?

I like that, although I'm not too fond of the "Area" part.
Doesn't SaveCursorUntilItLeaves basically say the same thing?

SSH

I vote for SaveCursorUntilTheMouseMovesOverADifferentObjectHotspotOrCharacter
12

Scorpiorus

#313
Quote from: Pumaman on Mon 17/01/2005 19:20:31Ooooh, "script-o-name", I like it. Sounds like something you'd find at a fairground :)
Hehe, I don't even know how I came to type it like that - probably, that's how Script O-name remained in my mind. :)

QuoteGood point. The easiest solution here might be to implement arrays of pointers, I'll look into it.
Oh, arrays of pointers -- this would be an ultimate feature to have for the new OO system.

By the way, about having pointers within structs: if that were possible then how would a circular reference be made?

Quote from: strazer on Mon 17/01/2005 21:05:39I like that, although I'm not too fond of the "Area" part.
Doesn't SaveCursorUntilItLeaves basically say the same thing?
With this "s" at the end it seems rather suitable to me. At least we won't have "location", "area" or other a bit of confusing terminology that way. :)

EDIT:
Quote from: SSH on Mon 17/01/2005 21:41:49
I vote for SaveCursorUntilTheMouseMovesOverADifferentObjectHotspotOrCharacter
...OrLeavesInventoryItemsGUI ;D (it's not in the manual but seems to behave like that)

Gilbert

I'll say:
Mouse.SaveCursorHere()
So it may be changed when it leaves here and goes there. :=



Kidding of course. ;D

RickJ

Quote...  implement arrays of pointers, I'll look into it.
As Homer Simpson would say "Ummmmm, arrays of pointers...".

Quote... SaveCursorUntilTheMouseMovesOverADifferentObjectHotspotOrCharacterOrLeavesInventoryItemsGUI()
Hehe, That would make a swell easter egg to lay on some noob asking for advice. :=

Dan

First of all, many thanks CJ for updating the scripting to OO. This should make things a lot more powerful and flexible :)

Now, I can't seem to get my game to convert to 2.7 beta 12. When I load it I get prompted to update all the rooms to the new version, only every one fails with the following error:

There was an error compiling your script. The problem was:
Error (line 30): expected variable or function after import
Your room has not been saved.

Its the same error for every room, which is strange since line 30 is different for each one. The wording of the error led me to believe it was something to do with the script header, but it seems fine:

Code: ags

import function UpdateGUI(int, int, int);
import function RespawnChar(int, int);
import function DeadChar(int);


If I then make a change to the room script and try to recompile I get:

There was an error compiling your script. The problem was:
In: 'Internal character defines'
Error (line 30): expected variable or function after import

Only the line number changes depending on what I do to the script (add/remove lines).

Sorry for the long post, which I post here since I think it may be a bug ;D Any ideas? I can upload the game somewhere if it will help.

Thanks m8s,
Dan.

Rui 'Trovatore' Pires

#317
The problem is a certain line in your script, hence
QuoteOnly the line number changes depending on what I do to the script (add/remove lines).
What is the line? Most likely, it's something that got outdated.[/s]

Nevermind, I didn't read closely. But do check your variables and the lines. This new version made some interesting changes. Double-check everything. I've had similar trouble before, and it was ALWAYS something I'd overlooked. Pay special attention to the variables used in line 30.

And just to be on the safe side, check line 30 of the Global Script too.
Reach for the moon. Even if you miss, you'll land among the stars.

Kneel. Now.

Never throw chicken at a Leprechaun.

Dan

#318
Thanks for the quick reply Rui.

I've checked the scripts, and everything seems okay? I've tried commenting out the imports in the header, so I don't think the problem lies there. I also commented out the functions in the global script, and still the same error (line 30 of the global script was in one of those functions). The room scripts have various commands at line 30, none of which use any vars at all (Display, RawSaveScreen, etc).

So whatever the problem with my script is, its not at line 30 ??? I'll just add that it compiles fine in 2.62.

I've upped it to http://freetohost.co.uk/dan/noworky.rar (2.63MB) if anyone has a minute to have a look

EDIT: Problem solved, many thanks :)

Cheers,
Dan.

Rui 'Trovatore' Pires

I gave it a check. It really is odd. I didn't look at it in-depth, though. I'll leave it for someone more experienced.
Reach for the moon. Even if you miss, you'll land among the stars.

Kneel. Now.

Never throw chicken at a Leprechaun.

SMF spam blocked by CleanTalk