|
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
Expert
|
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
milaz
OP
Newbie
|
OP
Newbie
Joined: Jan 2013
Posts: 24
|
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: MasterQ32]
#416198
01/28/13 23:15
01/28/13 23:15
|
Joined: Jul 2002
Posts: 3,208 Germany
Error014
Expert
|
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!
|
|
|
Moderated by mk_1, Perro, rayp, Realspawn, Rei_Ayanami, rvL_eXile, Spirit, Superku, Tobias, TSG_Torsten, VeT
|