How to make an entity strobe?
Moderator: InsideQC Admins
8 posts
• Page 1 of 1
How to make an entity strobe?
How do I make an entity strobe like the lights?
- silverjoel
- Posts: 51
- Joined: Thu Sep 30, 2010 6:46 am
please be more specific.
like, make the model disappear then reappear? or make the entity emit a strobing light?
like, make the model disappear then reappear? or make the entity emit a strobing light?
-

Error - InsideQC Staff
- Posts: 865
- Joined: Fri Nov 05, 2004 5:15 am
- Location: VA, USA
No no, I mean strobe with light. Like flash as if it were being electricuted.
I see the lightstyle that causes the level lights to flicker in different ways, but how would I apply that to an entity?
I see the lightstyle that causes the level lights to flicker in different ways, but how would I apply that to an entity?
- silverjoel
- Posts: 51
- Joined: Thu Sep 30, 2010 6:46 am
I'm not entirely sure what you mean, but I'd go with using an engine that supports .colormod
that's the easiest way. plus you could get a cool blue-ish tint on the color.
that's the easiest way. plus you could get a cool blue-ish tint on the color.
-

Error - InsideQC Staff
- Posts: 865
- Joined: Fri Nov 05, 2004 5:15 am
- Location: VA, USA
world lights use lightstyles, which are compiled in to the map.
The style then uses a lightstyle string which says the light level at a particular (repeating) point in time.
If you want your ent to move (and thus move the area lit too), this isn't an option.
In which case you need to use dynamic lights.
There's some DP extension which provides extra fields to specify specific light radius/colours, or you directly spawn a dlight in csqc, either way setting the light levels per frame. But without extensions, you're limited to 'self.effects |= EF_DIMLIGHT'... which obviously can't strobe.
The style then uses a lightstyle string which says the light level at a particular (repeating) point in time.
If you want your ent to move (and thus move the area lit too), this isn't an option.
In which case you need to use dynamic lights.
There's some DP extension which provides extra fields to specify specific light radius/colours, or you directly spawn a dlight in csqc, either way setting the light levels per frame. But without extensions, you're limited to 'self.effects |= EF_DIMLIGHT'... which obviously can't strobe.
- Spike
- Posts: 2892
- Joined: Fri Nov 05, 2004 3:12 am
- Location: UK
strobing moving light: add EF_MUZZLEFLASH every 3-4 frames
strobing light, no movement: give the light a targetname in the editor, this will give it a unique style. Then, at the appropriate time your code should set the light style to e.g. "azazaz" or similar. Then when finished, set it back to "a" or "m" depending on whether it should still emit light when not strobing.
strobing light, no movement: give the light a targetname in the editor, this will give it a unique style. Then, at the appropriate time your code should set the light style to e.g. "azazaz" or similar. Then when finished, set it back to "a" or "m" depending on whether it should still emit light when not strobing.
- metlslime
- Posts: 316
- Joined: Tue Feb 05, 2008 11:03 pm
8 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest