Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

Like what code did you use? I would like to make my own enemies too.

(1 edit)

Sorry about late replies, I totally blanked on this comment section being here. The code for the enemies is mostly centralized around a single "Enemy" object that all other enemies draw from. Each attack is stored in a timeline and each action is stored in a script, which is then executed at the Enemy's discretion. I didn't really write the code in a way that's obvious what's doing what, but I plan on making it a bit more streamlined so that people who know Game Maker will be able to easily edit it!

Thanks! I'm new to gamemaker, so i'm not really sure what a "timeline" is and how to make the actions happen in scripts, especially how to make the cursor go to a different place when you press a button to go to a new menu (such as FIGHT, or ACT)

(1 edit)

A timeline is an in-built utility in Game Maker, basically it will just execute commands over a series of time. The basic premise to most enemy attacks is that it starts the timeline, which then over time will go: At moment 0 (the start) spawn an attack, at moment 30 (one second in) spawn another attack, at moment 60 (two seconds in) end the attack. This gives me control of what happens for the duration of the attack.

When it comes to storing actions in scripts, I used the script_execute function. Each button has a variable that stores a script, and so when I use script_execute on that variable, it will run that script. Items work the same way. For example, the FaceSteak item has a script associated with it, but basically all that's in it is hp += 15;

There's lots of ways to make a cursor move around a menu, the method I used was to have a 2-dimensional array that acts like a grid. When you move with the arrow keys, you change to a new position on that grid. Each grid value has a position associated with it, which the heart then moves to.

Wow! Thanks for all that help! Even though I still may need some other tutorials to help me, I now understand this better. Maybe someday i'll be able to make some of my own enemies!