I replaced the 16*16 player sprite with a 14*19 sprite, and I would like the 3 pixels that overtake the size of a tile to overtake on the 3 bottom pixels of the tile above (so that the top of the head goes on the tile above, instead that the feets of the sprite going to the tile below).
I changed the image origin of my sprites from top left to bottom left, but then it seems that the sprite doesn't match the hitbox. Do you know how to match the sprite and the hitbox with a sprite origin that's different from 0*0 (top left) ?
I’m working on the your YouTube tutorial of this, and at the end of the battle video when I test my game, I press space (or enter) on the buttons and nothing happens. I would hate to give up now, so do you know any way to solve this problem?
It's probably the case that your nested if statements are out of order. One way to be able to see the code more clearly is to wrap large blocks of code inside if statements into regions, and then close those regions. Highlighting a curly bracket will highlight its partner (and if you don't see a highlighted partner where you expect to see it, that's probably going to cause you the kind of issue you mentioned.
Ok so back then I was doing the noob thing of using strings for enumerators, so check to see if option_state actually equals those strings like "ATTACK" and not "attack" or "Attack" for example because those are 3 different values.
Hi there, I got the pack from you, and imported the files (both the Ep 21 and Sept 2019 versions), but I'm getting an error when I try to run it. The error is related to an illegal array usage on line 238 of the obj_init object. Any suggestions?
Hi ePoxy16 - I'm sorry you encountered this problem! I was intending to revisit this asset in the near future but it seems like it's far more urgent than I thought!
I'll take a look today to see if I can recreate the crash so that I can fix it.
If you're able to post the error message that would be really helpful, thank you.
No problem! It happens in GMS2 2.3.0 (0.529 IDE version) and right when I try to run the projects with no modifications. The projects do undergo a conversion when importing or loading up for the first time, but no error is generated.
___________________________________________ ############################################################################################ ERROR in action number 1 of Create Event for object obj_init:
DoAdd :1: illegal array use at gml_Object_obj_init_Create_0 (line 238) - global.spells[e_spell_types.heal, e_spell_stats.min_value] = 8 + global.pl_stats[e_pl_stats.level]; ############################################################################################ gml_Object_obj_init_Create_0 (line 238)
On the face of it I would say that it's because 2.3 changes the way arrays are references.
It should be :
global.spells[e_spell_types.heal][e_spell_stats.min_value] instead of global.spells[e_spell_types.heal, e_spell_stats.min_value]
When I loaded up the December 2019 download I was able to play the game but I noticed some bugs and I've decided I'm just going to re-write most/all of it so that there are no more bugs (that I know of) and that it works properly with 2.3. It will have the benefit of another years worth of coding experience + be created in 2.3. This does mean that it will take some time for me to update the files so if you'd like to refund in the meantime that's no problem.
← Return to asset pack
Comments
Log in with itch.io to leave a comment.
Hi ! First of all thank you for your tutorials !
I replaced the 16*16 player sprite with a 14*19 sprite, and I would like the 3 pixels that overtake the size of a tile to overtake on the 3 bottom pixels of the tile above (so that the top of the head goes on the tile above, instead that the feets of the sprite going to the tile below).
I changed the image origin of my sprites from top left to bottom left, but then it seems that the sprite doesn't match the hitbox. Do you know how to match the sprite and the hitbox with a sprite origin that's different from 0*0 (top left) ?
I think if you make a custom origin, based on top left, but 3 pixels down, that will work (eg 0,3 as the origin)
Yeah that worked perfectly, thanks !
I’m working on the your YouTube tutorial of this, and at the end of the battle video when I test my game, I press space (or enter) on the buttons and nothing happens. I would hate to give up now, so do you know any way to solve this problem?
It's probably the case that your nested if statements are out of order. One way to be able to see the code more clearly is to wrap large blocks of code inside if statements into regions, and then close those regions.
Highlighting a curly bracket will highlight its partner (and if you don't see a highlighted partner where you expect to see it, that's probably going to cause you the kind of issue you mentioned.
#region main
this is the code, I don’t see anything wrong but I am a noob so do you see anything wrong.
Ok so back then I was doing the noob thing of using strings for enumerators, so check to see if option_state actually equals those strings like "ATTACK" and not "attack" or "Attack" for example because those are 3 different values.
So I checked the values, but nothing seems wrong. I feel like such a noob lol
Go to File > Export and send me the file and I'll check it out
Does this work with 2.3 without problems?
Hey Techyy it seems to work fine for me. Let me know if you run into any problems though.
I tried to add the line at line 238 per the error message here:
___________________________________________
############################################################################################
ERROR in
action number 1
of Create Event
for object obj_init:
DoAdd :1: illegal array use
at gml_Object_obj_init_Create_0 (line 238) - global.spells[e_spell_types.heal, e_spell_stats.min_value] = 8 + global.pl_stats[e_pl_stats.level];
############################################################################################
gml_Object_obj_init_Create_0 (line 238)
so I commented out 238 and added your line from below in it's place (straight up copy/paste):
global.spells[e_spell_types.heal][e_spell_stats.min_value] instead of global.spells[e_spell_types.heal, e_spell_stats.min_value]
I got the following error in the compiling, not in a prelaunch window:
Object: obj_init Event: Create at line 238 : Assignment operator expected
Hi there, I got the pack from you, and imported the files (both the Ep 21 and Sept 2019 versions), but I'm getting an error when I try to run it. The error is related to an illegal array usage on line 238 of the obj_init object. Any suggestions?
Hi ePoxy16 - I'm sorry you encountered this problem! I was intending to revisit this asset in the near future but it seems like it's far more urgent than I thought!
I'll take a look today to see if I can recreate the crash so that I can fix it.
If you're able to post the error message that would be really helpful, thank you.
No problem! It happens in GMS2 2.3.0 (0.529 IDE version) and right when I try to run the projects with no modifications. The projects do undergo a conversion when importing or loading up for the first time, but no error is generated.
___________________________________________
############################################################################################
ERROR in
action number 1
of Create Event
for object obj_init:
DoAdd :1: illegal array use
at gml_Object_obj_init_Create_0 (line 238) - global.spells[e_spell_types.heal, e_spell_stats.min_value] = 8 + global.pl_stats[e_pl_stats.level];
############################################################################################
gml_Object_obj_init_Create_0 (line 238)
On the face of it I would say that it's because 2.3 changes the way arrays are references.
It should be :
global.spells[e_spell_types.heal][e_spell_stats.min_value] instead of global.spells[e_spell_types.heal, e_spell_stats.min_value]
When I loaded up the December 2019 download I was able to play the game but I noticed some bugs and I've decided I'm just going to re-write most/all of it so that there are no more bugs (that I know of) and that it works properly with 2.3. It will have the benefit of another years worth of coding experience + be created in 2.3.
This does mean that it will take some time for me to update the files so if you'd like to refund in the meantime that's no problem.
Not a problem! I'll keep an eye out for updates and follow through with your videos (which are great by the way)!
thank you :)
How do you make your own rooms with your own graphics?
Check out this play list - the second one deals with making rooms I think?
Awesome thanks for the help.
I can't wait to really use this!
Let me know how it goes ;)