| 08-29-2002, 05:36 PM | #1 |
How do i make so that if you have like a strength book and you dont want to click and click and click and click and......... So that the trigger makes that when you have a book it automaticly uses it??? |
| 08-29-2002, 08:18 PM | #2 |
Guest | Event: <Hero> acquires an item Condition: (Item being manipulated) equal to (item carried by <Hero> of type tome of strength) Actions: Wait 0.10 Hero - Order <Hero> to Use Item (Event Response - Item being manipulated) AV |
| 08-30-2002, 12:15 PM | #3 |
That helped but then what if the book is like there are 10 books but only one button of the books..... how do i do so it repeats it all the time..... |
| 08-30-2002, 12:21 PM | #4 |
Guest | it automatically redo |
| 08-30-2002, 02:32 PM | #5 |
i have 10 books and it only uses one when i pick it up.... it is 10 books but in one button and it don't redo.... its a book with 10 in the lower right corner..... I want it to do all of em |
| 08-30-2002, 02:49 PM | #6 |
10 books means you must call the 'use item' action ten times. It's logical, isn't it? Use the 'for' loop and do it 10 times. |
| 08-30-2002, 04:55 PM | #7 |
or you could (this would work for any amount of books, 10 or 1 or whatever) Event: <Hero> acquires an item Condition: (Item being manipulated) equal to (item carried by <Hero> of type tome of strength) Actions: Wait 0.10 set itemrecurse = Event Response - Item being manipulated Hero - Order <Hero> to Use Item (itemrecurse) If (<Hero> has item of type <itemrecurse>) then (run trigger (itemrecurser) ignoring conditions) name: itemrecurser event: none condition: none action: Wait 0.10 Hero - Order <Hero> to Use Item (itemrecurse) If (<Hero> has item of type <itemrecurse>) then (run trigger (itemrecurser) ignoring conditions) this way its run, uses it once, then checks to see if it still has that kinda item. if it does it runs the actions of the second trigger which is the wait and the use item, and then checks again, and if still there than runs that again =) oh and its set to a variable so that the 2nd trigger can use it. only reason this might help is if later on youre balancing or something and change the amount of books, but dont want to change the trigger. otherwise you might as well just use a for loop. edit: oops needed to make one quick change. |
| 08-30-2002, 09:32 PM | #8 | |
Guest | Quote:
Couldn't you change the Actions to: Actions: Wait 0.1 Hero - Order <Hero> to Use Item (item being manipulated) If (<Hero> has item of type <item being manipulated>) then (run this trigger ignoring conditions)[/quote] That way it just runs itself until it's out of items. Right? |
| 08-30-2002, 09:53 PM | #9 |
Guest | ^ That would do. |
| 08-31-2002, 06:57 PM | #10 |
i was thinkin of doin that, but changed it after cuz i wasn't sure if item being manipulated stays in memory or not after the trigger finishes the first time. if it does, then yea, thats good, but I didn't want to risk giving faulty info, and im too lazy to check if it did work, so i gave the long way to do it and it be pretty much guarantee to work |
| 08-31-2002, 08:05 PM | #11 |
Guest | Actually, that's a good point. I hadn't thought of that. Maybe it wouldn't do. :) AV |
| 09-01-2002, 12:19 PM | #12 |
I dont think you have to do it the hard way, as iam reading it now, you want a hero unit, to read an book he buys/picks up, and read it instantly? The one i use, just keeps reading it, even if i buy 10.. dunno how diffrent it is, but it works: Events Unit - A unit owned by player 1 (Red) aquires an Item Unit - A unit owned by player 2 (Red) aquires an Item (you can do this for 12 players if you want, i work with 6, but didnt feel like placing 12 events here ;) ) conditions (item type of (item being manipulated)) Equal to Tome of Agility +2 Actions Wait 0.10 Seconds Hero - Order (Triggering unit) to use (item being manipulated) |
| 09-01-2002, 06:03 PM | #13 |
no you don't understand. not 10 books, but 1 book with 10 charges (which would act as 10 books in 1). like that. with that method of aquire, it'd only use one charge, and you'd be left with a book with 9 charges. get it?? |
| 09-01-2002, 06:42 PM | #14 |
loooooool :) i completly missed the point :P anyway, then the above way, is the way to go i guess. (the one above mine) btw, you could also just add 10 times hero - use item being manipulated with a wait :) dunno if that would work on bnet though.. |
| 09-02-2002, 07:11 PM | #15 |
I finally solwed it..... Thanks everybody.... i had to copy the thing 1000 times as it was 1000 charges.... |
