Feature: Change Opacity

This script provides a “change opacity” feature to your feature objects. When the feature is applied, the opacity of a sprite is changed.



Script: download here
Required: Feature Manager


  1. Open the script editor
  2. Place this script below Feature Manager and above Main


Note-tag feature objects with

<feature: change_opacity>

where YOUR_FORMULA evaluates to an integer.
If the opacity is, then the sprite is invisible, while 255 is fully opaque.

The following variables are available for your formula

  a - the current subject
opc - the subject's current opacity

Note that you cannot have spaces in your formula if your are using the simple note-tag


Straight numbers

<feature: change_opacity>
formula: 128

Base it as a fraction of the subject’s HP

<feature: change_opacity>
formula: a.hp / a.mhp.to_f

Use the current opacity value

<feature: change_opacity>
formula: opc - 1

You may also like...

6 Responses

  1. AngryAragami says:

    Is it possible to apply this on enemies with script calls? For example, using this in a common event to replicate the blink that enemies perform when they take damage?

  2. Ctelin Ajira says:

    Me: starts testing my game
    Game: "Warning: 'change_opacity' feature requires version 2.00 of this script"

    What's out of date on my end?

    • Hime says:

      That usually means there's a newer version of Feature Manager, and it may require some things that are only available in the new version.

      Just grab the latest one and see if the warning goes away.

  3. Matthew says:

    i was wondering, does this work with states?

Leave a Reply

Your email address will not be published. Required fields are marked *