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

Adding random items to units

Status
Not open for further replies.
Level 4
Joined
Feb 28, 2009
Messages
73
In my map, i have many of the same unit placed around the map. What i need to know how to do is:
-Select all the units, and give 1, 2, 3, or 4 items to each unit.
-Item 1 being a dead item saying, "This area has Zombies"
-Item 2 saying, "This area has Gold"
And so on for the 4 items.
The unit would be able to receive all of these items, 3 of them, 2, 1, or 0 of them.
Then i would make a trigger saying:
If (unit) has (item) then set variable_integer_zombies to (random number 1-10)
And use that trigger for all 4 items.

Any help would be awesome. Thanks!
 

Rub

Rub

Level 2
Joined
Feb 25, 2011
Messages
12
A way to do what I think this is, is attached below.
 

Attachments

  • Clawdruid ItemMapForYou.w3x
    18.9 KB · Views: 45

Rub

Rub

Level 2
Joined
Feb 25, 2011
Messages
12
Create a region variable array and a integer variable and make the point variable a array and classify each region to part of the array then use the integer variable as a counter so you don't have to create it over and over.
 
Status
Not open for further replies.
Top