| 02-04-2004, 09:47 PM | #1 |
I need to know how to implement a key system into my map via triggers / items, it has to follow the rules: -Hero must be carrying key in slot (1-6) -May only carry one key of it's type -Will enable "close/open" "X" text triggers (player types, Close Bar, and the bar is closed, same if he said open) I'm just not sure how to check if they are carrying item. Note the hero nore the item are not pre-place, and cannot be pre-placed. |
| 02-04-2004, 09:51 PM | #2 |
there is a trigger to do all of this, look in WE |
| 02-04-2004, 09:52 PM | #3 |
Isnt there a boolean "Hero Has item of type"? |
| 02-05-2004, 02:11 AM | #4 |
I looked i couldn't do it, i need help, please give me it in this form: Event EXACT TRIGGER LINE Condition EXACT TRIGGER LINE Action EXACT TRIGGER LINE -or- you could guess make a map with it working for one area and ill use it as tut... |
| 02-06-2004, 12:12 AM | #5 |
any1? |
| 02-06-2004, 01:34 AM | #6 |
variables used are Hero[array] = unit Gate = destructable Event- Player 1 types chat message = open bar as exact match Player 2 types chat message = open bar as exact match Player 3 types chat message = open baras exact match Ect Condition - Hero[number of triggering player] has item = item of type Bar Key Action- Destructable - open gate = Gate that should do it |
| 02-06-2004, 01:51 AM | #7 |
...Also, if you already have your other text triggers setup and don't want to give Dark Alucard's method a shot (not trying to out-do you Dark, just giving an alternate suggestion ;)), maybe: Events Unit - A unit enters [Pre-defined Gate Region] Conditions (Item-type of (Item carried by (Triggering unit) in slot 1)) Equal to [Your Key] (Item-type of (Item carried by (Triggering unit) in slot 2)) Equal to [Your Key] (Item-type of (Item carried by (Triggering unit) in slot 3)) Equal to [Your Key] ---------- etc ---------- Actions Trigger - Turn on [Your Text Trigger] Read Alucard's post below mine :P. You need to chain each Condition with an OR (simple enough :)). [edit] Spelling ;p [EDIT 2] Thanks Alucard :). I do most stuff straight in JASS myself, so I couldn't remember if Conditions chained themselves as ORs automatically or not :). |
| 02-06-2004, 01:58 AM | #8 |
that would work DescX but Ox if you do what he said you also need to put the OR(multiple condtions) condition, or the unit would need a full inventory of keys |
| 02-06-2004, 04:23 AM | #9 |
OR open the war chasers and check out their perfect key system |
