2 registered members (TipmyPip, 1 invisible),
18,789
guests, and 8
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
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
Serious User
|
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
OP
Newbie
|
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
Senior Member
|
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]
#322655
05/08/10 17:17
05/08/10 17:17
|
Joined: Feb 2010
Posts: 43 in Italia
RoboWarrior
OP
Newbie
|
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
Serious User
|
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
OP
Newbie
|
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
Ottawa
User
|
User
Joined: Apr 2006
Posts: 737
Ottawa, Canada
|
Hi! Try to place the action function before the main ()
Hope this helps! Ottawa  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
Serious User
|
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:
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
OP
Newbie
|
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
|
|
|
|