[JASS] No random item is created

Status
Not open for further replies.
Level 27
Joined
Feb 2, 2006
Messages
1,592
Hi,
I have multiple custom spells which should spawn random items but no item is created:
JASS:
call UnitAddItemByIdSwapped( ChooseRandomItemBJ(1), GetTriggerUnit() )

This is the code converted from a GUI trigger.
Why is not item created? There should be at least one random item type with level 1 right?
It does not work for other levels either.
I have disabled "Include into Random Choice" for some item types but not all and not too many.
 
Level 27
Joined
Feb 2, 2006
Messages
1,592
Yes I am aware and for example tomes I have disabled the "Include into Random Choice" so maybe no item types are left to be included?
Should I use a different function? Which one uses the classified level which seems to be better?

edit:
Found it. I will try this one now:

JASS:
ChooseRandomItemExBJ(1, ITEM_TYPE_ANY)
 
Level 43
Joined
Feb 27, 2007
Messages
5,464
If you want control over randomized item drops, I suggest you learn how to use ItemPools. JASS-only but not hard to work with and very useful.
 
Status
Not open for further replies.
Top