• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Error when Dashing in any direction.

K

kestus0756

Guest
Hello guys, I needed help with my new game The Legendaries, it's a top down RPG game and I wanted to implement character customization. When I open the game, go to the main room and then try to dash, I get this error:
___________________________________________
############################################################################################
FATAL ERROR in
action number 1
of Draw Event
for object obj_dash_effect:

Variable obj_dash_effect.face(100013, -2147483648) not set before reading it.
at gml_Object_obj_dash_effect_DrawEvent_1 (line 3) - { if (face = DOWN)
############################################################################################

Help would be appreciated a lot.
 
K

kestus0756

Guest
Hello guys, I needed help with my new game The Legendaries, it's a top down RPG game and I wanted to implement character customization. When I open the game, go to the main room and then try to dash, I get this error:
___________________________________________
############################################################################################
FATAL ERROR in
action number 1
of Draw Event
for object obj_dash_effect:

Variable obj_dash_effect.face(100013, -2147483648) not set before reading it.
at gml_Object_obj_dash_effect_DrawEvent_1 (line 3) - { if (face = DOWN)
############################################################################################

Help would be appreciated a lot. (Though I don't get any error when I try to attack or move)
 

JacobV

Member
The easiest fix would be to just say if (obj_player.face = DOWN). Since "face" is a variable local to the player object, "obj_dash_effect" doesn't have the variable's value; so putting "obj_player.face" gets the value from the player object and allows the dash object to use it.
 
K

kestus0756

Guest
The easiest fix would be to just say if (obj_player.face = DOWN). Since "face" is a variable local to the player object, "obj_dash_effect" doesn't have the variable's value; so putting "obj_player.face" gets the value from the player object and allows the dash object to use it.
Thank you so much, it works now. :)
 
K

kestus0756

Guest
Also, one more thing, my player just uses the run animation when I attack. How is it possible to make it so that he uses an attack animation instead of run animation?
 
K

kestus0756

Guest
I think you should use it in your obj_face in the step event.
I get this error when I try to talk with NPC:
___________________________________________
############################################################################################
FATAL ERROR in
action number 1
of Draw Event
for object obj_dialog:

string_width argument 1 incorrect type (0) expecting a String (YYGS)
at gml_Object_obj_dialog_DrawGUI_1 (line 9) - if (string_width(text_words) >= width-(margin*2)) {
############################################################################################

(I fixed the attacking animation)
 
Last edited by a moderator:
Top