Make an imagebutton disappear

MisterMaya

Member
Game Developer
Apr 25, 2021
379
1,794
Hey, I'm stuck (once again jeez) with my imagebutton.

I use them to travel through different rooms.
But when I go from room A to room B, I only want to display the room B image buttons in order to travel to rooms C and D.
And yet, I still see the image button from Room A and there is now way i Hide them i've tried so many things, can you help me pls ?

Code:
screen locations:


    imagebutton:
        xpos 850
        ypos 180
        idle "MAPSelect.png"
        at custom_zoom
        action Hide("locations") and Show("home_lobby")




screen home_lobby:
    imagebutton:
        xpos 70
        ypos 180
        idle "MAPSelect.png"
        at custom_zoom
        action Show("valentine_room")

    imagebutton:
        xpos 930
        ypos 140
        idle "MAPSelect.png"
        at custom_zoom

    imagebutton:
        xpos 830
        ypos 80
        idle "MAPSelect.png"
        at custom_zoom



screen valentine_room:
    imagebutton:
        xpos 200
        ypos 180
        idle "MAPSelect.png"
        at custom_zoom


transform custom_zoom:
    zoom 0.1


label start:
    scene map
    show boxtime:
        xpos 10
        ypos -80
        zoom .32
    "On va ou"
    call screen locations
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
10,384
15,294
Hey, I'm stuck (once again jeez) with my imagebutton.

I use them to travel through different rooms.
But when I go from room A to room B, I only want to display the room B image buttons in order to travel to rooms C and D.
Look at my answer in your "Is there a way to create a shortcut command ?" thread, it should help you understand how it can be done.

This being said (again) :
Code:
screen locations:

[...]

        action Hide("locations") and Show("home_lobby")
This is not how you chain actions. You should write it like this action [ Hide("locations"), Show("home_lobby") ].
 
  • Like
Reactions: MisterMaya