Wednesday, March 30, 2011

Alien Artifacts Full Screen Inventory GUI Part 3

So far I've created my first "Alien Artifact" and it's PNG icon that is supposed to show up in the position you see on the left (lower window). Right now there is no working code supporting any of this until I can get something that works. I have a code in progress but it is very much incomplete at the moment as I don't know that much about the code to finish it off and get this part of my game working. Right now I just have these two element set up a GUI textures that I have tweaked into position using the values in the inspector window of unity 3D. It's my hope that the code will place my "Alien Artifact" icons just like I have started to do here.

Here is the code I have as a work in progress at the moment:

var i = 0;

var alienArtifacts = 0;

if(i == 1)
//put the code that makes the item holder here
//you might want to add code for which ones you have got


if (/one of the artifacts was picked up/)
alienArtifact ==1; //other stuff like what artifact was picked up

function Update () {
transform.position.x = 0;
transform.position.y = 0;

guiTexture.pixelInset.x = 0;
guiTexture.pixelInset.x = 0;

guiTexture.pixelInset.width = Screen.width;
guiTexture.pixelInset.height = Screen.height;
As you can see it's very much not finished and needs a lot of work. Man I could really use a code person on this project. I also need this code to disable that weapon, health & ammo stats GUI you see in the lover left hand corner also, so that way when the player presses "I" the "Alien Artifacts" GUI pops up and nothing else is visible until ["I"] or ["Esc"] perhaps to exit from the inventory screen.

1 comment:

Jordan Knudsen said...

hey if you go back to unity3d answers you will see that I have updated the code although it's not done yet