by cypherphage » Fri Sep 02, 2011 12:30 am
If i wanted to have a weapon deal more damage as a player's "strength" went up, like the strife dagger, I would currently need to implement tons of jumps. So a feature to get the number of items in the player's inventory would be useful. For instance
Code: Select all
Fire:
STFF B 6
STFF C 8 A_StaffAttack(random[StaffAttack](5, 20)+CheckInventory("StrengthItem"), "StaffPuff")
STFF B 8 A_ReFire
Goto Ready
If such a function isn't feasible, the other way I could think of doning it is a function like A_SetUserVar, except checking the amount of inventory instead. Either of these functions seem useful for modular weapons.
If i wanted to have a weapon deal more damage as a player's "strength" went up, like the strife dagger, I would currently need to implement tons of jumps. So a feature to get the number of items in the player's inventory would be useful. For instance
[code]
Fire:
STFF B 6
STFF C 8 A_StaffAttack(random[StaffAttack](5, 20)+CheckInventory("StrengthItem"), "StaffPuff")
STFF B 8 A_ReFire
Goto Ready
[/code]
If such a function isn't feasible, the other way I could think of doning it is a function like A_SetUserVar, except checking the amount of inventory instead. Either of these functions seem useful for modular weapons.