This script provides a “change opacity” feature to your feature objects. When the feature is applied, the opacity of a sprite is changed.
- Open the script editor
- Place this script below Feature Manager and above Main
Note-tag feature objects with
<feature: change_opacity> formula: YOUR_FORMULA </feature>
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
<feature: change_opacity> formula: 128 </feature>
Base it as a fraction of the subject’s HP
<feature: change_opacity> formula: a.hp / a.mhp.to_f </feature>
Use the current opacity value
<feature: change_opacity> formula: opc - 1 </feature>