3 registered members (NewbieZorro, TipmyPip, 1 invisible),
19,045
guests, and 8
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: Panel Over Entity
[Re: iam_ufo973]
#236733
11/16/08 09:09
11/16/08 09:09
|
Joined: Nov 2005
Posts: 1,007
jigalypuff
Serious User
|
Serious User
Joined: Nov 2005
Posts: 1,007
|
this was in one of the aum magazines, try looking in those
Why does everyone like dolphins?
Never trust a species which smiles all the time!
|
|
|
Re: Panel Over Entity
[Re: jigalypuff]
#236734
11/16/08 09:10
11/16/08 09:10
|
Joined: Jul 2008
Posts: 56
iam_ufo973
OP
Junior Member
|
OP
Junior Member
Joined: Jul 2008
Posts: 56
|
|
|
|
Re: Panel Over Entity
[Re: Helghast]
#236902
11/17/08 02:27
11/17/08 02:27
|
Joined: Jan 2002
Posts: 4,225 Germany / Essen
Uhrwerk
Expert
|
Expert
Joined: Jan 2002
Posts: 4,225
Germany / Essen
|
Local variables can't be shown in panels for good reasons: They are only valid local and therfore it can neither be guaranteed, that at least any of these local variables exists, nor can be distinguished between multiple instances of the same local variable. So Helghast's suggestion is the way to go.
Always learn from history, to be sure you make the same mistakes again...
|
|
|
Re: Panel Over Entity
[Re: Xarthor]
#237285
11/19/08 13:33
11/19/08 13:33
|
Joined: Jul 2008
Posts: 56
iam_ufo973
OP
Junior Member
|
OP
Junior Member
Joined: Jul 2008
Posts: 56
|
Xarthor it works perfect thank you very much. it was almost impossible to show local variables over entities but you solved it in a very easy way  But the str_for_num doesn't work it gives error can you give me an small example please.
Last edited by iam_ufo973; 11/19/08 13:49.
|
|
|
Re: Panel Over Entity
[Re: iam_ufo973]
#237350
11/19/08 19:45
11/19/08 19:45
|
Joined: Jul 2002
Posts: 4,436 Germany, Luebeck
Xarthor
Expert
|
Expert
Joined: Jul 2002
Posts: 4,436
Germany, Luebeck
|
action enemy_act()
{
VECTOR my_pos;
STRING* my_health;
while(me)
{
if(vec_for_screen(my.x,camera))
{
vec_set(my_pos,my.x);
my_pos.z += 50; // z-offset
vec_to_screen(my_pos,camera);
str_for_num(my_health,my.skill22); // replace my.skill22 with your health skill
draw_text(my_health,my_pos.x,my_pos.y,vector(255,255,255));
}
wait(1);
}
}
Attention: not tested
|
|
|
|