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

Topics - pslim

#21
Hey.

My PC has two inventories, which appear in the same inventory box, but at different times (handled when the player clicks the buttons associated with each set of items). The item categories are not anywhere near the same sizes, so I need to have two separate item height/width designations, imposed by clicking the same buttons on the icon bar.

I tried setting the ItemHeight and ItemWidth properties within the code that's performed as a result of the player clicking on the buttons to bring up the inventory window, but that seems to do very strange things like not show any items in one inventory set and only showing one in the other.

The code associated with the two buttons is as follows:

Code: ags
function btnIconInv_Click(GUIControl *control, MouseButton button) {
Ã,  

Ã,  CopyInventory(1, 12); //copy inventory
Ã,  UpdateInventory(); 
Ã,  invCustomInv.Height = 25;
Ã,  invCustomInv.Width = 30;
Ã,  gui[2].Visible = true; //open inventory 
Ã,  mouse.Mode = eModeInteract;
Ã,  mouse.UseModeGraphic(eModePointer);
Ã,  gIconbar.Visible = false;

}


The other one is identical, with the exception of having different variables called in CopyInventory();.

In the GUI editor I have the size of invCustomInv as 211x127 and item size as 120x18 (the size of the other set of inventory items).

If I take out the height/width code and just use the settings in the GUI editor, everything works. I'm confused.Ã,  :=

#22
Hey there.

In my current game, there is only one main character, but I need him to have two inventories. Having the secondary inventory show up is no problem, and I have that all set up, but interaction is another thing altogether.

I'm handling inventory clicks in script. At the moment, if I click on an item in the secondary inventory (owned by an invisible character whose only function is to have this inventory), the game crashes with an error saying that my PC doesn't have the item, and refers to the line of the global script where I've told it to set the active inventory to what the player just clicked on.

There's an old thread from 2003 that deals with exactly this issue, and Scorporius posted what looks like a brilliant solution, but I can't get it to work.

He proposes having a separate character for Ego's main inventory AND for the secondary inventory, and to copy the contents of one or the other into Ego's actual coded inventory depending on which inventory set the player intends to bring up. The code he posted (with some changes due to AGS updates that I muddled through after many error messages) is as follows:

Code: ags
function CopyInventory(int CharID1, int CharID2) {Ã,  Ã, //Copy Inventory
int INV_MAX = 300;
int i=1;
while (i<INV_MAX) {
character[CharID1].InventoryQuantity[ i ] = character[CharID2].InventoryQuantity[ i ];
i++;
}
}


This, he says, will copy one character's inventory onto another's. Then you're supposed to call the following when you open the GUI associated with the inventory you want to use:

Code: ags
Ã,  CopyInventory(1, 12); //copy inventory
Ã,  UpdateInventory(); 
Ã,  gui[2].Visible = true; //open inventory 



It compiles, but when I push the button with the above code associated with it, I get a crash and an error that says "Character.InventoryQuantity: invalid inventory index."


Any help would be greatly appreciated. I've been at this all night.Ã,  :-X
#23
The Story:Ã, 

Ã,  As a mechanical technician on a prison freighter, Ben Agincourt is satisfactory at best. He has always felt as though there were something else he'd rather be doing, but never managed to discover what it was. Now it may have discovered him.

Ã,  The Zero Colony run is a routine trip from the heart of modern civilization into the outskirts of deep space, where Zero Colony, a privately operated, maximum security prison world orbits a sickly green sun. Unfortunately for Ben, this is no ordinary Zero Colony run.

Ã,  Unruly convicts, incompetant allies, unfathomable alien races and brutal alien worlds stand between Ben and the truth. When he finds himself master of a damaged ship manned by an untrained skeleton crew, will he have the wit and courage to take the helm or will his one chance at command deteriorate into interpersonal drama and chaos?

Ã,  NTR is a duo effort and is kestrel's and my first game.


Screenshots:








Development Progress:

Story: 60%
Scripting: 30%
Graphics: 50%
Sound/Music: 50%

Features:
Dialogue portraits
In-game journal
Dialogue and deductive puzzles
Dynamic character interaction

Development Diary:

