Health/exp/mana bar trouble
#1
Posted 03 March 2012 - 11:56 PM
___________________________________________
FATAL ERROR in
action number 1
of Draw Event
for object obj_controller:
COMPILATION ERROR in code action
Error in code at line 6:
draw_text(view_xview[0]+8,view_yview[0]8,'Level:'+string(global.level))
^
at position 41: Symbol , or ) expected.
i don't add something that's not necessary. each time i add one it says to add another
#2
Posted 04 March 2012 - 12:02 AM
#3
Posted 04 March 2012 - 12:34 AM
draw_set_color (c_black)
draw_set_font(font0)
draw_text(view_xview[0]+8,view_yview[0]8,'Level:'+string(global.level))
draw_text(view_xview[0]+8,view_yview[0]32,'Exp:'+string(global.xp))
draw_text(view_xview[0]+8,view_yview[0]56,'Health:'+string(global.hp))
draw_text(view_xview[0]+8,view_yview[0]80,'Attack:'+string(global.attack))
#4
Posted 04 March 2012 - 12:42 AM
draw_set_color (c_black)
draw_set_font(font0)
draw_text(view_xview[0]+8,view_yview[0]+8,'Level: '+string(global.level))
draw_text(view_xview[0]+8,view_yview[0]+32,'Exp: '+string(global.xp))
draw_text(view_xview[0]+8,view_yview[0]+56,'Health: '+string(global.hp))
draw_text(view_xview[0]+8,view_yview[0]+80,'Attack: '+string(global.attack))
This will work.
Edited by Robert3DG+, 04 March 2012 - 12:43 AM.
#5
Posted 04 March 2012 - 12:45 AM
Edited by xxgamenoobxx, 04 March 2012 - 12:46 AM.
#6
Posted 04 March 2012 - 12:46 AM
view_yview[0]8 vs view_yview[0]+8
#7
Posted 04 March 2012 - 12:48 AM
-____- i didn't notice that? my name says it all. XDFor the view_yview parts you didn't add a plus sign.
view_yview[0]8 vs view_yview[0]+8
#8
Posted 04 March 2012 - 12:50 AM
#9
Posted 04 March 2012 - 01:10 AM
or if i go to the shop it also resets my gold 'n stuff.
Edited by xxgamenoobxx, 04 March 2012 - 01:11 AM.
#10
Posted 12 March 2012 - 05:34 PM
Firstly, they must be global variables, which means they are not dependant on an object. In addition, you would make an initualising object (basically one that sets them to their original values) in the first map, or better: a loading screen before you start the first level. If you do this, they won't restart by themselves, unless you restart the game.
EDIT: Oops, I forgot how slow threads leave the first page around these parts...
Edited by Stian Aune, 12 March 2012 - 05:36 PM.
#11
Posted 16 March 2012 - 12:37 PM
#12
Posted 17 March 2012 - 12:47 AM
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users



This topic is locked







