I'm making a top down action game like the first Legend Of Zelda, I've been following Heartbeast tutorial, but decided to stop because he was using physics and I don't want to rely on physics. Now I almost recreated the game project without physics but I'm stuck at making the enemies knockback when being attacked. Any help would be really appreciated.
GameMaker Studio, need help coding knockback
You may want to contact the technical support you get when you purchase GameMaker. They'll be able to help. You can also visit the GameMaker forums. They'd be much better, as not many people here use GameMaker.
I'll second the suggestion to check out Gamemaker's forums. My impression of gamemaker is that people use it when they don't want to learn how to program. People here could provide you with pseudo-code to point you in the right direction, but if you don't code, then it wouldn't be particuarly usefull.
I use GMStudio, and I have to say the opinion of SirWeeble isn't the same as mine. But I DO agree that it may be better to visit the GMC(GameMaker Forum) as they know gml coding better than here.
As far as to your problem, I would have to see the code you have as it is to know exactly what I think the best way to get it done would be. Generally you probably want to calculate what direction the enemy needs to move, maybe based on where the player is, and if you want to have some randomness added to it. Then set a quick velocity on the enemy in that direction. Also, set an alarm for a small number in order to have it stop that velocity at that point.
I'm known as kburkhart84(same as here) over on the GMC forums. I recommend you post a topic over there if you haven't, and you can PM me over there as well if you would like, though the best way for me to help is to see the code on your enemies.