Decorate Inventory Check Functions

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: Decorate Inventory Check Functions

Re: Decorate Inventory Check Functions

by cypherphage » Sat Sep 03, 2011 9:20 pm

I still wish I could just pass the item name in decorate, but this works pretty well and a lot better than the way i was doing it. Thanks.

Re: Decorate Inventory Check Functions

by NeuralStunner » Fri Sep 02, 2011 10:39 am

Should work in any function where a number is called for.

Re: Decorate Inventory Check Functions

by Ryan Cordell » Fri Sep 02, 2011 6:43 am

Or you could use ACS_ExecuteWithResult in the damage function. Works for some functions, dunno about A_StaffAttack in particular.

Decorate Inventory Check Functions

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.

Top