Hard Light Productions Forums
Modding, Mission Design, and Coding => The FRED Workshop => Topic started by: killface on November 01, 2008, 06:40:20 pm
-
Anyone know of a way to get a glowmap to "flicker" rapidly? I've got a damaged vessel I want floating out there
-
There are two ways i can think of, the first one would be to create an ani ( eff ) file, and each two files are dark, means no glowmaps ( 2 frames glowmap, then 2 frames a dark bitmap then 2 frames glowmap aso ).
The second way use the deactivate glowmaps / activate glowmaps SEXPs, with a delay of 1 second.
If the vessel is damaged when the player arrives you could make
has-arrived-delay ( other triggers are probably better )
--------0
--------Alpha1
-----deactivate-glowmaps
------------<the name of your ship>
then make a similar event which activates the glowmaps, chain 'em with a high repeat count.
-
Just use "true" as the trigger...
Though the animated glowmap will probably go faster.
-
I'd go for the ani, that way you could make it random-er, not just on-off-on-off-on-off-on-off.
-
The ani would probably work best. One second ons and offs I can do, but that isn't quite a "flicker", if you know what I mean.
-
If you try the ani, then you can specify in the eff file how long the frame is shown, IIRC.
With a short value this will give ya the flickering look.
-
I'd go for the ani, that way you could make it random-er, not just on-off-on-off-on-off-on-off.
You can do that with SEXPs too though. You simply have to turn the glowmap on and off at random times.
-
But aren't you limited by one-second increments in SEXPs? I want this to flicker several times a second, as a standard electric/damage flicker would.
-
Well you have a couple of options. You can use ever time which processes constantly. Heck haveing 2 evertime loops running with on and off my give a flicker effect. Of course it just may crash things.
I managed to do a loop like 6 times a second some other way one time. I'll have to look that one up and see how I did it if I still have it. Wasn't my mission.
-
Funny, I thought we had a flicker-glowmaps SEXP.
-
But aren't you limited by one-second increments in SEXPs? I want this to flicker several times a second, as a standard electric/damage flicker would.
Nope. Events are evaluate once per frame. If you set the repeat delay to zero the event will be evaluated the next frame. Clever use of variables to decide when to change the state of the glowmaps could quite easily give you a flickering effect without the need for a glowmap ani.
The advantage of using SEXPs is that at some point in the mission you have have the flickering stop and the glowmaps stay on or off. With an ani you can only turn them off (by deactivating glowmaps).
-
Remember how *cough* managed to use a transports velocity and the when-distance < sexPEE to evaluate something in under a second in the burn baby burn mission of JADSE?
-
Yes but that's unnecessary here. Axem's problem was that he needed exactly half a second in order to have a piece of music play at the right time. Here timings don't need to be so precise
-
Still handy to know....