Flashlight Behavior question

eXirrah

New Member
Reaction score
51
Raynor, Tychus, Swann and Stetmann all have flashlights. There is an behavior Raynor - Flashlight, but none of them use it.

How are the flashlights implemented on these units?

The real thing that interests me is:
1. How can I put flashlights on other units (custom units)?
2. How can I resize the flashlight's light cone to fit different sight ranges?
3. How can I make the flashlight drop shadows of the units that stand in front of it?

+rep for useful answers
 

Dave312

Censored for your safe viewing
Reaction score
269
I'm not quite sure how the inbuilt models have done it (can't seem to figure that out), but there is a Buff called Raynor - Flashlight. Just attach this behaviour to your custom unit. To change the scale, you need to modify the Art - Scale property on the FlashlightModel Actor. I believe that this model acts as a light source, so it will automatically generate shadows and light surfaces on nearby objects.

The one thing I'm yet to figure out is how they make the flashlight model swerve side to side as the unit moves. My flashlight model does move to suit the facing direction of the unit but it doesn't seem to move as much as Blizzards do. I reckon it must be to do with how they have attached it.
 

eXirrah

New Member
Reaction score
51
Hmmm... I must have messed up with the Raynor - Flashlight behavior too much in my map so I created a new map
and attached the behavior to a ghost. It works - the ghost has a flashlight now.

Scaling the actor worked, but there is a glow around the unit that doesn't look right. I'll have to look further into
it to see if I can remove that glow.

The final problem remains. The flashlight illuminates other units, but doesn't drop shadows. Now I recall there is a
doodad(Floodlight) on a mission from the campaign (Outbreak) that drops shadows when illuminating units, but
I can't find a way to do the same with the flashlight. I think there was a flag Drop Shadows that must be set somewhere
and I can't find it...

+rep
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top