• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Chance to miss in night?

Status
Not open for further replies.
Level 20
Joined
Jul 14, 2011
Messages
3,213
Hi!

I'm making an RPG where the night is really dark, and heroes need a torch or any item with the "Glowing" ability to see (Not only the hero, the player xD Screen is really dark).

I want the heroes to have 15% chance to miss if they are outside the lightsource (of their own items or other allies items)

How can I do that?
 
Level 8
Joined
Jul 3, 2011
Messages
251
This should probably be in the world editor help zone forum since you arent actually requesting anything, but you can do that with curse, when the night starts, just give all units 15% curse if they are outside the lightsource, every few seconds pick units in the map area, if they have curse and are near the light source, remove it, else if they are outside the lightsource and dont have curse, give them it.
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
But, it's not "a" light source. There are several items wich make heroes glow, there are also torches around... with about 400 AoE of light.
 
Level 5
Joined
Aug 16, 2010
Messages
97
You can do this by a buff and a periodic scan.
Add a buff to any hero who carries the torch (add the buff to the item) and every several seconds check every unit in the map, if it doesn't have the buff then add the Curse. If it has the buff and the Curse, remove it, else do nothing.
You can add the buff whenever you want the units not to miss.
 
Status
Not open for further replies.
Top