| 11-14-2002, 03:09 AM | #1 |
For the RPG i'm making I need to be able to add stats to a heroes current stats. I can't use the Set strength because there's no integer thing that that records a units strength so I can't do a Unit strength + 10. Anyone know a way I could add strength to a unit that doesn't involve makin a bunch of variables recording each time a unit uses a tome? If there isn't a trigger to do this, could someone please make a trigger to do it? Thanks! |
| 11-14-2002, 03:19 AM | #2 |
hmm, the reason u cant ADD stats to a hero i think is because there isnt a way to find out what the heroes stats are, so i think u have to do it with lots of triggers and variables. |
| 11-14-2002, 03:21 AM | #3 |
Ok then, time to make my map really laggy! |
| 11-14-2002, 03:35 AM | #4 |
Guest | Add strength? Why not: Hero - Create item <tome of strength> for [the Hero] Hero - Use Item <tome of strength> You might also need a trigger to make sure the heros inventory isnt full.... sorta like: Hero - Drop Item from hero [the Hero] inventory slot [6] <- ABOVE CODE -> Hero - Give item <last dropped item> to [the Hero] Hope that helps you. |
| 11-14-2002, 04:05 AM | #5 |
That would've been a good way to do it.... but i forgot to mention that I have to lower the stats back to the way they were after a certain amount of time... |
| 11-14-2002, 06:23 AM | #6 |
Could you give them an item in an empty slot that raises the str. by +? and then remove the item after a certain time? |
| 11-14-2002, 07:56 AM | #7 |
Guest | i wonder why they never added that to the editor? it would be very good..... instead you gotta record every time a guy gains a level and such to modify the variables just right, using tomes, or triggers to increase the ammount and record it is also tireing |
| 11-14-2002, 08:41 PM | #8 |
Guest | Ok well on my map i need to have it where i could make a unit be able to 2x his Strength so i made it where when every i get a Strength tomb add 1 lumber. Then when i want to get 2x Strength i used this trigger Hero - Set Strength of "unit" to ((Player 1(Red) Current lumber) X2),(Permanent) Then If i want it to go back to what it was i just do Hero - Set Strength of "unit" to ((Player 1(Red) Current lumber) X1),(Permanent) |
| 11-14-2002, 10:25 PM | #9 |
If you want a item to add strenght and then after some time, remove it, do: Events: Unit owned by player(1-12) adquires item (belt of strenght or any other non permanent + strenght item). Actions: Wait (either a time variable or a predetermined time) Hero - Remove (Hero manipulating item) This way the hero would have the +strenght for some time then he would lose it. |
| 11-14-2002, 11:07 PM | #10 |
Guest | Use the newly enabled AbilityData.slk to create a new tome of which the bonus gets removed after some time, no idea if it`s possible, but is it is use the trigger some gave above. |
| 11-15-2002, 12:21 AM | #11 |
Its doable: First you need interger varibles to store data. Set them equal to the starting (level 1 value) of the hero. I.E. HeroStrn = 15 HeroAgil=9 HeroIntel=21. You will need 1 trigger to add to the data every time the hero levels up. Event: Hero Gains a Level Conditions: None Actions: If (Triggering Unit = HeroType) Then Run Trigger (Whatever) Trigger-Whatever: Set HeroStrn = HeroStrn+(how much he gains per lvl) And so on.... If more than 1 hero, just change the HeroType to the next type of hero and just keep copying and pasting until you have all your heros. Dotn forget you can use arrays to lower the number of varibles. Now what about tomes, this will throw off the numbers. No problem, see my post here: http://wc3campaigns.com/forums/showt...&threadid=6287 Now for the +Stats for time span and returning to the normal ammount. You need GoldenUrg's trigger patch (can be found on the download section of this website). Install it following the instructions in the readme.txt Here is the code we need: Event: Whatever triggers this + stat event Conditions: WHatever you want it to be Actions: GoldenUrg's Trigger patch has: SetHeroStrn(). Fill in the blanks. Use permenent not temporary. And for the Value, use HeroStrn + 10 or whatever the number you want it to be. Do the same with Intel or Agil if needed (seperate triggers if needed). Have a wait command Then repeat the first action. SetHeroStrn() but use HeroStrn. And it will return the hero back to its original strn. |
