• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

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