Item=Variable

Discussion in 'RPG Maker VX Ace' started by CallMeKerrigan, Mar 8, 2017.

Thread Status:
Not open for further replies.
  1. CallMeKerrigan

    CallMeKerrigan Veteran Veteran

    Messages:
    217
    Likes Received:
    160
    Location:
    Utah
    First Language:
    English
    Primarily Uses:
    RMMV
    I want to create a common event on parallel process that keeps an item in the player's inventory always equal to a variable.

    For example, if I was using Items to represent the player's health I would have a common event on parallel process and the event would be

    Item ID 3 (Player's Health)= Variable 3 (which is set up to equal the amount of HP for Actor 1)

    I can set Items to increase by a variable, but how do I keep it consistent with the variable? So if the character were to lose 3 health, they would also lose the three items?
     
    #1
  2. dsiver144

    dsiver144 Nhat Nguyen Veteran

    Messages:
    208
    Likes Received:
    606
    Location:
    Vietnam
    First Language:
    Vietnamese
    Primarily Uses:
    RMVXA
    I made a small script for you. Grab it here: Pastebin
    Script call:
    PHP:
    set_item_var(item_id,var_id)
    Hope it would help you solve your problem.
     
    #2
    CallMeKerrigan likes this.
  3. CallMeKerrigan

    CallMeKerrigan Veteran Veteran

    Messages:
    217
    Likes Received:
    160
    Location:
    Utah
    First Language:
    English
    Primarily Uses:
    RMMV
    Thank you! It works. :)
     
    #3
  4. dsiver144

    dsiver144 Nhat Nguyen Veteran

    Messages:
    208
    Likes Received:
    606
    Location:
    Vietnam
    First Language:
    Vietnamese
    Primarily Uses:
    RMVXA
    Yea, glad to hear that! :kaohi:
     
    #4
    CallMeKerrigan likes this.
  5. Skurge

    Skurge " (GASP) What's going on!? " Veteran

    Messages:
    995
    Likes Received:
    193
    Location:
    Australia
    First Language:
    English
    Primarily Uses:
    N/A
    ( I apologise to the staff, I have accidentally posted this in the wrong tab on my web browser )
     
    Last edited: Jun 14, 2018
    #5
  6. slimmmeiske2

    slimmmeiske2 Little Red Riding Hood Moderator

    Messages:
    4,672
    Likes Received:
    3,791
    Location:
    Belgium
    First Language:
    Dutch
    Primarily Uses:
    RMXP

    Skurge, please refrain from necro-posting in a thread. Necro-posting is posting in a thread that has not had posting activity in over 30 days. You can review our forum rules here. Thank you.



    Also, don't hijack other people threads. I'm closing this now, as the OP's problem was solved last year.

     
    #6
Thread Status:
Not open for further replies.

Share This Page