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

Constant Item drop System?

Status
Not open for further replies.
Level 13
Joined
Mar 24, 2010
Messages
950
What do you mean? Like when you replace a unit via a trigger then when you manually set a unit to drop an item in the editor it no longer drops that item? If thats the case you should use triggers to also do your item dropping for certain units.
 
Yeah, I guess he means anything than an item table, which you can fill via the Editor.
  • Trigger1
  • Events
    • Unit - A unit dies
  • Conditions
    • (Unit-type of (Triggering unit)) Equal to Wolf
    • (Random integer number between 1 and 100) Less than or Equal to 50
  • Actions
    • Set Point1 = (Position of (Triggering unit))
    • Item - Create 1 Wolf Collar at Point1
    • Custom script: call RemoveLocation (udg_Point1)
This is a trigger with a 50% chance to create a wolf collar, when a wolf dies. :)
 
The event is Unit - A unit dies event.
The conditions are "Unit-type comparison" and "Integer comparison". The left side is "Math - Random number".
The actions are "Set variable"; you create a variable, call it "Point1" of type "Point".
The next action is Item - Create Item. The final action is the "Custom script" action. Type "call RemoveLocation (udg_Point)" in it, without the quotes.
 
Status
Not open for further replies.
Top