Forum rules - please read before posting.

Sprite fader also affects children

Hi all,
there's a way to add the functionality to the sprite fader script to also affect the children? I'm a real noob in programming... ^_^
Thanx and bye!

Comments

  • Just took a quick look at the script, and there's a few place where it'll need changes to do what you want. I'll see if I can modify it during the week, but I can't promise a time or day, I've been kinda busy...
  • Uh! Thanx man, no problem, when you can, no hurry! ;)
  • edited April 2017
    Hi, @2finger, just letting you know I already made a modified version of the SpriteFader and ActionFadeSprite. You can find the script code and instructions here. But all you'll need to do is place the MultiSpriteFader script on your parent sprite, then you can use the new action "Fade multiple sprites" to control it in the same manner as the single sprite version.

    I just tested it a bit, but it seemed to work fine. Let me know how it works for you. Cheers!
  • Wow! Very thanx @Alverik! You are super fast! This evening i'll test it and let you know! Thank'you Very much!
  • edited April 2017
    @Alverik: awesome man!!! Works great and with easy use!!! Thank'you very much!  :)>-
    I owe you a beer! 
  • Thank you for this! It's been very useful.

    Just registered to say I found and fixed a bug. If you save game before the fade is over, Remember Visibility won't resume the fade once the savegame is loaded. To fix this, you need to open RememberVisibility.cs, duplicate the code that deals with SpriteFader, and replace
    SpriteFader with MultiSpriteFader, and spriteFader with spriteFaders. Hope this helps!
  • Can you please provide the completed RememberVisibility.cs with the changes for the multifader script? Thank you
  • edited April 2018
    @tzivaeris: The "Multi Sprite Fader" @Rairun is referring to is a user-submitted script on the AC wiki.
  • @tzivaeris by what @Rairun said all you need to do is duplicate the sprite fader block of code (it's an if{} block) in the RememberVisibility.cs and then change the names. like @Rairun said "Replace 
    SpriteFader with MultiSpriteFader, and spriteFader with spriteFaders".

    Just have in mind that updating AC will overwrite your changes, since this isn't an official feature...
  • Thank you for your help guys. AC is a joy to work!
  • Hey all! Really interested in this custom action, but I'm getting this error from the ActionMultiSpriteFade.cs code:

    Assets\AdventureCreator\Scripts\Actions\ActionMultiSpriteFade.cs(116,25): error CS0115: 'ActionMultiSpriteFade.AssignConstantIDs(bool)': no suitable method found to override

    Apologies if this has been addressed somewhere more recently or is an obvious error to fix, I'm still quite inexperienced with custom code! Any suggestions?

  • Welcome to the community, @KramsDesign.

    It's an old script, and I'd recommend relying on Animation to control sprite alphas. However, I've updated the wiki page to have the script work with AC's updated Action system - thanks for pointing it out.

  • Thanks for the welcome and the update, looks good! I've been learning this for a few months now and really loving the support in here, haven't had the need to even post questions until now! Love your work, very much appreciated

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.