Inventory

You must understand the Game Editor concepts, before post here.

Inventory

Postby MonteyPython » Tue Apr 21, 2009 6:21 pm

I've read the other posts about inventory's by GuybrushThreepwood and TheIllusionist, but i need help for a bit different kind of inventory. I was wondering if it would be possible to have an inventory like the one mentioned in the guys topics, but instead of just changing the the squares image, i was wondering if it would be possible to just move the actor itself to the square. And also like TheIllusionist, i would like it so that the item slide back a square. I know it's a lot to ask for, but any help would be much obliged :mrgreen:
MonteyPython
 
Posts: 24
Joined: Tue Apr 21, 2009 6:15 pm
Score: 0 Give a positive score

Re: Inventory

Postby skydereign » Tue Apr 21, 2009 11:49 pm

Okay, I can make this for you if need be. It would be some simple editing for me. I do need some answers on how you want it structured though. The problem with moving the actor is, what happens when you get more than eight items? You would have to change zdepth or other. I could have the square create the actor. So on mouse down you destroy it and the actor will then create it. But it sounds like you are trying to use the move to replace the array. Some of the earlier demos on GuybrushThreepwood's topic do what you are talking about... I think. Anyway, can you explain why you want this and hopefully I can fit the demo to those needs. The slide back a square has been implemented in my most recent version.
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: Inventory

Postby MonteyPython » Wed Apr 22, 2009 5:39 am

I want to do this because your other demos are too confusing for me, but I would be a blo to make thing happen with the item if it was actually the actor in the square
e.g.: Say i picked up a rock. I would be able to put an event that would be something like:mouse button down on say Look at option would activate an event on the items in the inventory. That event would be something like: mouse button down on event actor create actor text saying yup... its a rock
it's may be confusing, but it makes perfect sense to me :mrgreen:
MonteyPython
 
Posts: 24
Joined: Tue Apr 21, 2009 6:15 pm
Score: 0 Give a positive score

Re: Inventory

Postby skydereign » Wed Apr 22, 2009 8:58 pm

Okay, I understand what you want for the most part. How much should I sacrifice for your understanding? I know of several methods that would make the version you want more efficient. But the result is more complex. Advantage of that is that you can learn more from it. I need to know what you are okay with, or are okay with learning. Another alternative is I can explain my code, comment it, for you.

Do you understand?
variables
-global
-actor
-self made global
--Arrays
-Actor*
functions
Or are you fine with learning any of these? When you see how they work, they become very helpful, and some of them are not that complex.

I am working on it, but I really need to know what you are comfortable with, because this is hard if not impossible without certain things I listed above.
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: Inventory

Postby MonteyPython » Wed Apr 22, 2009 11:04 pm

skydereign wrote:Do you understand?
variables
-global
-actor
-self made global
--Arrays
-Actor*
functions


I understand variables, global, and actors. But I'm willing to take
MonteyPython
 
Posts: 24
Joined: Tue Apr 21, 2009 6:15 pm
Score: 0 Give a positive score

Re: Inventory

Postby MonteyPython » Tue Apr 28, 2009 2:22 am

Hello? You still there skydereign? it's ok if what i'm asking for is impossible, i'll just try to figure out your other demos :mrgreen:
MonteyPython
 
Posts: 24
Joined: Tue Apr 21, 2009 6:15 pm
Score: 0 Give a positive score

Re: Inventory

Postby skydereign » Tue Apr 28, 2009 3:06 am

Yeah, I have been really busy as of late, and it is difficult for me to sacrifice efficiency. I am trying to keep it as simple while efficient as possible. I do have a question, you still want it to be able to hold more than the eight items, neh? I ask this because if you are storing the actual items/actors, I would need to create a zdepth sorter that controls the items spot according to a variable. This would then use the array storing items, or get rid of the array, but that can get pretty complicated sorting it all. Long story short would be that it is not impossible, but it may take awhile to sort out... I do have an idea, which may make this easier, if it works, I may have a demo up sooner than later.
Though it would be a lot easier if I could just explain one of my other demos. The most recent is probably too confusing for you, as you are just starting scripting, but I have another one that is pretty basic. It would actually make a lot more sense then using a zdepth categorizer, as the logic can get very convoluted. But I will still need to fix bits of the earlier demo.
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: Inventory

