The sequel to "Outpost:Haven"4.06 / 5.00 33,807 Views
Hunt The Candy!!!3.83 / 5.00 11,329 Views
A thrilling rush through cyberspace!3.78 / 5.00 35,158 Views
This covers very very basic inventory creation, no knowledge of arrays needed ;)
My next inventory tutorial (Inventory 2) will cover better inventory creation.
This will allow you to create:
A simple 1-about 20 object inventory.
So let's begin:
All objects (that are pickable) on the screen need to have an ID (identifier number to differ them from other objects), and the following code
_root.inventory[_root.available].gotoAndStop(<id code here>);
remmember to have _root.available=1 on the first frame actions;
each ID will have it's frame on the inventory symbol, the inventory symbol itself is a square movieclip. remmember to name each inventory symbol inventory1 inventory2... inventoryN
now on _root you need to select available, paste this code, the onEnterFrame part runs every frame, if you don't want to mess with this code, you can just create 8 different inventory symbols, each with a different "object" to fit, and each will have gotoAndStop(2); when the object is present and gotoAndStop(1); if it's now.
every time you click an item (add it) you
btw, to remove an item you move every item in the following inventory ID's (1... N) one MC back, and change a var or something.
So how do I check for the objects?
run a simple loop on the inventory symbols or keep a variable ;)
ask any questions, wasn't very detailed, so feel free.
You're really getting into this AS:____ stuff? I need to think of a good tutorial to make, while I'm on the subject :-)
I kinda wanted to make a basic tutorial since most of my stuff is advanced and probebly won't reach that much people ;)
yea, I'm getting into AS: _____ stuff :P
Wow, this could come into handy when making future games. The AS: collection is so handy.
"Actually, the server timed out trying to remove all your posts..."
At 10/17/05 01:52 PM, Ninja-Chicken wrote:At 10/17/05 11:06 AM, IWantSomeCookies wrote: Wow, this could come into handy when making future games. The AS: collection is so handy.Wow Observation of the year award
You're not funny loser.
At 10/17/05 02:07 PM, oscar_the_duck wrote:At 10/17/05 01:52 PM, Ninja-Chicken wrote:You're not funny loser.At 10/17/05 11:06 AM, IWantSomeCookies wrote: Wow, this could come into handy when making future games. The AS: collection is so handy.Wow Observation of the year award
ha ha welcome to newgrounds prick oops sorry youve been here a while so you should know the rules including
At 10/17/05 03:49 PM, Ninja-Chicken wrote: ha ha welcome to newgrounds prick oops sorry youve been here a while so you should know the rules including
actually that account was created by puzz over a year ago, the password is pretty well known, it could be just about anyone
At 10/17/05 04:13 PM, Inglor wrote:At 10/17/05 03:49 PM, Ninja-Chicken wrote: ha ha welcome to newgrounds prick oops sorry youve been here a while so you should know the rules includingactually that account was created by puzz over a year ago, the password is pretty well known, it could be just about anyone
Why is there only 2 posts then?
Oh well whoever it was is a fag and is obviously too scared to show who they really are
i dont get it... its not explained very well for someone who hasn't the faintest idea what the hell your talking about...
fixed it, if your using flash mx, this will replace the code on the item:
Stop(<id code here>);
hope that helps ;)
the briefness of this confuses me. so you make an MC with an instance name of inventory
on the first frame in this MC add _root.available=1
make a button with no instance name. add this code to the button:
and then if you click the button it adds it to the inventory? not working for me... and im sure yall are gonna say nooooo you noob. well yes im a definate noob
none of this has worked!(im using flash 8)ive tried everywhere and nobody has any help!nothing works!i am such a noob and i know it but just please help!
We are the resistance, we are the underground, we are Newgrounds: home of the original cock joke.
The world takes everything too seriously.
This is not a signature.
ok see i have an inventory with five slots each instance names inventory1 inventory 2 and so on and so forth. i need the AS for when i click an object the object goes into the inventory slots.
It's basic, a little too basic.
I think you need to explain a little more.
If it fits into the basic section, you need to explain a lot because it's for beginners.
Good code in the end though. :)
Hey Inglor, your tutorial rocks, but I couldn't get one thing: how does the item add itself to the second slot if the first one is occupied?