Luyren AI and Combat Pack
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.
This pack comes with a sample game you can import into Stencyl, in which you can see how each actor is configured, as well as a comprehensive documentation file. It supports 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!
Download
Click download now to get access to the following files:
Development log
- Update and Price Change71 days ago
- Update for Stencyl 4.1.1Apr 03, 2024
- Performance FixMay 18, 2021
- Extra LivesMay 10, 2021
- Actor Registry Update: Z-OrderApr 06, 2021
- Input Buffer UpdateMar 23, 2021
- Actor Registry and Radial Position FinderMar 16, 2021
- Basic Attack Movement and Push-BackJan 15, 2021
Comments
Log in with itch.io 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
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.
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!
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!