| 12-09-2006, 01:17 AM | #1 |
i havent been using jass for very long, and i want to make a system when a unit casts an ability, it learns another. so i want to have a function "learnskill" which gives an ability based on the ability cast. obviously i could do something like a if/then/else for every single ability that works with this system, but that would be fantastically stupid. how to i attach an ability to another ability? and is there some way to do it using cscache? help me out please, im still learning jass. |
| 12-09-2006, 01:47 AM | #2 |
call SetTableInt(I2S(abilId1),"learnskill",abilId2)
Then retrive it with GetTableInt(I2S(abilId1),"learnskill") |
| 12-09-2006, 02:28 AM | #3 |
JASS:function Trig_item_system_Actions takes nothing returns nothing local string learnskill = NewTable() call SetTableInt(I2S(A006),"learnskill",A004) "expected a name" what am i doing wrong here? |
| 12-09-2006, 03:34 AM | #4 |
Rawcodes have to be enclosed with ', so it would be 'A004', not just A004. The same for A006. |
| 12-09-2006, 02:28 PM | #5 |
thanks a lot. |
