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
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (AndrewAMD, dr_panther, henrybane), 1,101 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Player.x? #210201
06/08/08 22:25
06/08/08 22:25
Joined: Jan 2007
Posts: 59
C
Creepinbox Offline OP
Junior Member
Creepinbox  Offline OP
Junior Member
C

Joined: Jan 2007
Posts: 59
Code:
 
PANEL* player_xyz=
{ 
    pos_x = 100; 
    pos_y = 100; 
    layer = 2;
    digits(0,0,"%f",*,1,player.x);  
    flags = OVERLAY,VISIBLE; 
} 


Why is it displaying "0" ?
is it so that panels or texts cant display vectors and defines? cause Player.HEALTH doesent work eider ... what do i do ?!

Re: Player.x? [Re: Creepinbox] #210207
06/08/08 23:22
06/08/08 23:22
Joined: Nov 2007
Posts: 1,143
United Kingdom
DJBMASTER Offline
Serious User
DJBMASTER  Offline
Serious User

Joined: Nov 2007
Posts: 1,143
United Kingdom
I just tested your code and everything is running fine. I move the player about and the digits change as expected.

I don't think this part of your script is causing you the problem. Make sure the player is set up properly and that the player pointer is initialized properly.

Panels should be able to display vectors, variables and defines. I've never had a case where i couldn't display one of them.

Apart from that i can't think why you are getting a constant 0.

Last edited by DJBMASTER; 06/08/08 23:23.
Re: Player.x? [Re: DJBMASTER] #210210
06/08/08 23:41
06/08/08 23:41
Joined: Jan 2007
Posts: 59
C
Creepinbox Offline OP
Junior Member
Creepinbox  Offline OP
Junior Member
C

Joined: Jan 2007
Posts: 59
wha? .. what could it be ? normal varibles work..

Re: Player.x? [Re: Creepinbox] #210211
06/08/08 23:46
06/08/08 23:46
Joined: Oct 2007
Posts: 5,210
İstanbul, Turkey
Quad Offline
Senior Expert
Quad  Offline
Senior Expert

Joined: Oct 2007
Posts: 5,210
İstanbul, Turkey
make sure the "player" is not null.

you sure you are using "player = me;" in your supposed_to_be_player_action ??


3333333333
Re: Player.x? [Re: Quad] #210212
06/09/08 00:07
06/09/08 00:07
Joined: Jan 2007
Posts: 59
C
Creepinbox Offline OP
Junior Member
Creepinbox  Offline OP
Junior Member
C

Joined: Jan 2007
Posts: 59
ah .. found it .. i had made a Entity of the player aswell .. so it was "ENTITY* player;"

Re: Player.x? [Re: Creepinbox] #210213
06/09/08 00:15
06/09/08 00:15
Joined: Jan 2007
Posts: 59
C
Creepinbox Offline OP
Junior Member
Creepinbox  Offline OP
Junior Member
C

Joined: Jan 2007
Posts: 59
but i still don't get the defines right .. . digits(0,0,"%f",*,1,player.HEALTH);

Re: Player.x? [Re: Creepinbox] #210284
06/09/08 16:27
06/09/08 16:27
Joined: Aug 2005
Posts: 343
Germany
HPW Offline
Senior Member
HPW  Offline
Senior Member

Joined: Aug 2005
Posts: 343
Germany
%f don't show anything, just use %1.0f as the thierd parameter.


Evil Blood (v. 0.52) RPG
Commport.de (Social Network Community)
Re: Player.x? [Re: HPW] #210317
06/09/08 20:25
06/09/08 20:25
Joined: Jan 2007
Posts: 59
C
Creepinbox Offline OP
Junior Member
Creepinbox  Offline OP
Junior Member
C

Joined: Jan 2007
Posts: 59
digits(0,0,"%1.0f",*,1,player.HEALTH); ? no change .. are you sure this should work ? must i not use varibles?

Re: Player.x? [Re: Creepinbox] #210321
06/09/08 20:34
06/09/08 20:34
Joined: Aug 2004
Posts: 1,345
Kyiv, Ukraine
VeT Offline

Serious User
VeT  Offline

Serious User

Joined: Aug 2004
Posts: 1,345
Kyiv, Ukraine
try to use
Code:
int player_HP;

action player()
{
***
player_HP = player.HEALTH;
***
}

and
Code:
digits(0,0,"%1.0f",*,1,player_HP); 



1st prize: Lite-C and Newton 2.17 by Vasilenko Vitaliy

Newton2 videos: http://tinyurl.com/NewtonVideos
LiteC+Newton2 discussion: http://tinyurl.com/NewtonWrapperDiscussion
Latest LiteC+Newton2 version(v23, from 29.10.2009): http://depositfiles.com/files/ae1l0tpro

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