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
3 registered members (TipmyPip, AndrewAMD, NewbieZorro), 16,055 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 2 1 2
Re: Panels and variables [Re: Rich] #322573
05/07/10 22:30
05/07/10 22:30
Joined: Aug 2007
Posts: 1,922
Schweiz
Widi Offline
Serious User
Widi  Offline
Serious User

Joined: Aug 2007
Posts: 1,922
Schweiz
...or you can use the you - pointer that will set by many events (EVENT_IMPACT).
you.skill1 -=10; // if the bullet collidies with a Entity, reduce his skill1

or if you make a define:
#define health skill1
you.health -=10;

Last edited by Widi; 05/08/10 17:14.
Re: Panels and variables [Re: Widi] #322643
05/08/10 16:08
05/08/10 16:08
Joined: Feb 2010
Posts: 43
in Italia
RoboWarrior Offline OP
Newbie
RoboWarrior  Offline OP
Newbie

Joined: Feb 2010
Posts: 43
in Italia
when I use the entity pointer he tell me:

health is not a member of ENTITY


PC
processore Dual-Core Centrino 2 3.3 Ghz
video card NVIDIA 1GB
HDD 640 GB
RAM 8 GB
Windows 7
3D Game Studio A7 commercial edition
FACEBOOK: http://www.facebook.com/home.php?#!/profile.php?ref=profile&id=100000540297412
Re: Panels and variables [Re: RoboWarrior] #322649
05/08/10 16:39
05/08/10 16:39
Joined: Jan 2002
Posts: 300
Usa
Rich Offline
Senior Member
Rich  Offline
Senior Member

Joined: Jan 2002
Posts: 300
Usa
Hmm... be sure to double check everything, making sure you've defined the skill in script before you use it. If all else fails post your code or a snip if you can.


A8 com / A7 free
Re: Panels and variables [Re: Rich] #322653
05/08/10 17:14
05/08/10 17:14
Joined: Aug 2007
Posts: 1,922
Schweiz
Widi Offline
Serious User
Widi  Offline
Serious User

Joined: Aug 2007
Posts: 1,922
Schweiz
You have the following line at the top of your script as Rich said:

#define health skill1

Re: Panels and variables [Re: Rich] #322655
05/08/10 17:17
05/08/10 17:17
Joined: Feb 2010
Posts: 43
in Italia
RoboWarrior Offline OP
Newbie
RoboWarrior  Offline OP
Newbie

Joined: Feb 2010
Posts: 43
in Italia
here's the code(a cut something that isn't connected with this problem)

#define health skill5;
ENTITY* playertwo;
PANEL* health_bar=
{
digits(10,10,"HP %0.f",standard_fontr,1,playertwo.health);
hbar(60, 10, 250, "vita.bmp", 1, playertwo.health);
flags= VISIBLE;
}
function main()
{
video_mode=7;
level_load("buildings.wmb");
}
action main_player()
{
playertwo=me;
my.health=200;
}


PC
processore Dual-Core Centrino 2 3.3 Ghz
video card NVIDIA 1GB
HDD 640 GB
RAM 8 GB
Windows 7
3D Game Studio A7 commercial edition
FACEBOOK: http://www.facebook.com/home.php?#!/profile.php?ref=profile&id=100000540297412
Re: Panels and variables [Re: RoboWarrior] #322657
05/08/10 17:19
05/08/10 17:19
Joined: Aug 2007
Posts: 1,922
Schweiz
Widi Offline
Serious User
Widi  Offline
Serious User

Joined: Aug 2007
Posts: 1,922
Schweiz
#define health skill5;

WITHOUT ";"

EDIT: read exactly, use also the manual !!!

Last edited by Widi; 05/08/10 17:21.
Re: Panels and variables [Re: RoboWarrior] #322660
05/08/10 18:20
05/08/10 18:20
Joined: Feb 2010
Posts: 43
in Italia
RoboWarrior Offline OP
Newbie
RoboWarrior  Offline OP
Newbie

Joined: Feb 2010
Posts: 43
in Italia
I corrected the ";" but it doesn't work at all!
this is the debug screen
parametre unknown playertwo Keyword
could you write an example code, please?


PC
processore Dual-Core Centrino 2 3.3 Ghz
video card NVIDIA 1GB
HDD 640 GB
RAM 8 GB
Windows 7
3D Game Studio A7 commercial edition
FACEBOOK: http://www.facebook.com/home.php?#!/profile.php?ref=profile&id=100000540297412
Re: Panels and variables [Re: RoboWarrior] #322663
05/08/10 18:32
05/08/10 18:32
Joined: Apr 2006
Posts: 737
Ottawa, Canada
O
Ottawa Offline
User
Ottawa  Offline
User
O

Joined: Apr 2006
Posts: 737
Ottawa, Canada
Hi!
Try to
place the action function before the main ()


Hope this helps!
Ottawa laugh

Ver 7.86.2 Pro and Lite-C
Re: Panels and variables [Re: RoboWarrior] #322666
05/08/10 18:35
05/08/10 18:35
Joined: Aug 2007
Posts: 1,922
Schweiz
Widi Offline
Serious User
Widi  Offline
Serious User

Joined: Aug 2007
Posts: 1,922
Schweiz
You don`t can use a entity skill in a paneldefinition.

digits(10,10,"HP %0.f",standard_fontr,1,playertwo.health);
hbar(60, 10, 250, "vita.bmp", 1 playertwo.health);

Use a var:
Code:
var hbar_health
#define health skill5;
ENTITY* playertwo;
PANEL* health_bar=
{
digits(10,10,"HP %0.f",standard_fontr,1,hbar_health);
hbar(60, 10, 250, "vita.bmp", 1, hbar_health);
flags= SHOW;
}
function main()
{
video_mode=7;
level_load("buildings.wmb");
}
action main_player()
{
playertwo=me;
my.health=200;
hbar_health = my.health;
}



EDIT: use window instead of hbar and SHOW instead of visible. Witch version do you use?

Last edited by Widi; 05/08/10 19:42.
Re: Panels and variables [Re: Widi] #322692
05/08/10 21:39
05/08/10 21:39
Joined: Feb 2010
Posts: 43
in Italia
RoboWarrior Offline OP
Newbie
RoboWarrior  Offline OP
Newbie

Joined: Feb 2010
Posts: 43
in Italia
thank you a lot for your time now it works!!!!!!!!
I use A7 but in a old AUM I found this tipe of code. Thank you again!


PC
processore Dual-Core Centrino 2 3.3 Ghz
video card NVIDIA 1GB
HDD 640 GB
RAM 8 GB
Windows 7
3D Game Studio A7 commercial edition
FACEBOOK: http://www.facebook.com/home.php?#!/profile.php?ref=profile&id=100000540297412
Page 2 of 2 1 2

Moderated by  HeelX, rvL_eXile 

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