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...
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