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
1 registered members (TipmyPip), 18,449 guests, and 6 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
Show Local Variable In Panel #416184
01/28/13 20:06
01/28/13 20:06
Joined: Jan 2013
Posts: 24
M
milaz Offline OP
Newbie
milaz  Offline OP
Newbie
M

Joined: Jan 2013
Posts: 24
Hola,
I have only 1 action attached to all enemies and i set their skill1 to their health. Now i want to display their health in a panel over their heads. Is this possible?

I saw in old AUM32 that shows how to display a panel over an entity but it uses predefined global variable, In my case i want to show each entity's skill1.

Re: Show Local Variable In Panel [Re: milaz] #416185
01/28/13 20:18
01/28/13 20:18
Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
Kartoffel Offline
Expert
Kartoffel  Offline
Expert

Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
afaik there is no way to show a local var directly.

but you can use a workaround by displaying a global var and creating a while loop to set its value to the local var you want to show.


POTATO-MAN saves the day! - Random
Re: Show Local Variable In Panel [Re: Kartoffel] #416187
01/28/13 20:34
01/28/13 20:34
Joined: Jan 2013
Posts: 24
M
milaz Offline OP
Newbie
milaz  Offline OP
Newbie
M

Joined: Jan 2013
Posts: 24
Originally Posted By: Kartoffel
afaik there is no way to show a local var directly.

but you can use a workaround by displaying a global var and creating a while loop to set its value to the local var you want to show.


But you may have seen it in some games, they show each enemy's health over their head, you mean that is not possible with 3dgs?

I can't use global + local technique because i am using only 1 action for all enemies. so for example using var display_my_health = my.skill1 and displaying it in panel will not work because all the entities are using the same action.

Re: Show Local Variable In Panel [Re: milaz] #416189
01/28/13 20:38
01/28/13 20:38
Joined: Nov 2007
Posts: 2,568
Germany, BW, Stuttgart
MasterQ32 Offline
Expert
MasterQ32  Offline
Expert

Joined: Nov 2007
Posts: 2,568
Germany, BW, Stuttgart
it is possible as long as your function is "alive"
just create your panel with pan_create and add objects to it with the pan_set* functions
but don't forget to delete the panel before exiting the function


Visit my site: www.masterq32.de
Re: Show Local Variable In Panel [Re: MasterQ32] #416198
01/28/13 23:15
01/28/13 23:15
Joined: Jul 2002
Posts: 3,208
Germany
Error014 Offline
Expert
Error014  Offline
Expert

Joined: Jul 2002
Posts: 3,208
Germany
You can also use draw_obj to do so. The example code in the manual should be a good starting point - if you decide to use a TEXT like in that example, just set the string using the str-instructions to something that shows their health (a simple str_for_num(NULL,my.skill1); would be enough here). If you so desire, you can also color the text by adjusting the settings beforehand.

If that sounds like too much work, you can also always use draw_text.


Perhaps this post will get me points for originality at least.

Check out Dungeon Deities! It's amazing and will make you happy, successful and almost certainly more attractive! It might be true!

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