Announcement

Collapse
No announcement yet.

Variable vs. Variable

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Variable vs. Variable

    Ok for my game i needed to compare varibale like wich is bigger and by how much but thats not included as far as I know. So i made this event. I may be doing it all wrong so just tell me if I am (in the niceiest way posible)

    Val-Condition Branch -> (Sahred Variable 1) = 0 or = 99999
    ___<Option 1 / Start> = 0
    ___Increase Internal Var. (Internal variable 1) + 1
    ___<Option 1 / End>
    ___<Option 1 / Start> = 99999
    ___<Option 1 / End>
    End Branch
    Val-Condition Branch -> (Sahred Variable 2) = 0 or = 99999
    ___<Option 1 / Start> = 0
    ___Increase Internal Var. (Internal variable 1) + 2
    ___<Option 1 / End>
    ___<Option 1 / Start> = 99999
    ___<Option 1 / End>
    End Branch
    Val-Condition Branch -> (Internal Variable 1) = 1 or = 2 or = 3
    ___<Option 1 / Start> = 1

    This is the part were you that you second variable is bigger

    ___Event End
    ___<Option 1 / End>
    ___<Option 1 / Start> = 2

    This is the part were you that you first variable is bigger

    ___Event End
    ___<Option 1 / End>
    ___<Option 1 / Start> = 3

    This were you know that there equal

    ___Event End
    ___<Option 1 / End>
    End Branch
    Decrease Shared Var. -> (Shared Variable 1) - 1
    Decrease Shared Var. -> (Shared Variable 2) - 1
    Increase Shared Var. -> (Shared Variable 3) + 1
    Event Transtion -> New event (an Invs. Event set to touch that you cant touch the only thing in it is an Event Transtion Back to this event)


    Ok this compares Shared Var. 1 with shared Var. 2 you can tell wich one is bigger and wich one is smaller or if there equal. Shared var. 3 will tell you by how much there diffrent(a little usefull for setting your var. back to normal). make sure you set you internal var. 1 back to 0 our you wont be able to the trigger event correctly agian.

    This will only work with number under 9 rpg maker 3 dosen't like when theres a loop for then 10 times sorry I know thats a pain but i'm sure this is a dumb way to do it but it seems to work for me.

    Any questions just post oh and my spelling i'm... *wonders of...*
Working...
X