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

[JASS] Item pools chance to place no item

Status
Not open for further replies.
Level 26
Joined
Feb 2, 2006
Messages
1,695
Hey I found this: http://www.hiveworkshop.com/forums/jass-ai-scripts-tutorials-280/itempools-guide-35180/

My question is: Can I add an item type alone with a chance smaller than 1 and is there a chance then that no item will be placed?

I am thinking of item sets you can make with the World Editor and there you can set a chance for an item of 20 % for example which then is the total chance of the set so there might be no item being dropped.
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
I'm not sure. Try adding a non existent itemtype. Use itemtype 0 for example and test it out.

Otherwise, use a basic if/then/else
If random number between 1 and 5 equal to 5 then do not drop item else drop item

That would result in 20% chance of no item dropping.
 
Status
Not open for further replies.
Top