i don't know why is this don't work

Discussion in 'Javascript/Plugin Support' started by skysilver95, Oct 5, 2018.

  1. skysilver95

    skysilver95 Warper Member

    Messages:
    1
    Likes Received:
    0
    First Language:
    ko
    Primarily Uses:
    RMMV
    (not good eng sorry)

    i'am using yanfly plugins.

    i try use skill notetag but it doesn't work well.

    ----------------------------------------
    <Target Action>
    OPACITY user: 0%, 20
    MOVE user: target, BACK BASE, 50
    wait: 40
    opacity user: 100%, 20
    wait for opacity
    face user: target
    wait: 2
    if $gameSwitches.on(4001)
    action animation
    wait: 4
    action effect
    wait: 5
    MOVE user: target, front base, 5
    wait: 2
    face user: target
    animation 124: target, mirror
    wait: 4
    action effect
    wait: 5
    MOVE user: target, BACK BASE, 5
    wait: 2
    face user: target
    action animation
    wait: 4
    action effect
    wait: 5
    MOVE user: HOME, 5
    death break
    change variable 1 = 0
    change switch 4001: off
    else
    action animation
    wait: 4
    action effect
    wait: 5
    MOVE user: HOME, 5
    death break
    common event: 1
    end
    </Target Action>
    ----------------------------------------

    other text is work very well.
    but

    ----------------------------------------
    if $gameSwitches.on(4001)
    action animation
    .................................
    change switch 4001: off
    ----------------------------------------

    this text does not operate even when the 4001 switch is on.

    i know [if $gameSwitches.on(4001)] this text has some problam.
    yanfly example [if $gameSwitches.value(1)]
    but i don't know how do i fix that text.

    sorry for my bad eng.
    but would be very grateful if someone help me. thx
     
    Last edited: Oct 5, 2018
    #1
  2. mlogan

    mlogan Global Moderators Global Mod

    Messages:
    13,838
    Likes Received:
    7,642
    Location:
    Texas
    First Language:
    English
    Primarily Uses:
    RMMV

    I've moved this thread to Plugin Support. Please be sure to post your threads in the correct forum next time. Thank you.

     
    #2
  3. Muk adel heid

    Muk adel heid Villager Member

    Messages:
    18
    Likes Received:
    23
    First Language:
    Spanish
    Code:
    //To check a switch
    $gameSwitches.value[x] == true
    
    //To set a switch
    $gameSwitches.setValue[x] = true
    
    Replace "x" with the switches ID.

    in this case should be :

    Code:
    if ($gameSwitches.value[4001] == true)
    



     
    #3

Share This Page