Gryffin
New Member
- Reaction score
- 6
I have a trigger that causes an attack to pick pocket the attacked unit. I want the attacking unit to steal a random item being carried by the attacked unit. Units have varying inventory sizes, so I can't just say random number between 1 and 6. Using random number between 1 and "number of items carried by unit" does not work either.
I've tried many, many variations of actions involving items and none of them work properly.
Also, I want an item to be guranteed to be stolen without having to repeat the line of code. So if a unit has an inventory of 6, and is carrying 2 items in random slots, I want the thief to be guranteed to steal one of those two items when he attacks. Everything other than this one line of code works perfectly.
I've also tried using "random level -1 any-class item type," but that won't work either. The items I'm testing this with have "Include as Random Choice" set to true. An item will be stolen occassionally, but it's random, not guranteed. I really just need a way to say "Drop Any Random Item Being Carried By Attacked Unit from Attacked Unit."
Thanks in advance.
I've tried many, many variations of actions involving items and none of them work properly.
Also, I want an item to be guranteed to be stolen without having to repeat the line of code. So if a unit has an inventory of 6, and is carrying 2 items in random slots, I want the thief to be guranteed to steal one of those two items when he attacks. Everything other than this one line of code works perfectly.
I've also tried using "random level -1 any-class item type," but that won't work either. The items I'm testing this with have "Include as Random Choice" set to true. An item will be stolen occassionally, but it's random, not guranteed. I really just need a way to say "Drop Any Random Item Being Carried By Attacked Unit from Attacked Unit."
Thanks in advance.