Mirage Source
Fade? - Printable Version

+- Mirage Source (https://mirage-engine.uk/forums)
+-- Forum: Mirage Source (Nostalgia) (https://mirage-engine.uk/forums/forumdisplay.php?fid=61)
+--- Forum: Archive (2006-2011) (https://mirage-engine.uk/forums/forumdisplay.php?fid=18)
+---- Forum: General (https://mirage-engine.uk/forums/forumdisplay.php?fid=17)
+---- Thread: Fade? (/showthread.php?tid=651)



Fade? - Tony - 16-01-2007

Im not very good with thinking so I'd like for someone to help me .___.

So Lets say I had a function and at player death, How could I possibly check if the player has died if so fade them? I have a function but what I need to know is how to change it to make it look like its fading and how to check if the player has died


- William - 16-01-2007

What function?


Re: Fade? - Tosuxo - 16-01-2007

Kuja Wrote:Im not very good with thinking so I'd like for someone to help me .___.

So Lets say I had a function and at player death, How could I possibly check if the player has died if so fade them? I have a function but what I need to know is how to change it to make it look like its fading and how to check if the player has died

what do you mean by "fade" them?

and
if getplayerhp(index) 0 then FunctionIsDead = 0

or something.... but i still don't know what you mean by "fade" them


- Tony - 16-01-2007

I have an alpha blending function.

I just want to know how to slowly decrease it.

Call Blend(10)
Call Blend(9)
Call Blend(7)

Etc.


- Tosuxo - 17-01-2007

you mean like the screen fades out? sorry, i'm drunk, i can't code it for you when drunk hehe


- Tony - 17-01-2007

Omfjesus. How would I decrease a value over and over without a timer?


- William - 17-01-2007

Its funny you said it was a function, when it was a sub.


- Dark Echo - 17-01-2007

Best way would be to use gettickcount.. maybe 500 should be a good enough.. fade the sprite by a point every half a second.. maybe 333 might be better.. I dont know, how long it takes for the sprite to fade out completely.. But yeah.. use gettickcount.. :wink:


- Tony - 18-01-2007

William Wrote:Its funny you said it was a function, when it was a sub.

Its not a sub, its declaring a function from a dll ._____.


- Robin - 18-01-2007

If it's the unofficial standard, it will be in 255 points.

So, to fade out in two seconds, simply use gettickcount and fade out 255/2 points each second.