Gamestudio Links
Zorro Links
Newest Posts
Lapsa's very own thread
by rki. 06/18/24 15:32
A simple game ...
by VoroneTZ. 06/18/24 10:50
Face player all the time ...
by bbn1982. 06/18/24 10:25
Executing Trades on Next Bar Open
by vicknick. 06/13/24 08:51
Zorro Beta 2.61: PyTorch
by jcl. 06/10/24 14:42
New FXCM FIX Plugin
by flink. 06/04/24 07:30
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
6 registered members (rki, Martin_HH, AndrewAMD, squik, Ayumi, alibaba), 1,150 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
squik, AemStones, LucasJoshua, Baklazhan, Hanky27
19060 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Again a problem with script-c to lite-c #238019
11/24/08 04:54
11/24/08 04:54
Joined: Nov 2008
Posts: 53
Switzerland (Luzern)
F
flutschi Offline OP
Junior Member
flutschi  Offline OP
Junior Member
F

Joined: Nov 2008
Posts: 53
Switzerland (Luzern)
Hi,

I try to write my crossair to Lite-C and i can't figure out the right way..

my old code is

Quote:

entity cross_air
{
type = <crossair.bmp>;
view = camera;
flags = overlay,visible,flare;
layer = 0;
scale_x = .05;
scale_y = .05;
scale_z = .05;
x = 50;
y = 0;
z = 0;
}


and i try to use it in like this

Quote:
ENTITY* cross_air =
{
type = "crossair.bmp";
view = camera;
flags = VISIBLE | OVERLAY;
layer = 0;
scale_x = .05;
scale_y = .05;
scale_z = .05;
x = 50;
y = 0;
z = 0;
}


but it wont show up..

i got it with PANEL instead of ENTITY.. but i dont think its the best solution, i think with ENTITY it looks better.. am I wrong? is the PANEL version still good and can i keep it?

PANEL version:

Quote:
PANEL* cross_air =
{
bmap = "crossair.bmp";
flags = VISIBLE | OVERLAY;
layer = 0;
pos_x = 0;
pos_y = 0;

}



and by the way.. how can i figure out the screen size? i tried the screen_size.x thing, but couldnt get it right smirk
anyone has an example?

thx a lot


My System:
Intel Core 2 Duo CPU P8400 @ 2.26 GHz
4 GB Ram
NVIDIA GeForce 9600M GT
32 Bit Windows Vista
***********************************
Gamestudio Pro 7.50 / WED V6.875
Re: Again a problem with script-c to lite-c [Re: flutschi] #238022
11/24/08 06:36
11/24/08 06:36
Joined: Jul 2008
Posts: 553
Singapore
delinkx Offline
User
delinkx  Offline
User

Joined: Jul 2008
Posts: 553
Singapore
when u use ENTITY, set another flag also. as follows:

ENTITY* cross_air =
{
type = "crossair.bmp";
view = camera;
flags2 = VISIBLE;
flags = VISIBLE | OVERLAY;
layer = 0;
scale_x = .05;
scale_y = .05;
scale_z = .05;
x = 50;
y = 0;
z = 0;
}


This FLAG2 will make it visible from begining of the screen. Else u will need to load it. Thats y it was not visible.

.........................................

screen size is a variable given for the current game window resolution. Its not your desktop resolution. Its the resolution at which gamestudio is running. U can set it by video_switch or video_set.. see manual for more details on setting video size.


A7 commercial Team / VC++ 2008 Pro
homepage | twitter | facebook
Re: Again a problem with script-c to lite-c [Re: delinkx] #238025
11/24/08 07:06
11/24/08 07:06
Joined: Nov 2008
Posts: 53
Switzerland (Luzern)
F
flutschi Offline OP
Junior Member
flutschi  Offline OP
Junior Member
F

Joined: Nov 2008
Posts: 53
Switzerland (Luzern)
ah wow, thx very much! it worked with the entity!

can't i figure out per code what the size of the screen is? to detect the middle of it?
i wanna get some things right where they belong, even if the user change the resolution..


My System:
Intel Core 2 Duo CPU P8400 @ 2.26 GHz
4 GB Ram
NVIDIA GeForce 9600M GT
32 Bit Windows Vista
***********************************
Gamestudio Pro 7.50 / WED V6.875
Re: Again a problem with script-c to lite-c [Re: flutschi] #238028
11/24/08 08:07
11/24/08 08:07
Joined: Jul 2008
Posts: 553
Singapore
delinkx Offline
User
delinkx  Offline
User

Joined: Jul 2008
Posts: 553
Singapore
ok.. tats simple. if u want to place things in middle is easy.

suppose u want to place a panel in middle of screen. Use this:


panel_design.pos_x = (screen_size.x - bmap_width(panel_design.bmap))/2;
panel_design.pos_y = (screen_size.y - bmap_height(panel_design.bmap))/2;

this is for keeping in middle of screen. And as for other positions, u need to follow a ratio (proportionality) to fit things.


A7 commercial Team / VC++ 2008 Pro
homepage | twitter | facebook
Re: Again a problem with script-c to lite-c [Re: delinkx] #238072
11/24/08 17:53
11/24/08 17:53
Joined: Nov 2008
Posts: 53
Switzerland (Luzern)
F
flutschi Offline OP
Junior Member
flutschi  Offline OP
Junior Member
F

Joined: Nov 2008
Posts: 53
Switzerland (Luzern)
Thats really simple, thx a lot!


My System:
Intel Core 2 Duo CPU P8400 @ 2.26 GHz
4 GB Ram
NVIDIA GeForce 9600M GT
32 Bit Windows Vista
***********************************
Gamestudio Pro 7.50 / WED V6.875
Re: Again a problem with script-c to lite-c [Re: flutschi] #238127
11/25/08 02:54
11/25/08 02:54
Joined: Jul 2008
Posts: 553
Singapore
delinkx Offline
User
delinkx  Offline
User

Joined: Jul 2008
Posts: 553
Singapore
welcome smile


A7 commercial Team / VC++ 2008 Pro
homepage | twitter | facebook

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