This is a resource pack made for Stencyl that enables you to add combat and enemy AI to your games. It provides behaviors, which are configurable and reusable pieces of code, that enable your actors to attack, manage health and energy, customize any number of special skills and a robust AI system with which your actors can check for specific conditions in order to execute actions, both on their own and against enemies.

If you want to see some of the possibilities of this resource pack, you can play the HTML5 version of the sample game on this page.

The pack comes in two versions:

  1. Luyren's Basic Combat Pack is the free version. It contains only basic melee and ranged attacks, health and energy management, 8 way movement, raycasting and only the Patrol behavior for AI.
  2. Luyren's AI and Combat Pack is the full paid version. Along with all the behaviors of the free version, you have the Command List behavior to configure any number of actions and control inputs for your actors, Get Enemy Actors, to allow actors to detect enemies within range, Action Manager to create a full hierarchy of actions the AI can perform, each with their own conditions, and several other AI behaviors. 

Both versions come with sample games you can import into Stencyl, in which you can see how each actor is configured, as well as a comprehensive documentation file. Both versions support side-scroller and top-down games, including mouse and analog inputs for aiming and 8-way movement.

This is compatible with all my other resource packs, and the documentation includes instructions on how to update the behaviors with features from those resource packs, such as RPG elements, special effects and cutscenes.

Happy Sencyling!

Rated 5.0 out of 5 stars
(3 total ratings)
Made withOpenFL, Stencyl
TagsGame Design, Stencyl


Buy Now$15.00 USD or more

In order to download this Stencyl resource pack you must purchase it at or above the minimum price of $15 USD. You will get access to the following files:

Luyren AI and Combat Pack.rar 15 MB

Download demo

Luyren Basic Combat Pack.rar 5 MB

Development log


Log in with to leave a comment.

There is an issue I did notice, I'm not sure if you've come across this yourself, but I did see this in the sample project also. 

When two different actors end up in the exact same Y position you'll get flicker between them as they seem to fight for dominance using Z-Order.

At least on my end, that flicker looks like a pseudo-transparency. I liked this accidental result so I just left it as is.
If you want to remove that effect, I believe you can replace >=with just > in the "UpdatePositions" event, where it checks for "Y Position Check". I'll add that to my to-do list as I update my resource packs, but either way thanks for bringing this to my attention!


Excellent, yep that fixed it.
Actually, I can see how some people may wish to keep it as a sort of old-school transparency effect.
For myself, it was too reminiscent of flickering in NES games, so glad it was such an easy fix. Thanks for getting back to me so quickly!

Glad to know it is fixed and thanks for letting me know. I'll see if I can add that as an option, to have or not the pseudo transparency.

Haven't used anything from it yet, but after importing the resource pack into my existing project, I got this upon trying to test my game. Any idea what might be happening here? Stencyl 4.1.0 (b11017) macOS 12.4

(1 edit)

May have come across the issue, in the sample game, everything was fine. But in my already created game, there is a <"custom-2" (custom block) 0:> block. It should have been the <Infect Damage: Damage> block.

(1 edit)

This seems to be related with a new feature in the private builds for missing custom blocks, but it shouldn't be triggering in this case. Do you happen to have another behavior called "Health" in your game before importing the resource pack? I'll run some tests on my end to see if I can reproduce the issue.

Edit: I tried on b11028, importing the resource pack into a brand new game with only one scene, and I cannot reproduce the issue. I can only test on Windows, and I'm not sure if this issue is OS dependent. Can you do the same test on your end, importing the resource pack into a new game with only one scene?

The likelihood of having a behaviour already called Health would be extremely high. When I get home I’ll double check though.

Having a behavior with the same name as one from the pack already in the game is the only way I could get something similar (but not quite the same) to your issue, so I recommend you delete your old Health behavior and try again.


Had a look through the behaviours I had, and health was one (from the old Side Shooter pack I believe). Removing it and then imported your pack and it did the trick, thanks for the assistance Luyren!

Creating a new blank game and importing the resource pack went smoothly, was able to compile no problem. So not an OS issue.


Amazing Pack. Purchased.

Appreciate it!

(1 edit)

This looks awesomely helpful! 
I have no idea if this is even the right question, but- will the basic behaviors work with any enemy regardless of animations and such? Like, the same stuff that tells a basic slime to move and munch will also apply to a larger, more complex foe? I am also struggling to find a way to convert rar to PNG- is there any way to download the PNGs so Stencyl can understand them? 

Yes, your actor's animations by themselves have no bearing in how the behavior works. 

You must extract the .rar file (with winrar for example) to get the contents of my resource packs, which include the .png you can import into Stencyl (File > Import Resource), documentation and the project file for the sample game.


Thanks a bunch Luyren! I'm excited to try these out!

Looks excellent. Very promising.
However, I got a prompt when I opened the sample game saying it was "written in a newer version of stencyl (4.1.0 b10658) and might be incompatable with your current version."

But I have version 4.0.4, which I understand to be the newest stable build. 

You can open the sample game without issues with your current build of Stencyl. You can just hit ok on that warning and you are good to go.


Purchased. Thank you.

Appreciate it, thank you very much!