HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Spawned Creeps That Drop Random Items

02-15-2004, 03:16 PM#1
dexllgamer
Hi,

I have a map where i spawn new creeps after the old ones have been killed. But i cannot figure out how to make them drop random items... There does not seem to be a way through triggers to use the custom item table of the items you selected for the spawned creeps. Is there a way? Is there a better way im not seeing? I would really like them not to drop the same item game after game after game.

Thanks ahead of time.
02-15-2004, 05:05 PM#2
DescX
You could trigger the whole thing...

Store every creep you create in a Unit Group variable.

Use the Unit - A unit Dies event.

Don't use any Conditions.

For your Actions, check if the creep was found in the Unit Group variable - if the unit that died was found inside this variable, then spawn a random item.

The triggering for this would be a bit on the tedious side, and I'm sure what I'm suggesting is an insanely overdone kludge (it seems to me you should be right - just adding custom tables via triggers should be there - but apparently it isn't), but the fact is that what you're lookinh for can be done :).
02-15-2004, 09:48 PM#3
dexllgamer
Thanks for helping DescX, but im still dont understand the part about how to make the trigger for the random item. I can make a trigger for the creep dieing (the event) no problem its just the action to make a random item from a group of pre-selected items (pre-selected by me) is what i cant seem to do through triggers.

I wonder if i just delete all the ohter item i dont want an use blizzards item classes? Think that will work? Hmmm...

Im thinking maybe i lay all the creeps out and then pick them up into unit groups then place them as i need to. That way i can use the custom item tables. But that be alot of creeps that will have to be delt with before the blackness fades away. Still not really sure this is the best way...

If anyone knows a better way to do this please let me know.

Thanks again ahead of time.
02-16-2004, 12:12 AM#4
DescX
Alright...

Decided to put my household duties aside and do up the test map here quickly for you. The explanation of how it works is included in the Trigger comments (section above main trigger area in the Trigger Module :P). The test map includes a footman to kill 3 creeps with. Each of those creeps drop random items, and all of them respawn. I did this in about 3 minutes, and it only took that long because I did it in GUI mode instead of JASS (my typing is faster than my mouse accuracy you see ;p).

Anyhow - should provide a good working basis for ya. Let me know if you need any additional help... :)
02-16-2004, 02:24 AM#5
dexllgamer
WOW!!! I think i understand. Thanks man. Your little map you make makes it really clear. Thanks again man. Awsome. You saved me a lot of headach.

@-_-@ <-- My headphones are on.