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

How to make a drop rate using trigger?

Status
Not open for further replies.
Level 5
Joined
Apr 3, 2015
Messages
104
First you have to create a "integer" variable, then you make a event with "Unit Dies" and in condition you choose the unit that drops the object, then in "actions" you choose the option "Set Variable"- Random Integer Number Between (% drop chance) and 100 or 1000 if you want to make it with decimals. and finally you go to If/ Then/ Else. option in "If" you put an integer comparision with "less than" you write the % drop chance of your unit. In "Then" you put "Object-Create in position of dying unit"
and in "Else" you simply put "Do Nothing" :)
 
Level 5
Joined
Apr 3, 2015
Messages
104
First you have to create a "integer" variable, then you make a event with "Unit Dies" and in condition you choose the unit that drops the object, then in "actions" you choose the option "Set Variable"- Random Integer Number Between (% drop chance) and 100 or 1000 if you want to make it with decimals. and finally you go to If/ Then/ Else. option in "If" you put an integer comparision with "less than" you write the % drop chance of your unit. In "Then" you put "Object-Create in position of dying unit"
and in "Else" you simply put "Do Nothing" :)
like this
 

Attachments

  • tutorialix.png
    tutorialix.png
    42.8 KB · Views: 64
Status
Not open for further replies.
Top