Comments

Log in with itch.io to leave a comment.

(2 edits)

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

		option_state = global.option_text[selected_option];
		
		selected_option = 0;
		
		switch option_state{
			case "ATTACK":{
				scr_attack(global.pl_stats[e_pl_stats.attack], monster.defence, monster, hero);
				option_state = "DONE"
			}break;
			
			case "ITEM": max_options = 0; break
			
			case "MAGIC": max_options = ds_list_size(ds_magic_list); break;
			
			case "RUN" : {
				var ran_away = choose(true, false);
				visible_string = ""
				
				if (ran_away == true){
					text_to_display = "You ran away like the pathedic coward you are."
					
					victory_state = "PLAYER RAN"
					option_state = "BATTLE OVER"
				}else{
					text_to_display = "You try to run away but fall flat on your face."
					
					option_state = "DONE"
				}
				
			}break}
			#endregion

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 ;)