14 July 2006
No Traveller Returns is a dark science fiction game with particular emphasis on dialogue and character development. We're planning for it to be a full length game, but we decided to post a production thread when we had a playable demo to show.

15 July 2006
Found a bug involving the keyboard shortcut for bringing up the journal. Fixed and reuploaded.Ã,  :)

Please note that the game (and the demo) includes some gore and objectionable language.

The playable demo is here (thanks to SSH!).
#24
Hints & Tips / The Shivah
Sat 01/07/2006 05:27:32
Nevermind, I figured it out.


But, hey. Someone else might need the thread.  :=
#25
I'm working on making a GUI-based in game journal. So far I've created the GUI and added a list box to it, and experimented with adding items to the list box both in the global script and from the room script. All of that works fine thanks to the help I got in my Strings question.

I'm realizing now, though, that the list boxes have some peculiarities which make them seem not very well-suited to journaling for someone who knows as little about scripting as I do. For example, if there is a way to word wrap inside a list box, I'm not aware of it. To get the entries to fit into the GUI, I've had to break them up into multiple strings and format manually. This is not really a serious hardship, but it seems an inefficient way to go about it; I just don't know enough to think of a better way.

The main issue I have right now, though, is that only one (or two, max) journal entries will fit on the GUI at one time. I need a way to allow the player to scroll down in the list box, or turn pages in the list box. The only way I can think of to do it is to have multiple identical GUIs and have the page flip buttons send you to the next GUI, which displays the next entry, but looks identical to the first. But that's going to leave me with like 20 journal GUIs, which, again, seems like the most inefficient method possible.

Could someone maybe point me in the direction of a better way to do this?  :=
#26
I'm trying to declare some Strings in my global script in preparation for implementing a journal in my game.

The manual says:

Upgrading to AGS 2.71
AGS 2.71 adds new simple string support to the scripting language. Strings have long been a pain to use in AGS, but this is finally addressed by v2.71.
There's a new String type (that's a capital 'S'). These new strings behave like Java/C# strings in that you can easily assign to and manipulate them.

For example, in 2.7 and previous versions, you had to do this:


string text;
StrCopy(text, "This is my text");

in 2.71, you can now do:
String text = "This is my text";



However, when I put the following code as a test, I got an error message when attempting to compile:

String message = "This is my message";

The error said, "Error in line 3. Cannot assign initial value to global pointer"

I tried doing just

String message;

And that worked but then I'm not sure how to tell it what value the string is supposed to have, and the manual seems to be under the impression I wouldn't have to do it like that anyway.

Clearly I'm missing something obvious, but I'm too inexperienced with scripting to figure out what. Any help would be appreciated.

#27
At least, I think that's what the problem is.

I'm making an intro sequence which, for the first two rooms, works fine. In the third room, however, which is just a Save As.. of the first one (so it should be the same, right?) I get a glitch in the bottom lefthand corner that shows a random frame of my PC's walk animation (the PC is hidden) when the room first fades in. The only difference between room 1 and room 3 is that room 3 transfers the ego character to a different room after it's played out the rest of the script.

Rooms 1 and 3 go like this:

In player enters room before fadein, I set two objects' views using the interaction editor.
In after fadein, I hide two GUIs and do start object animating on both objects using the interaction editor, followed by run script.

The script is:

Ã,  // script for Room: Player enters room (after fadein)
StartCutscene(eSkipAnyKeyOrMouseClick);
Wait(360);
EndCutscene();
player.ChangeRoom(7, 177, 138);Ã,  Ã, 


For Room 3, the ChangeRoom sends them to 8 instead of 7. Room 1 works without any problems. Room 3 has that weird glitch.

The glitch is similar to one I got when I tried to hide my iconbar GUI in the before fadein section, and it went away when I moved that command to the after fadein section. However, when I try moving the set object views to after fadein it doesn't seem to help at all (and having it in before fadein works for Room 1).

