SumRndmDde's HUD Maker: advanced values/conditions?

Discussion in 'Javascript/Plugin Support' started by Damascus7, Aug 16, 2019 at 2:56 PM.

  1. Damascus7

    Damascus7 Villager Member

    Messages:
    26
    Likes Received:
    7
    First Language:
    English
    Primarily Uses:
    RMMV
    I'm currently setting up a custom Battle HUD for my demo with SumRndmDde's HUD Maker, and it's going pretty well, except for a few minor things I have to figure out.

    [​IMG]

    [​IMG]

    First things first: can I set the face picture to currently selected Actor? As in, the actor whose turn it currently is when you're selecting an action. Right now the value for the face picture is just set as $gameParty.members()[0] for the first actor. But I'd like to put in a value for the actor whose turn it is as you're choosing an attack or skill, do you know what call I could use for that value?

    Secondly: can I hide HP bars for enemies in the troop that are hidden? The plugin allows you to put in a condition for the element to appear, as in $gameTroop.members()[3], so the element will only appear when a fourth enemy is present. However, putting in an enemy troop member will make the element appear as long as they are IN the troop, regardless if they are hidden or revealed. As you can see above, there are three mini-slimes that are still hidden, and I'd like to hide their HP bars as well. Is there a call I can put in that will only activate when an enemy is revealed mid-battle?
     
    Last edited: Aug 16, 2019 at 5:07 PM
    #1
  2. ShadowDragon

    ShadowDragon Veteran Veteran

    Messages:
    558
    Likes Received:
    146
    Location:
    Netherlands
    First Language:
    Dutch
    Primarily Uses:
    RMMV
    for the actor part, probably, but need to check, for the bars to be hidden on enemies yes, you can do this with a switch in
    the enemy troop base event page.

    I had it somewhere how to to do that.

    As for the actor, you can try to make a variable in the event page, but idk how to sync it to the battle menu
    so you have something like this:
    Control variabls Actor

    if variable = 0
    (party member 0 call)
    if variable = 1
    (party member 2)
    (for all members)

    but for the enemies it is possible that worked.
     
    #2
  3. Damascus7

    Damascus7 Villager Member

    Messages:
    26
    Likes Received:
    7
    First Language:
    English
    Primarily Uses:
    RMMV
    I did finally manage to find the call for the currently selected actor which is:

    Code:
    BattleManager.actor().actorId()
    I tried using switches for the condition. The way the condition on this plugin seems to work is that if the statement inside is true, then the item will show. I tried just putting in: $gameSwitches.value(21)

    But the plugin is not accepting that as a valid statement, it just gives me ERROR.
     
    #3
  4. ShadowDragon

    ShadowDragon Veteran Veteran

    Messages:
    558
    Likes Received:
    146
    Location:
    Netherlands
    First Language:
    Dutch
    Primarily Uses:
    RMMV
    switches should work, while im using it for the on map hud.

    I need to check in a clean tutorial how it works.
    but have time later this day so in the hope someone else can help you out.
     
    #4
  5. caethyril

    caethyril ^_^ Veteran

    Messages:
    1,038
    Likes Received:
    644
    Location:
    UK
    First Language:
    English
    Primarily Uses:
    RMMV
    The switch thing looks OK to me, too, hopefully ShadowDragon or someone can help there. :kaoswt2:

    For the "ignore hidden enemies" condition, you could try this:
    Code:
    $gameTroop.members()[4] && $gameTroop.members()[4].isAppeared()
    I.e. "if the member exists and is not hidden". Note this should also account for enemies who escape mid-battle. :kaopride:
     
    #5
  6. Damascus7

    Damascus7 Villager Member

    Messages:
    26
    Likes Received:
    7
    First Language:
    English
    Primarily Uses:
    RMMV
    Gave this a try but it's still not working. $gameTroop.members()[4] seems to be a valid condition, but $gameTroop.members()[4].isAppeared() is not.

    EDIT: Actually, never mind, I was misunderstanding what the HUD Maker was telling me. It uses a red color for when the statement is false and for when the statement was invalid, so it turned out it was working the whole time, but it was just telling me that the condition was false at that time. After I refreshed the battle screen the false elements disappeared as they were supposed to.

    Thanks for all your help!
     
    Last edited: Aug 17, 2019 at 3:26 AM
    #6
    caethyril likes this.
  7. ShadowDragon

    ShadowDragon Veteran Veteran

    Messages:
    558
    Likes Received:
    146
    Location:
    Netherlands
    First Language:
    Dutch
    Primarily Uses:
    RMMV
    I was messing around with variables and switches, but couldn't get it to work teh way I wanted, but im happy you find your way through.

    It would be nice if you told the rest how you did it, so they know how to do it if they have something like this.
     
    #7
    Aloe Guvner likes this.
  8. Damascus7

    Damascus7 Villager Member

    Messages:
    26
    Likes Received:
    7
    First Language:
    English
    Primarily Uses:
    RMMV
    For the Actor Face, the value is set to this: This makes the face cycle between whichever actor's turn it is.

    Code:
    BattleManager.actor().actorId()
    For the HP bars, the condition is set to this (replace 4 with whatever the ID of the enemy is). This will make the element only appear after the hidden enemy appears.

    Code:
    $gameTroop.members()[4].isAppeared()
     
    #8
    ShadowDragon and Aloe Guvner like this.
  9. caethyril

    caethyril ^_^ Veteran

    Messages:
    1,038
    Likes Received:
    644
    Location:
    UK
    First Language:
    English
    Primarily Uses:
    RMMV
    Good you found a solution, but just saying, you might want to be careful omitting the existence check I suggested for your isAppeared thing: it'll probably throw a "cannot access value of undefined" error in a troop with less than 4 enemies. :kaoswt:
     
    #9
  10. Damascus7

    Damascus7 Villager Member

    Messages:
    26
    Likes Received:
    7
    First Language:
    English
    Primarily Uses:
    RMMV
    Ah thank you! I totally forgot about that part.
     
    #10
    caethyril likes this.

Share This Page