• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

Change Unit chance

Status
Not open for further replies.
  • Cannibalism
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Cannibalism
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Random integer number between 1 and 10) Equal to 1
        • Then - Actions
          • Set Temp_Point = (Position of (Triggering unit))
          • Unit - Replace (Triggering unit) with a Abomination using The old unit's relative life and mana
          • Custom script: call RemoveLocation(udg_Temp_Point)
        • Else - Actions
@Spinnaker: thanks for correcting me, I didn't read properly. But why don't you type carefully? What is "ghul" and "cats"?
 
Last edited:
For enumerating numbers, you should use Less than or equal to, like 5% chance like this

  • (Random integer number between 1 and 100) Less than or equal to 5
This trigger will pick random number between 1 to 5 (making it 5%)

If you use Equal to in this case, it will only become 1% of the time because it only picks number 5 out of 100.

Less than or equal to, next time for random chances, okay.

But if it's 1 to 10, it's okay to use Equal to 1 because 1 from 10 looks like 10% as we can divide it 1/10 = 0.1 = 10%

Careful use of Math and Computer Programming.
 
Status
Not open for further replies.
Back
Top