| 07-26-2004, 01:02 AM | #1 |
In WE Unlimited, you can do something with item pools. So I have a trigger, whenever a unit dies, it creates an item. Create (get random item from item pool) at (position of (dying unit)) But my problem is, i don't have any items in my item pool... So: Add item with id x to your item pool with a 10% chance to be chosen How can I specify which items i want to add? Do I have to go set custom item value of item to x for every item? But that would not work, cuz you can only add custom value to items already placed in the map. RIGHT? o_O I need help! Thx EDIT: K, I figured out that you have to press Ctrl+D in the Object Editor when viewing your items. Then it displays like 100M in front of the name, and thats what the ID is. But what i dont know is how do i write that in the Id field. |
| 07-26-2004, 08:45 PM | #2 |
Try to enter '100M' for ID (with those quotes). It's the standard way to reference IDs and it is regarded as an Integer. Don't use " quotes. |
| 07-26-2004, 09:29 PM | #3 |
But it is an integer value, and it doesn't let your type in ' in the box. Do i have to do Convert string to integer? |
| 07-26-2004, 10:09 PM | #4 |
Thats bad. Enter some number, convert it to jass and replace the number with the '100M' code. You can copy that line, revert the jass conversion and add a custom script command, if you want to maintain the trigger in GUI style. |
| 07-26-2004, 11:46 PM | #5 |
How do you revert a JASS conversion? I have some maps that have a weird way of "protection" on them. I can open them in WE, but can't save them, and all the triggers are changed from GUI to JASS so I can't learn anything from them :( and I would like to be able to change them to GUI so I can learn from them. |
| 07-31-2004, 08:13 AM | #6 |
Someone else also had problems with this so herte is the solution: To enter the id you need the function Advanced - JASS Code (which is at the bottom), there you can enter 'idid' as the item id. Then the percentage value is not really a percentage value. It's more the chance in relation the the whole sum of chances. Fex. if you have 1 item with a chance of 1 it will always be dropped. if you have 1 item with a chance of 1 and a second item with a chance of 4 then the second one will be chosen in 4 out of 5 cases. |
