by DavidPH » Thu Feb 25, 2010 8:40 am
Spleen wrote:Cutmanmike wrote:DavidPH wrote:Oh! Oh! Or a monster who fades based on its current health/maximum health!
Shhhh saying things like this usually makes the WFDS sticker rise from it's slumber

[wiki]DECORATE_expressions[/wiki]
A_FadeTo(health, some_number) should already work if this is implemented

Which was my whole point, noting all of the cool things that the addition of this one function would allow.
EDIT: Decided to try writing this myself, and came up with this:
A_FadeTo(float target, float amount = 0.1, bool remove = false)
Causes actor's transparency to move by amount towards target.
If remove is true and the actor's transparency reaches target, it is destroyed.
It works (as far as I've tested), there's just one problem: I don't know how to submit it. I know where, but not what format. Maybe there should be a Code Submissions Guidelines sticky?
[quote="Spleen"][quote="Cutmanmike"][quote="DavidPH"]Oh! Oh! Or a monster who fades based on its current health/maximum health! [/quote]
Shhhh saying things like this usually makes the WFDS sticker rise from it's slumber :wink:[/quote]
[wiki]DECORATE_expressions[/wiki]
A_FadeTo(health, some_number) should already work if this is implemented :P[/quote]
Which was my whole point, noting all of the cool things that the addition of this one function would allow.
EDIT: Decided to try writing this myself, and came up with this:
A_FadeTo(float target, float amount = 0.1, bool remove = false)
Causes actor's transparency to move by amount towards target.
If remove is true and the actor's transparency reaches target, it is destroyed.
It works (as far as I've tested), there's just one problem: I don't know how to submit it. I know where, but not what format. Maybe there should be a Code Submissions Guidelines sticky?