Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags
(2 edits)

This is definitely a noob question but I'm trying to add my own stuff, new types, new moves, new monsters, but whenever I am adding the line of code to either init_types, init_moves or init_monsters, the text for the new thing (type/move/monster) is blue instead of red like the other things and there's a yellow warning saying for example "variable type_DRAGON only used once" and the game does not Run when I try to test it. (and yes, they are in the exact same format as the type/move/monster, I copy pasted the line under the previous lines and just changed the stuff in them)

Is there somewhere else that I also need to define the new types/moves/monsters in order to get them to work or is there some other fundamental step that I am missing?

The types, monster IDs and so on are colored red because they're constants. You can add them in the init_constants script. This is where the type constants are defined, for instance:

(You can define constants anywhere in GMS2 but it felt easier to have them all in one place for easy access)

Keep two things in mind: each constant of each enumeration needs to have an unique value (e.g. type_DRAGON should have value 8), and you should update the MAX constant to be one higher than the highest constant (e.g. after adding the dragon type, TYPE_MAX should now be 9) so the loops that goes through some things won't skip the newly added data. 

(+1)

Alright, thanks. I can't wait to play around with this.