Secondary Interface

  • #1, by steve-jugeFriday, 22. January 2021, 13:18 3 years ago
    Hey guys,

    i need to setup another "interface", kind of a menu, that the player can call by pressing a button. There are 4 categroies inside the displayed interface, 4 buttons. Each of them pressed should show different content in the bigger window next to the buttons. 

    What I did is, I created a secondary Interace, show/hide toggle by pressing "P", made 4 buttons, framed the interface area, created the 4 obejct areas for the buttons. 

    Is that the right way for an "interface" like this? And were can I "link" a content to each of the buttons.  

    Thx a lot in advance


    Newbie

    4 Posts


  • #2, by esmeraldaFriday, 22. January 2021, 16:51 3 years ago
    Setup sounds fine. Buttons are set up as action areas? (and don't forget to link this interface to your player character)
    With content you mean images to show in the bigger window of the interface, I guess.

    You could use animations to show the images or link each image to an additional button.

    Buttons:
    Buttons are mostly like objects. Just add as many buttons as you need images and link them to a value. When leftclicking on one of your 4 buttons you can change the value assigned to your additional buttons that hold the images to activate it. (like: link value "xy" = 1 to additonal button with image 1, execute leftclick on button 1 -> change value "xy" to 1)

    Animation:
    You could create a 5th button and add an animation to that button holding all the images you want to show when clicking on the 4 buttons.
    In the action of each button (Leftclick) you play the animation and force the frame of this animation that should be played with an execute script action.
    ActiveAnimation["name"].AnimationFirstFrame = 1
    ActiveAnimation["name"].AnimationLastFrame = 1

    Or set the animation as default animation of the 5th button, add an empty frame that should be displayed if no button is pressed and force this empty frame when showing the interface. Then you don't need an addtional play animation action in your leftclick action for the 4 buttons, just change the frame with execute script.

    Key Killer

    508 Posts

  • #3, by steve-jugeWednesday, 27. January 2021, 23:21 3 years ago
    THIS helps a lot. Thank you!!!! 

    Newbie

    4 Posts