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

Randomly drop items

Status
Not open for further replies.
Level 7
Joined
Dec 17, 2005
Messages
337
I am making a map where i want a specific type of creature to drop an item randomly. What this means is that 1/50 of these monsters will drop the item.

My current trigger goes as:


Troll Axe
Events
Unit - A unit Dies
Conditions
(Owner of (Dying unit)) Equal to Neutral Hostile
Or - Any (Conditions are true)
Conditions
(Unit type of (Dying unit)) Equal to Troll Youngblood
(Unit type of (Dying unit)) Equal to Troll
Actions
???


I need to know how to fill up this area. I want the Troll Axe to fall at the feet of the slain troll. (Item is dropped 2% of the time when one of those 2 are killed.)
 
Level 2
Joined
Jun 22, 2007
Messages
10
Add to conditions:

"(Random integer between 1 and 50) equal to 1"

And then to actions:

"Create <Troll Axe> at <Position of dying unit>"
 
Status
Not open for further replies.
Top