HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

How to use this variable in this trigger?

03-04-2008, 01:34 AM#1
Dark_Force9999
Hey everyone, I was a very old wc3campaigns user many years ago. I need help on getting this trigger working.

I am making a RPG map to drop loots from a group of bosses, so I am getting a variable representing a group of bosses. Right now, there is a variable with array of 10. I filled 0 to 11 with the 12 units I wanted in each index to represent them. The only problem is, I can't find which trigger to register "all" of the units stored in the variable.

Event
Unit - A unit owned by Neutral Hostile Dies

Condition
((Dying Unit) is in (Units of type BossNub[(**Don't know what to use here**)] Equal to True)

I am stuck with the part label in red.

Actions
Set RandomingBossLoot = (Random integer number between 0 and 50)
Item - Create RandomBossLoot[(RandomingBossLoot)] at (Position of (Dying unit))
03-04-2008, 01:34 PM#2
MasterofSickness
I think you have to loop through your array to compare the dying unit with the units in the array...
(Even if you use "pick" somehow, the Pick command is a coded blizzard.j command and it also makes a group and checks values for it in the background)

Trigger:
Collapse Events
Unit - A unit owned by Player 1 (Red) Dies
Conditions
Collapse Actions
Collapse For each (Integer A) from 1 to 10, do (Actions)
Collapse Schleifen - Aktionen
If ((Unit-type of (Dying unit)) Gleich klo[(Integer A)]) then do (Do nothing) else do (Do nothing)

EDIT: Be careful, I have a german editor and I didn't rename all trigger tags in the GUI above.
03-04-2008, 02:19 PM#3
RolePlaynGamer
It should look something like this in english:
Attached Images
File type: jpgBoss drop.jpg (24.0 KB)