Hey guys,
I've played around a bit with my flashlight function and it works great - copied Raynor - Flashlight behavior, set trigger to turn flashlight on if Q is pressed, turn it off if Q is pressed again - complete with a little 'click' each time :) - buuut... it's basically functionless, other than the fact that it shines light in the direction you face.
What I'd like to do is, if the light is off, change the unit's reveal radius to 1-3, if the flashlight is on, change reveal radius to 6 or so. That way it seems like the flashlight is actually doing something.
However, I haven't found a function to change unit stats on the fly, only in the data editor.
Would it be possible to have two circular regions move around (with the unit at the center) with the unit? ie: smaller circle (flashlight off) inside larger circle (flashlight on), where ever the unit goes, the regions are moved to those coordinates. If flashlight = true, reveal radius is equal to the size of the larger circle, if flashlight = false, reveal radius is equal to the size of the smaller circle?
You can move regions with the player, just update the new coordinates of the region with Move Region every time the player moves
Then you can probably use Reveal Area and set it to that region and use Update Revealer whenever the region moves
Does your function set the Flashlight behavior on the unit or does it just apply the model? I made the flashlight a ability on the command card that I can turn on and off with a hotkey. In the flashlight behavior you can set a Sight Range bonus for when its active. Just a thought
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Hey guys, I've played around a bit with my flashlight function and it works great - copied Raynor - Flashlight behavior, set trigger to turn flashlight on if Q is pressed, turn it off if Q is pressed again - complete with a little 'click' each time :) - buuut... it's basically functionless, other than the fact that it shines light in the direction you face.
What I'd like to do is, if the light is off, change the unit's reveal radius to 1-3, if the flashlight is on, change reveal radius to 6 or so. That way it seems like the flashlight is actually doing something.
However, I haven't found a function to change unit stats on the fly, only in the data editor.
Would it be possible to have two circular regions move around (with the unit at the center) with the unit? ie: smaller circle (flashlight off) inside larger circle (flashlight on), where ever the unit goes, the regions are moved to those coordinates. If flashlight = true, reveal radius is equal to the size of the larger circle, if flashlight = false, reveal radius is equal to the size of the smaller circle?
@QMJ3: Go
You can move regions with the player, just update the new coordinates of the region with Move Region every time the player moves Then you can probably use Reveal Area and set it to that region and use Update Revealer whenever the region moves
Does your function set the Flashlight behavior on the unit or does it just apply the model? I made the flashlight a ability on the command card that I can turn on and off with a hotkey. In the flashlight behavior you can set a Sight Range bonus for when its active. Just a thought