• 🏆 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!

Drop Chance

Status
Not open for further replies.
Level 3
Joined
Jul 26, 2011
Messages
38
Hi guys

can u help me with this?

if a enemy die there 50% chance to drop an item
if the 50% chance fail. Kill (killing unit)

how to do this?
 
Level 23
Joined
Apr 16, 2012
Messages
4,041
this is wrote from head on mobile so there may be spelling errors
  • Events
    • Unit - A unit dies
  • Conditions
    • Unit-Type of Triggering unit is equal to whatever unit type you want
      • //if you want this for any unit remove the condition
  • Actions
    • If Math - Random Integer from 1 to 2 or whatever it is is equal to 1 do Then actions else do Else actions
    • Then
      • Item - Create Item ...
    • Else
      • Unit - kill Killing Unit
when I get my hands on keyboard I will write it in editor and copy it here if noone else does so meanwhile
 
Status
Not open for further replies.
Top