Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
0 registered members (), 1,103 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Shooter Crosshair #434991
12/31/13 22:05
12/31/13 22:05
Joined: Aug 2013
Posts: 101
M
mschoenhals Offline OP
Member
mschoenhals  Offline OP
Member
M

Joined: Aug 2013
Posts: 101
I've been working with AUM's Shooter code (issue 103) and the crosshair for the machine gun won't work.

It starts with a string:
STRING* crosshair_tga = "crosshair.tga";

then a panel:
PANEL* t_crosshair_pan;

Then in an action, when the player picks up the machinegun, this is used:
t_crosshair_pan = pan_create(NULL, 30);
t_crosshair_pan.bmap = bmap_create(crosshair_tga);

This is used at the start:
if (t_crosshair_pan)
{
t_crosshair_pan.pos_x = (screen_size.x - bmap_width(t_crosshair_pan.bmap)) / 2;
t_crosshair_pan.pos_y = (screen_size.y - bmap_height(t_crosshair_pan.bmap)) / 2;

Any ideas why this won't work?

Re: Shooter Crosshair [Re: mschoenhals] #434992
12/31/13 23:50
12/31/13 23:50
Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
Kartoffel Offline
Expert
Kartoffel  Offline
Expert

Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
did you set the SHOW flag?


POTATO-MAN saves the day! - Random
Re: Shooter Crosshair [Re: Kartoffel] #434993
01/01/14 01:29
01/01/14 01:29
Joined: Jul 2008
Posts: 2,107
Germany
rayp Offline

X
rayp  Offline

X

Joined: Jul 2008
Posts: 2,107
Germany
Btw please note that game_save / game_load wont work with dynamic created panels.

And i guess like Kartoffel u missed the SHOW flag. If not try
Code:
BMAP* crosshair_tga = "crosshair.tga"

instead of
Code:
STRING* ...



Cheers


Acknex umgibt uns...zwischen Dir, mir, dem Stein dort...
"Hey Griswold ... where u gonna put a tree that big ?"
1998 i married my loved wife ... Sheeva from Mortal Kombat, not Evil-Lyn as might have been expected
rayp.flags |= UNTOUCHABLE;
Re: Shooter Crosshair [Re: rayp] #435000
01/01/14 16:21
01/01/14 16:21
Joined: Aug 2013
Posts: 101
M
mschoenhals Offline OP
Member
mschoenhals  Offline OP
Member
M

Joined: Aug 2013
Posts: 101
Thanks!
That totally worked. It would be tough being a Nube without the help from folks like you! laugh


Moderated by  HeelX, rvL_eXile 

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