Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Feature request (https://forums.graalonline.com/forums/forumdisplay.php?f=194)
-   -   Particle engine modifier "fix"? (https://forums.graalonline.com/forums/showthread.php?t=134263312)

Crow 05-22-2011 05:28 PM

Particle engine modifier "fix"?
 
This might be more of a question than a feature request, since the issue is kind of strange.

I've noticed this a long while back when fiddling around with particle emitters. The modifiers seemed strange to me because they didn't really do what I wanted. Sooner or later I had figured out that the modification of variables over a given time window is essentially bugged.

Let's say I got a particle and I want to make sure that the alpha of it goes from 1 to 0 in half a second. I'd do something along the lines of this:
PHP Code:

addLocalModifier("range"00.5"alpha""add", -1, -1); 

This will not work as intended, though. The particles will only fade halfway and stop around 0.5 alpha. This is because (I believe) the specified modification values (-1 and -1, to make sure it's always -1) seem to be on a per second base. That means it reduces the alpha by 1 per second. Since we only have a time window of half a second, it will only go as low as 0.5 alpha. This will do what we really want:
PHP Code:

addLocalModifier("range"00.5"alpha""add", -2, -2); 

Works perfectly fine. But I don't like it. It's a hackish thing to do and it just seems strange to me, overall. I know that "fixing" this issue would break tons of code, though. I don't know what could possibly be done. Different function call maybe?

fowlplay4 05-22-2011 05:37 PM

I would do:

addLocalModifier("range", 0, 0.5, "alpha", "replace", 1, 0);

Crow 05-22-2011 05:54 PM

Well, damn. I always knew I was stupid as ****. Thanks :/


All times are GMT +2. The time now is 02:57 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.