Gamestudio Links
Zorro Links
Newest Posts
Trading Journey
by howardR. 04/24/24 20:04
M1 Oversampling
by Petra. 04/24/24 10:34
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
Data from CSV not parsed correctly
by EternallyCurious. 04/20/24 21:39
Scripts not found
by juergen_wue. 04/20/24 18:51
zorro 64bit command line support
by 7th_zorro. 04/20/24 10:06
StartWeek not working as it should
by jcl. 04/20/24 08:38
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (vicknick, howardR, sleakz), 691 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Mega_Rod, EternallyCurious, howardR, 11honza11, ccorrea
19048 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
some simple questions #153122
09/10/07 01:47
09/10/07 01:47
Joined: Sep 2007
Posts: 49
O
onslaught147 Offline OP
Newbie
onslaught147  Offline OP
Newbie
O

Joined: Sep 2007
Posts: 49
i am making a fps and i am using a panel for the health bar. the thing is i originally planned to have the pos_x of the panel to be the health variable and have the ability to give the panel a -x value which would move it off screen and give the impression that the bar was getting smaller but when i try this the game brings up a error. it seems i cant use a variable to define the pos_x of a panel, so does anyone know a way around this or a different way to get a health bar?


The only thing in life you can depend on is death and taxes.
Re: some simple questions [Re: onslaught147] #153123
09/10/07 02:53
09/10/07 02:53
Joined: Mar 2007
Posts: 677
0x00000USA
M
MrCode Offline
User
MrCode  Offline
User
M

Joined: Mar 2007
Posts: 677
0x00000USA
Look up "window" in the manual. That should be what you're after.


Code:
void main()
{
    cout << "I am MrCode,";
    cout << "hear me roar!";
    system("PAUSE");
}
Re: some simple questions [Re: MrCode] #153124
09/10/07 09:22
09/10/07 09:22
Joined: Jul 2007
Posts: 163
c:\Germany\Bavaria.exe
G_Tos Offline
Member
G_Tos  Offline
Member

Joined: Jul 2007
Posts: 163
c:\Germany\Bavaria.exe
Maybe you should define the panel with:
panel* panelname;


Spiele zu spielen ist Übung, sie zu machen Kunst!(Zitat)

Re: some simple questions [Re: onslaught147] #153125
09/10/07 13:21
09/10/07 13:21
Joined: Sep 2003
Posts: 929
Spirit Offline

Moderator
Spirit  Offline

Moderator

Joined: Sep 2003
Posts: 929
You can change pos_x in a function, like this:

PANEL* panelname = { .... }

var x = 10;

...
panelname.pos_x = x;

Re: some simple questions [Re: Spirit] #153126
09/10/07 13:58
09/10/07 13:58
Joined: Mar 2005
Posts: 564
/www/europe/ germany/index.php
TSG_Torsten Offline

User
TSG_Torsten  Offline

User

Joined: Mar 2005
Posts: 564
/www/europe/ germany/index.php
Why you dont change the scale of the panel?

var health=100; // Save the health to this var

panel health_pa
{
flags=visible; //make it visible
bmap="health.tga"; // Graphic
}

starter set_health
{
while(1)
{
health_pa.scale_x=health/100;
if(health_pa.scale_x<0.01)
{
health_pa.scale_x=0.01;
}
wait(1);
}
}

Regards
TSGames

Re: some simple questions [Re: TSG_Torsten] #153127
09/10/07 16:38
09/10/07 16:38
Joined: Jan 2006
Posts: 968
EpsiloN Offline
User
EpsiloN  Offline
User

Joined: Jan 2006
Posts: 968
pos...scale...Why dont you just use hbar?! This way you could use the panels bmap for background...


Extensive Multiplayer tutorial:
http://mesetts.com/index.php?page=201
Re: some simple questions [Re: EpsiloN] #153128
09/10/07 17:26
09/10/07 17:26
Joined: May 2005
Posts: 961
Bremen, Germany
tuschcarsten Offline
User
tuschcarsten  Offline
User

Joined: May 2005
Posts: 961
Bremen, Germany
because hbar is officially not supported by newer engine versions

i use window instead


Bit Happens!
Re: some simple questions [Re: tuschcarsten] #153129
09/10/07 22:30
09/10/07 22:30
Joined: Sep 2007
Posts: 49
O
onslaught147 Offline OP
Newbie
onslaught147  Offline OP
Newbie
O

Joined: Sep 2007
Posts: 49
thanks the scale_x really helped


The only thing in life you can depend on is death and taxes.

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