i cant get my spawned units to drop items and can only make my creeps that are already on the map drop units. i cant figure how i might be able to do it in trigger but any help will be greatly appreciated.
It can be done with JASS by manually creating your triggers. You have to create a function that drops your item (and have all your random choice stuff in there) then you need to create a trigger and add the event of that units death to the new trigger. Blizzard adds unit death and unit changes owner events to the trigger that drops the item. (If you look at the war3map.j with WinMPQ you can see how they do it)
You might be able to get away with not using JASS, but then creating triggers would be difficult. You would end up doing something like keep on adding events to the same trigger, and the events would never get deleted till the end of the map.
Please search the older topics. There are already explained many times how you can make creeps or any units drop random items. Not that long ago i explained it, go search it!
i have tried looking for old posts but nothin comes up with what i'm looking for if you could give me the link to the old post or tell me i will greatly appreciate it
Create a variable integer called Random to make the item be created randomly whenever a creep dies.
Event- Unit Dies
Condition- Owner of unit equal to Neutral Hostile
Action- Set Random equal to random integer between 1 to 3 If- Random equal to 1 then create tome of power at position of triggering unit else do nothing. If- Random equal to 2 then do nothing else do nothing. If- Random equal to 3 then do nothing else do nothing.
This trigger enables the tome of power to be dropped by a creep one-third of the time whenever it dies. Sorry for the inaccuracy of the trigger but i hope this helps
LeviathanRebornCreate a variable integer called Random to make the item be created randomly whenever a creep dies.
Event- Unit Dies
Condition- Owner of unit equal to Neutral Hostile
Action- Set Random equal to random integer between 1 to 3 If- Random equal to 1 then create tome of power at position of triggering unit else do nothing. If- Random equal to 2 then do nothing else do nothing. If- Random equal to 3 then do nothing else do nothing.
This trigger enables the tome of power to be dropped by a creep one-third of the time whenever it dies. Sorry for the inaccuracy of the trigger but i hope this helps
No, its not that simple. What if a boss must drop more items or if u want higher lvl creeps drop other items etc etc. U'll need hundreds of triggers then. U will have to use JASS. (I dunno anything about JASS but maybe u can add item tables with JASS or sumthing)
Just change the condition to unit-type of dying unit equal to (wateva creep u want). Anyways, thats how i do it coz i dunno about JASS. And if the creep is a boss, just create another similar trigger but different percentage chance for items drop or wateva u want.