Hopefully someone has an idea of why this might be happening?Ã,  :-[
#28
Mostly I need help with shadows. I feel like the console should drop a shadow someplace but I have no idea where that would be.

The room is lit a bit from above, and also from the window. The console buttons, the holographic poster on the wall, and the panel next to the door all give off a small amount of light as well.

Any help with where large shadows should go would be much appreciated.





x2



I think I lost a couple of colors when I converted to 256 gif, particularly what is supposed to be a purple highlight on the left side of the right-hand door.

Also, for reference--this room has several functions, which made it difficult for me to figure out how to design, but they are:

1. Cutscene (so it needs to be at least very very vaguely cinematic)
2. Normal puzzle room
3. It must be able to comfortably fit at least 4-6 NPCs

Hence the empty space, which will be partly filled up at some points by a projection courtesy of the domed holographic projector in the floor.  :)
#29
I'm happy with the overall design, and with her upper torso, but her limbs seem a bit off to me, and I had a lot of trouble with the shading. The female form is really difficult for me to draw, for some reason. Any help would be appreciated.


She's a naughty space nurse, if that helps any.Ã,  :=



x2

#30
This has been driving me crazy for a while--I tweak the colors in my bg very carefully in photoshop, flatten it down and save it as a .pcx or a .bmp and when I import it into the editor it looks fine, although usually slightly darker than it looks in photoshop... then when I go to test the game, everything looks light and washed out, and minute color variations that weren't apparent in photoshop suddenly jump out and look awful.

I've tried 16-bit and 32-bit color, and I've tried pcx and bmp files, and none of the combinations seemed markedly different from one another. I also tried slashing the brightness of the pcx or bmp before importing it, and there was no real improvement when I opened the exe or used the test feature in the editor.

I'm thinking there must be a simple answer and I just haven't come across it in the FAQ or by searching this forum.Ã,  :-[

I hope.
#31
The rough of this bg is unfinished, and I didn't want to post it that way but it's giving me so much trouble that I felt like I could really use the help.



x2


(The blank area at the bottom is where the iconbar goes.)


It's probably not clear, but the light is supposed to come from those vertical light blue things in the top corners. They're gel or gas lights (like halogen lights, but, you know, futuristic, heh)... I think I shot myself in the foot making them the light source because I'm totally lost as to how to shade things, and lost as to how to detail the things that are very much in shadow. Any help would be appreciated, but help on those topics would be especially appreciated.

I haven't attempted to add much texture yet because I've been trying for several days with these issues and haven't been able to move past them.Ã,  :-[


EDIT: I changed the lighting around. I think it looks a bit better, but it still needs a lot of help. :X
#32
Critics' Lounge / low-res character sprite
Sat 15/04/2006 14:03:20



This is the main character in a science fiction game I'm working on. He's wearing a space spandex uniform (mrrowrr). The cuffs are actually part of the overall top, they're just there to indicate rank, in addition to the collar which serves the same function. Any constructive comments would be most welcome.

I suspect he's overly symmetrical. He's not the straightest arrow in the arrowbox by nature, but I also don't want him slouching all over the place like some characters do. He has to make a cursory attempt to keep up appearances on the job. Draw overs are totally welcome, but I'd hope they would be kept in the same style since I won't be able to use suggestions that are too far outside of that. :)
#33
Hey, guys.

I searched the beginner's technical forum for a problem similar to mine and didn't find one, so I'm going to go ahead and post the question.

I'm working on a cutscene and I need to disable GUI 1, my persisent icon bar. First I tried using the pull-down menu in the interactions section, where I also disabled GUI 0, my status line, in Player-enters room (before fadein).

I also have an 8-frame object repeatedly animating as a background (scrolling stars... this might not be the best way to do it, but it was the first thing that came to me). Anyway, the animation worked fine with the GUIs enabled, and it worked fine with GUI 0 disabled, but when I disabled GUI 1, I got just a black screen with a few seemingly random sprites (some of which don't appear on any view of any object or character) cycling at the lower left corner of the screen.

I thought this might be some sort of version to version glitch so I took out the pull-down version of hide GUI and added a run script event in before fadein. I used

gIconbar.Visible = false;

which compiled with no problem, and then created the same issue as before when I went to test my game.

Is GUI 1 a special GUI I'm not supposed to mess with? Its visible status is normal, and the manual says that GUI.Visible will work with GUIs of that status, so I'm stumped.

Any help would be appreciated. :)
SMF spam blocked by CleanTalk