Gamestudio Links
Zorro Links
Newest Posts
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (AndrewAMD, Quad, M_D), 1,217 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 8 of 9 1 2 3 4 5 6 7 8 9
Re: The complete RPG Inventory + Tutorial [Re: NeoNeper] #313644
03/02/10 17:37
03/02/10 17:37
Joined: Nov 2007
Posts: 318
Brasil, Paraná
NeoNeper Offline
Senior Member
NeoNeper  Offline
Senior Member

Joined: Nov 2007
Posts: 318
Brasil, Paraná
oooooooohh my goooodddd.. its work its workkk ...
OOo i go dead rsrrsrsrr....
Tnkx my brother..

::another one doubts::
I created an item dynamically.
it uses a model of armor in the world 3D and When i click in this model
it goes to order the following command.
"inv_float_item(plate_armor)"
to order a floating item for the hand.

however plate_armor it must dynamically be informed and not manually.
how I would make this?


Please! Use easy words to be translated. because my English is not very good! Grateful.
_______________________________________________________
Re: The complete RPG Inventory + Tutorial [Re: NeoNeper] #313754
03/03/10 12:49
03/03/10 12:49
Joined: Nov 2007
Posts: 318
Brasil, Paraná
NeoNeper Offline
Senior Member
NeoNeper  Offline
Senior Member

Joined: Nov 2007
Posts: 318
Brasil, Paraná
or the best form is to use many ifs?
Ex:

if(str_cmp(my.string1,"plate_armor")){
inv_float_item(plate_armor);
}

if(str_cmp(my.string1,"plate_shield")){
inv_float_item(plate_shield);
}
...

The problem to make this
it is that I go to have a function obstructed of ifs. if for each item imagines one


Please! Use easy words to be translated. because my English is not very good! Grateful.
_______________________________________________________
Re: The complete RPG Inventory + Tutorial [Re: NeoNeper] #313773
03/03/10 14:44
03/03/10 14:44
Joined: Sep 2003
Posts: 9,859
F
FBL Offline
Senior Expert
FBL  Offline
Senior Expert
F

Joined: Sep 2003
Posts: 9,859
Well attach the pointer to the item data directly to the inventory item. Then you don't need that many if/else.

e.g. on init

action myaction()
{
my->skill42 = sys_malloc(sizeof(item));
//setup item data here
my->skill42->... = ...;
}

and later you can do sth like this:

("ent" being the entity which resembles an inventory item):
inv_float_item(ent->skill42);


I don't know the inventory code, I have never looked at it and never used it, so I'm just guessing what you're trying to do.
The idea is that you have a direct link between the inventory item and your entity, so you don't need endless if/else instructions.

Re: The complete RPG Inventory + Tutorial [Re: FBL] #313811
03/03/10 18:26
03/03/10 18:26
Joined: Nov 2007
Posts: 318
Brasil, Paraná
NeoNeper Offline
Senior Member
NeoNeper  Offline
Senior Member

Joined: Nov 2007
Posts: 318
Brasil, Paraná
Oooo yesss.. sory sory my stupid ask.
Already I obtained to make...now I learned to use sys_malloc ()..
very tnnx brother...
I made the following one.

1° I used sys_malloc to create plus an item in the memory.
2° I copied the same values of the item that was played outside of the bag
3° and used the copied values to create the new item.

now not necessary more to use "ifs"..
Tnkx very much...
the syntax is many util for meee...
now understand the function sys_alloc() (^.^)
last more.


Please! Use easy words to be translated. because my English is not very good! Grateful.
_______________________________________________________
Re: The complete RPG Inventory + Tutorial [Re: oldschoolj] #314178
03/06/10 12:37
03/06/10 12:37
Joined: Feb 2010
Posts: 457
Norfolk,England
mikaldinho Offline
Senior Member
mikaldinho  Offline
Senior Member

Joined: Feb 2010
Posts: 457
Norfolk,England
it is great! thanks alot m8.

Re: The complete RPG Inventory + Tutorial [Re: mikaldinho] #317086
03/29/10 08:32
03/29/10 08:32
Joined: Dec 2009
Posts: 57
USA
M
marianschuth Offline
Junior Member
marianschuth  Offline
Junior Member
M

Joined: Dec 2009
Posts: 57
USA
Hello, I have downloaded the file, but if I would start the main.c script I get an error: inventory line 1678 REAR uncleared identifier. Could you help me? I havn't change anything.

Re: The complete RPG Inventory + Tutorial [Re: ATOMIX] #317123
03/29/10 13:29
03/29/10 13:29
Joined: Nov 2007
Posts: 318
Brasil, Paraná
NeoNeper Offline
Senior Member
NeoNeper  Offline
Senior Member

Joined: Nov 2007
Posts: 318
Brasil, Paraná
sory, but I did not find reference " REAR" in the code.
follows link for download of the version that I lowered
http://www.indiegamejobs.com/temp/inventory_demo.zip


Please! Use easy words to be translated. because my English is not very good! Grateful.
_______________________________________________________
Re: The complete RPG Inventory + Tutorial [Re: NeoNeper] #317140
03/29/10 14:38
03/29/10 14:38
Joined: Dec 2009
Posts: 57
USA
M
marianschuth Offline
Junior Member
marianschuth  Offline
Junior Member
M

Joined: Dec 2009
Posts: 57
USA
This inventory works perfect, but I mean this inventory:

http://www.filefront.com/14418777/RPG_inventory.rar/

Re: The complete RPG Inventory + Tutorial [Re: marianschuth] #336150
08/01/10 22:10
08/01/10 22:10
Joined: Mar 2009
Posts: 146
USA
P
paracharlie Offline
Member
paracharlie  Offline
Member
P

Joined: Mar 2009
Posts: 146
USA
Does anyone have a working example of this inventory system they would like to share with me? If so let me know, I'm getting to the point where I'm about to hire someone to make it for me.

Has to be *.c

Last edited by paracharlie; 08/01/10 22:11.

A8 Commercial
Re: The complete RPG Inventory + Tutorial [Re: paracharlie] #338854
08/22/10 07:45
08/22/10 07:45
Joined: May 2009
Posts: 5,370
Caucasus
3run Offline
Senior Expert
3run  Offline
Senior Expert

Joined: May 2009
Posts: 5,370
Caucasus
When I open inventory bag (any of them), I'm getting empty prototype, but inventory works normal after that. Is there any normally working example?


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Page 8 of 9 1 2 3 4 5 6 7 8 9

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1