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

#7181
General Discussion / Re:It's me birthday
Fri 07/11/2003 05:58:16
Harpy Berzdei!





Well I'm more than twice your age...
#7182
Each character in AGS has his own inventory, so you can do this by adding a dummy character (with transparent graphics).

Say, when you want to add "items" to the inventory of this nonplayer character, you may use something like "character[DUMMY].inv[5]+=1;" instead of the AddInventory(0 function, etc.

When you want to display the dummy character's inventory in a GUI, you can do the following sequence:
1. Change the room the dummy character to which the player character is currently in (so you wont experience a room change when the character is changed, you may also change the position of the dummy to match the player's coordinates, in care you're in a scrollable room and don't want the viewport be changed), eg:
character[Dummy].room=character[EGO].room;
character[Dummy].x=character[EGO].x;
character[Dummy].y=character[EGO].y;

2. Temporially change the player character to that dummy one, so you can display his inventory, eg:SetPlayerCharacter(DUMMY);

3. Just turn on a GUI with inventory, the inventory content displayed should be those of the dummy character.

4. When finished, just set the player character back, eg:
SetPlayerCharacter(EGO);
#7183
This had been discussed a bit on, and I think I'll start a new thread for it now.

History:
Since the releases of the V2.57 betas, you can now dynamically  create new sprites in game via loading external graphic files or screenshots saved in savegame files. This sprites can be created and destroyed dynamically in game, and have their sprite slot numbers assigned fuzzily (like the overlays) and are not controlled by the sprite cache buffer, any addition of such kind of sprites will consume physical memory.

Drawbacks:
1. Since the Animation Views cannot be dynamically modified currently, those dynamically created sprites cant be used in animated stuffs using Views, so it is not suitable for characters and such, only suitable for overlays, objects, or raw draw sprites on backgrounds.
2. Currently no way to set whether the created sprite is hires or not.

Possible solution:
1. First, since we can now have 2 types of sprites in game, those controlled by sprite cache and those which are not ('dynamic' ones), I suggest that one more option can be added to sprites in the sprite manager of AGSEdit, the "Can be modified in game" checkbox option, when a sprite has this option checked, it's not controlled by the sprite cache in game, so it MUST be loaded into physical memory when the game starts (so it will consume much memory if there're many/large such sprites, but that's the responsibility of the game creator himself to manage this), then these sprites can have their contents dynamically changed in game. The advantage of this is that now their sprite slot numbers are predefined and static, thus can be used in Views, and that you can set in AGSEdit already whether they are hires or not.

2. Additionally extending the ability of the raw functions to draw on sprites can be useful (eg making custom character graphics). Suggested new functions:

CreateBlankSprite(int width, int height, int fillcolour, int hires)
Create a blank sprite of dimension width * height filled with fillcolour (-1 for transparent) which can be drawn on, and if hires is non-zero, the sprite is created as high res ( (2*width) * (2*height) screen pixels), returns the slot number of the newly created sprite if successful, returns -1 if failed.

RawXXXSprite(Blargh)
Basically make most of the BG Raw Draw functions work for dynamically assigned sprites (ie., those created by LoadImageFile(), LoadSaveSlotScreenshot(), CreateBlankSprite() or set to be editable in the sprite manager, attempt to draw to other "static" sprites would cause an error). Considerations are:
(a) the coordinates used in these functions are pixel perfect according to the sprite content itself, so you can draw hires graphics on hires sprites, say for example. If in case the functions draw in areas outside of the legal sprite size, the results are cropped.
(b) pass colour as -1 to draw transparent colour.

Suggestion 2 may be tricky to implement, but I think even if only 1 was implemented, it can still be useful.

#7184
Yes but for repeatedly execute (non blocking now), you may add some checking to it, otherwise, the same action would happen whenever the character 1 had reached that spot (worst of all, char 1 would stop at that pt, so the codes would be executed EVERY game loop from there).

And, my mistake, I wrongly used the &&, the following should work:

while((character[1].x!=BLAH)||(character[1].y!=BLARGH)) Wait(1);
MoveCharacter(2, Blargh Blargh Blargh);
#7185
Because you cant. For Movie Video AVI files, they MUST be separate files in the game's directory, at least for now.
#7186
Actually that may involve rawdrawing on sprites, which is prolly a complicated stuffs, some discussions had been started for that, but not a standalone thread yet, I'll start it soon.
#7187
I am currently using www.villagephotos.com, the main restrictions about free account are that:
1. You can only hold up to 25 images (if you need to add more, you can delete old ones first)
2. The bandwidth/day limit is quite low, so it's definately NOT suitable for Avatar hostings.
#7188
if would only execute once, but while would continue to execute when the expression in it is still true, so you need a while.
#7189
Heh it's not strange, as it should work, as stated by CJ, just that he won't bother updating the editor to display everything.
#7190
If you don't mind the script to be blocked, just do:
while((character[1].x!=BLAH)&&(character[1].y!=BLARGH)) Wait(1);
MoveCharacter(2, Blargh Blargh Blargh);

Otherwise you may need to set up something in the repeatedly execute and stuff (I'm to lazy to write these stuff, unless you really need it).
#7191
Quote from: Ghostmaker on Thu 06/11/2003 09:03:25
If America calls Iraqs nuclear weapons "weapons of mass destruction" what do they call their own nuclear weapons, and why dont my nuclear weapons work.

I can answer it for you, no need to wait for DG:

1. Gadgets of Mass Salvation
2. Because you're holding teh radioactive material in your bare hand without a container, so you die before triggering teh weapons!
#7192
General Discussion / Re:Does The Matrix Suck?
Thu 06/11/2003 08:31:22
Matrix sucksksksk for sure, yet I had spent years with it in my studies.













... Whoops! Wrong matrix!
#7193
I'm not sure, but did you tried importing a TTF font and really tried typing these letters in? Though they're not displayed in teh editor's font screen, it may work.


I can confirm that double-byte encodings (CJK fonts) won't work though...  :(
#7194


;D

Well... Joseph Diperla IS Yurok, and he's still around,. He just posted 2 days ago, so shhhhhhh, f00!1! ;D
#7195
I remember this one time, when I upgraded my test game for a programme called Adventure Creat0r from V1.14 to teh equivalence of V2.04 of it. Then I use teh all new and sound "delete sprite" feature of it...

...


...


...


...


* Gilbot V7000a cries...  :'(
#7196
Beginners' Technical Questions / Re:Font!
Thu 06/11/2003 06:35:39
Hmmm that shouldn't happen, as all the font data would be included in the game files. Can you post a screenshot about what actually happened?
#7197
Quote from: MrColossal on Wed 05/11/2003 11:16:38
i know it's crazy] and we don't want to get them in trouble do we butcher?

Still not recovered from the accusation of you posting pr0n jumpy sprite on your page, ERIC?

Hehehe Butcher personally I won't care much about your funny avatar, however as I don't want to be discreet reading the forums while I'm at work, I'll say you'd done a good move in changing it.




PS. Do you have the whole body pic of it? ;D
#7198
Try opening the files with M$Pain, and resave them as 24bit colour, see if that works.
#7199
* Gilbot V7000a bombs teh PACMAN in Eric's old sig!1!

* Gilbot V7000a also rapes teh little man in Eric's old ... WAIT! NO!

Personally I think large sigs are abit annoying, but may not hurt that much, unless there's a HUGE picture in it.
#7200
Beginners' Technical Questions / Re:Funny..
Wed 05/11/2003 09:02:26
If that object has no mouse click interaction, just put in the "player enters room for the first time" event function of that room the following line of script:

SetObjectClickable(2,0);

which would make object, say, #2 in that room to ignore mouse clicks, check out the manual for SetObjectClickable() to learn more of this function.
SMF spam blocked by CleanTalk