Luyren's Miscellaneous Behaviors

eraser88

  • Posts: 5
i managed  to get it to work . just chaned the indexes with the exemple provided in the pdf :  true/5/100/30/3/Add/Tint,100/255/30/200

and its working now . thanks a lot man for all the amazing stuff you shared again . you re the best

Luyren

  • *
  • Posts: 2806
Version 2 is now available
I've been working on a tutorial video for this resource pack, and ended up heavily updating it, with a series of bug fixes, new features and compatibility changes to support new resource packs in the future. These changes are also present in the cutscene resource pack.

You can see the tutorial video here: https://youtu.be/5BROU617SRE

Change Log
-Actor Aura now supports multiple auras at once.
-Scene Soundtrack now supports Cross-fade
-Particles
   -minimum and maximum times between particles
   -select the amount of particles to create from a range
   -revamped the way you setup (use commas now, easier to read)
   -fixed limited particle indexes not deactivating.
-Player Control
   -Added coyote time (leeway to jump after falling off a ledge)
   -Updated with code to support a future resource pack (sloped semi-solid platforms)
-Slide Camera
   -Custom block now accepts tweening options
   -Auto-Scroll options and new custom block
-Time Count
   -Fixed the reset option of the modify timer custom block
-Tint Screen
   -Fixed bug when tinting the screen when you already have values on the "Tint Layers" attribute.
-Several small bug fixes that I forgot to keep track of.

« Last Edit: March 04, 2020, 08:53:46 am by Luyren »
My Stencyl resources are available here: https://luyren.itch.io/
Cutscenes, RPG Elements, Particles, Map System and many more.

Luyren

  • *
  • Posts: 2806
So I missed one feature in the Switch Backgrounds behavior, the option to fade the background layers over time, and that same behavior wasn't included in the documentation. I've fixed both, and also reuploaded the tutorial video with the new changes.

Tutorial here: https://youtu.be/5BROU617SRE
Download the pack here: https://luyren.itch.io/luyrens-miscellaneous-stencyl-behaviors
My Stencyl resources are available here: https://luyren.itch.io/
Cutscenes, RPG Elements, Particles, Map System and many more.

mdotedot

  • Posts: 1654
Awesome!

That was an incredible amount of time to create that tutorial!

What an options! I need to look once or twice before I could understand the different switch and parameters that you can adjust on each behavior.

If I'm buying the pack and you make an update, how can I get the updated version?
And I kind of want an anonymous buy? Is that possible or do I require to put in my personal information?!?

Proud member of the League of Idiotic Stencylers! Doing things in Stencyl that probably shouldn't be done.

Luyren

  • *
  • Posts: 2806
If I'm buying the pack and you make an update, how can I get the updated version?
And I kind of want an anonymous buy? Is that possible or do I require to put in my personal information?!?
To get all the updates you can just redownload the pack form the itch.io page. There sadly isn't a way to apply the update to a game that already has the pack. Truth be told I haven't tried importing the same resurce pack twice to a game to see what happens, but I don't think that'd work. And as a reminder: this pack is pay what/if you want. The cutscene pack has everything from this pack, plus a bunch of other stuff. It has a minimum price though, so something to consider if you are willing to show monetary support.

I'm not 100% sure about the information you have to put in when purchasing stuff on itch.io. You can pay with paypal or your card directly. I do know that you have to provide an email, but I'm not sure if an itch.io account is required. I'm the only one that has the list of who purchased it.

From the itch.io FAQ:
Quote
Can share the information itch.io collects about my buyers publicly or with third parties?
No! It is a violation of our privacy policy to share private, identifiable information that itch.io collects about buyers. itch.io’s dashboard provides sellers with tools & information to help them identify any suspicious activity or abuse. The information can only be used for your own personal records, and for bookkeeping if necessary.

Taking this information out of itch.io to be shared publicly or with third-party services may result in the suspension of your account. If you have any issues or concerns please contact us.

