need help on a simple condition

jig7c

Stop reading me...-statement
Reaction score
123
how do i reduce the bottom code to make it more suitable
i want the condition to be

killing unit is a hero and random integer 1 to 100 less than or equal to 10....

10% chance the killing hero will benefit from the actions...

Code:
 private function Conditions takes nothing returns boolean
    if ( not ( IsUnitType(GetKillingUnit(), UNIT_TYPE_HERO) == true ) ) then
        return false
    endif
    if ( not ( GetRandomInt(1, 100) <= 10 ) ) then
        return false
    endif
    return true
endfunction
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top