| 02-20-2005, 07:25 PM | #1 |
Well I've constructed some heroes, similar to the adored game TGS. They're built up like so: 5 standard moves: Attack, Move, Stop, Patrol, Hold Guard. 1 start-skill (non upgradeable): Dependant on character. 6 additional skills you can buy (like in TGS). Now here's my problem. How do I make that boarder, so that ONLY 6 different skills can be bought. |
| 02-20-2005, 08:39 PM | #2 |
Guest | Create an integer variable array (with array numbers for players) with starting value 6 Set it so everytime an ability is bought it goes down by 1 And then that if it is equal to 0 users can't buy skills If you don't know how to trigger this tell me and I'll post a GUI code |
| 02-21-2005, 04:26 AM | #3 |
As an aside, in the future, you'd do well not to use maps as the description of what you want, as many of us wont know you're referring to. |
| 02-21-2005, 06:59 AM | #4 |
Okay, thank you guys. I don't know how to trigger this, so I'll write to BadFurDays ^_^ If anyone else wants to know, then contact me. |
| 02-21-2005, 08:26 AM | #5 |
Guest | First, create an integer array called "skills", with an array as long as there are players, and its initial value to 7 Now do this trigger: Events: An item is buyed Conditions: Item type of item equal to (one ability item) OR Item type of item equal to (another ability item) OR..... etc. Actions: Set skills[player number of owner of (i don't know if there is a "buying unit") triggering unit] equal to skills[player number of owner of triggering unit] - 1 IF skills[player number of owner of triggering unit] is superior to 0, THEN do nothing, ELSE (use the AND action for this) set gold of (owner of triggering unit) equal to gold of (owner of triggering unit) - price of (last bought item) AND remove (last created item) from the game |
| 02-21-2005, 10:05 AM | #6 |
I found out of that myself. But the problem is to separate the items. One thing is to buy the abilities (level 1) another is to level them (level 2-10). You see the problem? If I take one "skill" away each time they buy an ability, then they'll only be able to have 6 ability points, for instance Evasion - Level 6, or Evasion - Level 3 and Trueshot Aura - Level 3, or Evasion - Level 1 and Trueshot Aura - Level 5, etc. I want them to be able to buy 6 different skills and level them as much as they want (lvl 10 is max though, but I got that covered And do I have to make a Variable for each player or does it figure that out on its own? |
| 02-21-2005, 10:11 AM | #7 |
Guest | Just control the buying of level 1 abilities, and put a "requirement" to buy later level abilities in the object editor Also what do you mean "make a variable for each player"? Just do an array of variables (if you don't know, when making a new variable, check the "array" box) |
| 02-21-2005, 12:23 PM | #8 |
I think I got it now. Thank you. I'll PM you or write here if any problems occur here. But I can't test my map atm cuz my war3 needs to be reinstalled and I can't find my TFT CD. |
