Check if party a party slot has an actor in it or not?

Discussion in 'Javascript/Plugin Support' started by DRG, Jul 15, 2019.

  1. DRG

    DRG Orange juice lover Veteran

    Messages:
    65
    Likes Received:
    27
    Location:
    place
    First Language:
    english
    Primarily Uses:
    RMMV
    Hello!
    I'm using SRDudes Hudmaker and i want to make it so that parts of the hud will not be visible if a party slot has an actor in it. I know how to make it happen, I just don't know the javascript code/condition that i need to input in there.

    Thanks for helping!
    (also sorry if this isn't the right place for this)

    EDIT: I found out how to do it! thanks for the help!
     
    Last edited: Jul 15, 2019
    #1
  2. Engr. Adiktuzmiko

    Engr. Adiktuzmiko Chemical Engineer, Game Developer, Using BlinkBoy' Veteran

    Messages:
    14,456
    Likes Received:
    2,844
    Location:
    Philippines
    First Language:
    Tagalog
    try

    Code:
    $gameParty.members()[slot ID] == null;
    
     
    #2
    Wavelength likes this.
  3. DRG

    DRG Orange juice lover Veteran

    Messages:
    65
    Likes Received:
    27
    Location:
    place
    First Language:
    english
    Primarily Uses:
    RMMV
    @Engr. Adiktuzmiko
    this doesn't seem to work, instead of making parts of the HUD dissapear when an actor isn't in a slot, it just always makes the parts of HUD dissapear. (it also did this when i added ".actorId()" after the "[X]" (x represents the Id)
    thanks for trying! it means a lot.

    EDIT:
    @Engr. Adiktuzmiko
    Hey! I actually found out how to do it!
    apperently Hud maker already adds the "== null;" at the end, it just doesn't show you.
    sorry!
     
    Last edited by a moderator: Jul 15, 2019
    #3
    Engr. Adiktuzmiko likes this.
  4. Wavelength

    Wavelength Pre-Merge Boot Moderator

    Messages:
    4,054
    Likes Received:
    3,385
    Location:
    Florida, USA
    First Language:
    English
    Primarily Uses:
    RMVXA
    @DRG Glad you found the solution to the issue you were having! When possible, please edit your existing posts instead of "Double Posting" a few minutes later (posting multiple times in a row, without other people posting in the meantime, within 72 hours, is against forum guidelines). I've merged your posts together this time. Feel free to re-edit it as you see fit.
     
    #4
  5. Shaz

    Shaz Veteran Veteran

    Messages:
    37,304
    Likes Received:
    11,118
    Location:
    Australia
    First Language:
    English
    Primarily Uses:
    RMMV
    You could just use party size. If party size > 2, then slots 0, 1 and 2 will be filled. Unless you're using some party manager that lets you force people into specific slots that leave others blank in between.
     
    #5

Share This Page