Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
4 registered members (NewbieZorro, Grant, TipmyPip, AndrewAMD), 13,346 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rating: 5
Page 2 of 2 1 2
Re: Some questions about creating an inventory [Re: 3dgs_snake] #379817
08/08/11 14:52
08/08/11 14:52
Joined: Jan 2011
Posts: 65
R
reknak Offline OP
Junior Member
reknak  Offline OP
Junior Member
R

Joined: Jan 2011
Posts: 65
I will give it a try,

Code:
#include <acknex.h> //not important atm
#include <default.c> //not important atm
#include <mtlView.c> //not important atm

#define STATE     			skill1 //not important atm
#define ANIMATION 			skill2 //not important atm
#define CREATOR   			skill3 //not important atm
.....

.....

BMAP* crosshair_tga = "crosshair.tga"; //not important atm
BMAP* Defeat_bmp = "Defeat.bmp"; //not important atm
Is this good? (I hope this): 
-> PANEL* ItemInInventorySlot1;
-> PANEL* ItemInInventoryEquipmentSlot1;
Or should it be this?:
-> BMAP* ItemInInventorySlot1_bmp = "Item1.bmp"; 
-> BMAP* ItemInInventoryEquipmentSlot1_bmp = "Item1.bmp"; 
ENTITY* my_sky; //not important atm



The reason why I want to add these pointers is because this way I can easily link the items (/itempanels) placed in the inventory slots with the inventory slots. In other words, I want to give the items (/itemspanels) another addres when placed in an inventory slot that shows in which inventory slot the item lies/is (otherwise the item only reacts to the my and you pointers).

Re: Some questions about creating an inventory [Re: reknak] #379826
08/08/11 16:28
08/08/11 16:28
Joined: Sep 2009
Posts: 1,032
Budapest
Aku_Aku Offline
Serious User
Aku_Aku  Offline
Serious User

Joined: Sep 2009
Posts: 1,032
Budapest
You can create a panel and its background image named bmap more than one way.
The static one:
Code:
BMAP* compass_map = "compass.pcx"; 

PANEL* aircraft_pan =
{
   bmap = compass_map; // compass_map as panel background
   flags = SHOW;
}


The dynamic one:
Code:
PANEL* splashscreen;
splashscreen.bmap = bmap_create("splash.pcx");


I think there are more ways to create a panel and assign a bmap to it. Just read the manual careful. All may examples based on the manual's examples.
Just one more dynamic example (from my project):
Code:
#define PAN_MENUS_SUM 3
PANEL* pan_menus[PAN_MENUS_SUM];
pan_menus[1]=pan_create(NULL,2);
pan_menus[1].bmap = bmap_create("foo.jpg");



Last edited by Aku_Aku; 08/08/11 16:30.
Re: Some questions about creating an inventory [Re: Aku_Aku] #380441
08/17/11 19:10
08/17/11 19:10
Joined: Jan 2011
Posts: 65
R
reknak Offline OP
Junior Member
reknak  Offline OP
Junior Member
R

Joined: Jan 2011
Posts: 65
Sorry for the late response,

Thank you Aku_Aku, I got it working now. The PANEL* pointers work excellent. I recommend other people too to use pointers when making an inventory, easy and efficient in my opinion.

Page 2 of 2 1 2

Gamestudio download | 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