| 03-30-2007, 04:20 PM | #1 |
I need an very simple equipement system that involve only weapons. for example i need a paladin can wear only hammer type weapon and once at a time,A blademaster only katana type weapon and once at a time.A ranger only bow etc... So if anyone can make me a system or teach me how to do it in GUI if it's leak free or in JASS if it's the most optimized? |
| 03-30-2007, 05:37 PM | #2 |
I think question like this has been asked many times before.. Use the search button. - Im sure you find something usefull. Im also nearly sure you can find something in the tutorial section. |
| 03-30-2007, 07:39 PM | #3 |
Jusr use if unit has specific item or if unit has specific item for every possibility of You could also do a substring of the item name (if possible) and if the word, lets say (Hammer) is within Length of item's name minus 8, and length of items name. This wil check if the last 8 letters are (Hammer) and if so do shit. |
| 03-30-2007, 07:47 PM | #4 | |
Quote:
|
| 03-30-2007, 09:06 PM | #5 |
an easy system would be, set all items to 1 type, e.g. permanent, detect the usage, give the bonus, attach the weapon and set a boolean = true which you check before you give the bonus and the effect. To unequip it you need some kind of inventory system or store the weapon into a variable and remove the bonus when the weapon is unequiped. |
| 03-30-2007, 09:54 PM | #6 |
Read more carefully.I don't only want a hero can wear 1 weapon at a time.I want him he can wear only ono type of weapon.A paladin cannot equip sword or bow but only hammer. If there is a relatively simple and optimized way to do this or if it's too complicated to do in trigger just tell me |
| 03-30-2007, 10:00 PM | #7 |
Way I'd do it would be a table where you can look up each item ID and see if it has a special type (add this via an init trig) and then if it does, check if there is an item of that type already present. |
