• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

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