This information includes fields like: Email address, Name, IP Address, Country Code, and Transaction IDs.
My Stencyl resources are available here: https://luyren.itch.io/
Cutscenes, RPG Elements, Particles, Map System and many more.

Luyren

  • *
  • Posts: 2806
​The ​Player Control ​behavior has been updated with analog support. Previously, a control bound to an analog input would just act as a regular key. Now, you have the following extra options.

-Analog Running Threshold: you can make your character automatically start running if the analog pressure is above the given threshold. This doesn't conflict with the run button, as you can use both at the same time: d-pad or keyboard + run button, or only the analog threshold. This can be disabled.
-Analog Adjustment: you can make the top speed change based on how far the analog is tilted. At full tilt, your actor uses the full speed. At mid tilt, it uses half, and so on. This can also be disabled.

Binding the gamepad to your game's controls can be done with Stencyl blocks, or you can use the features in my Cutscene Pack​ to do that.

As always, you can get the pack here: https://luyren.itch.io/luyrens-miscellaneous-stencyl-behaviors
My Stencyl resources are available here: https://luyren.itch.io/
Cutscenes, RPG Elements, Particles, Map System and many more.

Luyren

  • *
  • Posts: 2806
​In recent weeks I've found out there were some memory mismanagement going on in my resource packs, and I just finished the work to fix that. This is more of a "better safe than sorry" fix, as the previous version worked just fine, and it would probably only be an issue in very rare cases.

No new features were added to this pack, only the memory optimization. As always, you can download the latest version here.
My Stencyl resources are available here: https://luyren.itch.io/
Cutscenes, RPG Elements, Particles, Map System and many more.

dtishin

  • *
  • Posts: 89
Hi Luyren, I'm refactoring and redesigning my game (www.firesidehero.com), with the save system as a major task.
I'm currently building it myself with the standard blocks, but I just bought your Miscellaneous resource pack and it seems very interesting for my runtime-created actors.

1. Can "Save Actors" behaviour be used for storing the actor info between game launches, together with the "normal" game attributes for which saving has been set to "enabled" (predefined by user)?

2. If so, how exactly do I trigger the "save" events in my actors? Or everything is saved automatically every cycle, as long as the Scene Save boolean is set to true?

3. Are relative attributes also saved correctly? E. g. I have a global hashmap salvable attribute called "selected hero map" that basically points to another hashmap attached to a hero avatar actor. Will loading all the respective actors using your behaviour, and loading the saved "selected hero map" attribute using the "load saved game" block keep that link between these maps?

Thanks!

Luyren

  • *
  • Posts: 2806
1. Can "Save Actors" behaviour be used for storing the actor info between game launches, together with the "normal" game attributes for which saving has been set to "enabled" (predefined by user)?
Yes. All saved information is stored in game attributes. If you use Stencyl's save and load blocks, those are included.
Quote
2. If so, how exactly do I trigger the "save" events in my actors? Or everything is saved automatically every cycle, as long as the Scene Save boolean is set to true?
In the description of the behavior, you'll see a section called "Triggers", which are custom events you can call to quickly interact with the behaviors. The "Save Status" behavior (the one you attach to actors) automatically saves whenever there is a scene transition, and you can call the trigger "Save" for your actors if you want to save the actor's data at any other moment. The "Scene Save" boolean is only required if you want to save actors to that scene specifically, and it's intended for actors created at run time which you want to save. That means multiple instances of that actor type can be saved in the same or in different scenes, each with their own values. As such, this is not used for player actors in the vast majority of cases.

Save Status: attach to the actors you want to save. Populate the "Values to Save" map with the attributes and actor values you want saved. Check the "Scene Save" boolean if that actor type is created at run-time and must be loaded back when you return to a scene.

Save Actors: attach this behavior to scenes that will store actors created at run-time. If you leave and return to this scene, those actors will automatically be created.