Postby MonteyPython » Tue Apr 28, 2009 4:26 am

Awwwwwwwwwww shoot :evil: i forgot to mention something. It's not that important tho, if it doesn't work out, thats fine :mrgreen: but when you move over something inside or outside of the inventory, in the inventory "box" with all the commands, it shows what the thing ur cursor is over,which is another reason i want to have the actual actor in the square. that way i could make an event like: Cursor colide with item, change animation of inventory to the one saying what it is if u catch my drift :oops:
MonteyPython
 
Posts: 24
Joined: Tue Apr 21, 2009 6:15 pm
Score: 0 Give a positive score

Re: Inventory

Postby skydereign » Tue Apr 28, 2009 5:12 am

That would be an easy thing to add. Is it okay if I just explain the logic and coding behind the method I have been using, or should I implement the actual actor moving? At this point, either way should work. I am pretty sure I got what you want, in concept.
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: Inventory

Postby MonteyPython » Tue Apr 28, 2009 5:25 am

Ummmmmmmm... no matter how hard u tried to explain it, you meathod would probably never sink in so the way where the actor actually moves would work much better :mrgreen:

EDIT
Oh ya, i do want to have more than 8 items :mrgreen:
MonteyPython
 
Posts: 24
Joined: Tue Apr 21, 2009 6:15 pm
Score: 0 Give a positive score

Re: Inventory

Postby skydereign » Wed Apr 29, 2009 1:41 am

Well, not that I think of it, the idea I had to implement using the actual actor is essentially the same thing, the only difference is that using the actual actor would be even harder to understand. Using the actual actor would just add more things to do, as you need to sort zdepth properly. To add the features you want (more than 8, using the actor, replacing blanks/used items, and other), you would have to use an array of sorts to organize them. The use of animpos in my demos is the same thing as using the actor, but instead of creating a sort function and other, you just use numbers within the array. Let me try to explain my code to you, I believe I can make it easy enough to understand. I will be expounding upon not my most recent demo, as you probably don't want to get into structs and wrappers. If after I explain, you still don't get it, I can make the example you want, but I doubt you'd understand the more complex version.
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: Inventory

Postby MonteyPython » Wed Apr 29, 2009 5:53 am

Well, you can try to explain, but i most likely wont get, but im ready to try :mrgreen:

EDIT
Ya no, on second thought, it;ll probably just be easier to just make the demo i origionally asked for, because i HIGHLY doubt i'll understand a thing of what u tell me about ur other demos :mrgreen:
MonteyPython
 
Posts: 24
Joined: Tue Apr 21, 2009 6:15 pm
Score: 0 Give a positive score

Re: Inventory

Postby MonteyPython » Fri May 01, 2009 3:19 am

ummmmmm... heh. not trying to be jerky or anything, i know ur buysy an all but, will the demo be ready soon?
MonteyPython
 
Posts: 24
Joined: Tue Apr 21, 2009 6:15 pm
Score: 0 Give a positive score

Re: Inventory

Postby skydereign » Fri May 01, 2009 5:22 am

Okay, if you don't understand this, you will not understand my other version. But I'll try this first. Any questions post here, I was/am going to explain it in a later post. The code is commented and does not use any black magic if you understand ints, arrays, strcpy, for loops, switches. I use one self made function call that takes two numbers into one. If you need me to explain it I can, but I will be posting an explanation to the concepts of this when I get more time.
Attachments
InventoryCommented.zip
(103.14 KiB) Downloaded 185 times
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: Inventory

Postby MonteyPython » Fri May 01, 2009 9:40 pm

Im just wondering, is this the version that moves the actor or just changes the animation?
MonteyPython
 
Posts: 24
Joined: Tue Apr 21, 2009 6:15 pm
Score: 0 Give a positive score

Next

Return to Advanced Topics

Who is online

Users browsing this forum: No registered users and 1 guest