Equipping items question.

Discussion in 'Javascript/Plugin Support' started by silent_drew, Sep 9, 2017.

  1. silent_drew

    silent_drew Veteran Veteran

    Messages:
    38
    Likes Received:
    1
    First Language:
    English
    Primarily Uses:
    RMMV
    I'm trying to alter the equipping code so that the player can't equip an item if doing so would reduce a particular stat below 0. I thougt I would add a line to the canEquip function in rpg_objects, so that it would return false if the item would (you get the idea),

    anyway that resulted in being unable to equip items that would reduce the stat to a point where equipping a second copy of the item would reduce it below zero.
    ie you have 7 in a stat, and the item has a -4 bonus, you would be unable to equip it.

    Not sure why, I think it might be automatically unequipping items.

    any ideas?
     
    #1
  2. Silenity

    Silenity Veteran Veteran

    Messages:
    647
    Likes Received:
    239
    Location:
    Oregon
    First Language:
    English
    Primarily Uses:
    RMMV
    I don't think you can even go below 0 in a parameter can you?
     
    #2
  3. silent_drew

    silent_drew Veteran Veteran

    Messages:
    38
    Likes Received:
    1
    First Language:
    English
    Primarily Uses:
    RMMV
    1) you can with plugins:

    2) that has nothing to do with the question, as (actor.param(n) + item.params[n]) is still the addition of 2 integers and follows all the relevant math rules, regardless of what the engine says is the minimum value for the parameters.
     
    #3

Share This Page