TLDR: if you want to save outside of scene transitions, call the trigger "Save" for your actors. Otherwise, stuff is loaded when the scene/actor is created, and saved during scene transitions. If you save run-time created actors, those will be automatically created and their configured values loaded along with the scene.

Quote
3. Are relative attributes also saved correctly? E. g. I have a global hashmap salvable attribute called "selected hero map" that basically points to another hashmap attached to a hero avatar actor. Will loading all the respective actors using your behaviour, and loading the saved "selected hero map" attribute using the "load saved game" block keep that link between these maps?

Thanks!
If you use other game attributes in your logic, those are not affected by my behaviors. What the Save Status behavior does is allow you to type in the name of actor values or actor attributes and store them in a map game attribute. Whenever that actor is created, it will set all its selected values to the ones stored in the game attribute. It's up to you to populate the "Values to Save" map in that behavior with everything you want to save for that actor. You can also save maps and lists using my behaviors, and maps containing other maps or lists, but I'm unsure what would happen if you store just a "pointer." You could add both your pointer and your main map in the "Values to Save" map and it should all be good, I think. But if what you mentioned involves only game attributes, then it shouldn't interfere.

And last but not least, thank you for the support!
My Stencyl resources are available here: https://luyren.itch.io/
Cutscenes, RPG Elements, Particles, Map System and many more.

Luyren

  • *
  • Posts: 2806
Small update. This is the same update applied to my Cutscene Pack, as this behavior is included in both packs.

The Player Control behavior has been update with a small fix. Previously, whenever the actor jumped, the code to stop the jump short would constantly execute as soon as you released the jump key. This could create conflict with your own code if you made some sort of upward movement after the actor already jumped. This fix prevents this issue.

You'll need to redownload the pack, remove the old one from your game and reimport the new version. If you don't want to remove the old pack from your game, the following image shows instructions on how to perform the update yourself:
  • Create a hidden boolean attribute called "Stop Jump Complete";
  • In the Updating event, set that boolean to "false" near the top of the event. It's in the "Otherwise" of the "If not On Ground" check.
  • In the Updating event, on the if check for the "StopJump" trigger, add the "Not Stop Jump Complete" check.
  • In the "StopJump" custom event, update it according to the image.

And that is the update. As always, you can get the most recent version here:https://luyren.itch.io/luyrens-miscellaneous-stencyl-behaviors
My Stencyl resources are available here: https://luyren.itch.io/
Cutscenes, RPG Elements, Particles, Map System and many more.

Luyren

  • *
  • Posts: 2806
The Actor Aura and After Image behaviors have been updated with new features:
  • Both behaviors now have a limit option that automatically deactivates an aura or after image. An aura can stay active for a certain amount of frames, and after images can be limited to an amount of images created.
  • Auras now have the option to increase and decrease their scale and opacity in cycles.
  • The Save Status behavior's default values now include new attributes from those two behaviors for saving the new information.

I've also made a new tutorial video covering only these new changes. For information on the other attributes and features of these behaviors, refer to the original miscellaneous pack tutorial video.

Watch the update tutorial here: https://youtu.be/a6ro_pspcd4

This is the same update from my cutscene pack. If you have that, these changes are included in the new update of that as well.
My Stencyl resources are available here: https://luyren.itch.io/
Cutscenes, RPG Elements, Particles, Map System and many more.

Luyren

  • *
  • Posts: 2806
Small update here:
-Player Control behavior now has support for multiple irregular semi-solid actors chained together. This should make it easier to setup your terrain.
-Fixed a bug in the Particles behavior where the initial angle of the particles wasn't being set.
-Color Swap behavior now has an option to turn off optimization. If the color swap is not being applied consistently through animation changes, turning off optimization will fix that.

The same changes have been applied to the cutscene pack.

As always, get it here: https://luyren.itch.io/luyrens-miscellaneous-stencyl-behaviors
My Stencyl resources are available here: https://luyren.itch.io/
Cutscenes, RPG Elements, Particles, Map System and many more.