mousearea call screen wont vanish

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
User avatar
Posts: 29
Joined: Wed Sep 16, 2015 6:43 pm
Projects: Origin of War
Organization: VNigma

mousearea call screen wont vanish

#1 Post by Vnigma » Sat Oct 03, 2015 6:42 pm

Hi all , i have this problem dealing with the mousearea screens where i show a screen with a pushbutton and then call the mouse area screen which shows another screen if you hover over the push button, the mouse area screen and the other screen are hidden if i press the pushbutton but the contents of the screen called by the mousearea screen do not vanish infact they are not considered a screen nor an image and it stays on forever, any how i know its a bit complicated so here is the code for the screen calling:

Code: Select all

        show screen Red_skill_discribtion
        call screen Red_skills
        $ result = _return
        hide screen Red_skill_discribtion
and here is the code for the screens:

Code: Select all

screen Axe_spin_discribtion():
   if visible=="true":
    add"skill_bar.png" xalign 0.4 yalign 0.72 
    add"Axe_slash_icon.png" xalign 0.25 yalign 0.7 
    text"{color=#fff}{size=10}Spins your axe dealing physical damage to a\nsingle target." xalign 0.52 yalign 0.65
    text "{color=#454df8}Cost 20" xalign 0.64 yalign 0.725
screen Red_skill_discribtion():
        area (250, 620, 120, 35)
        #hovered Show("Axe_spin_discribtion")
        hovered [Show("Axe_spin_discribtion"), SetVariable("visible", "true")]
        unhovered Hide("Axe_spin_discribtion")
screen Red_skills():

textbutton "Axe Spin" background "empty.png" text_style "battlebutton_text" xalign 0.3 yalign 0.85 action Return("Axe_spin")
pls reply if you can fix or have a similar problem, and ty.

User avatar
Lemma-Class Veteran
Posts: 2417
Joined: Fri Dec 11, 2009 5:25 pm

Re: mousearea call screen wont vanish

#2 Post by Alex » Sun Oct 04, 2015 7:19 am

Try to add an action to hide the "Axe_spin_discribtion" screen when "Red_skill_discribtion" screen is hiding.

Code: Select all

on "hide" action Hide("Axe_spin_discribtion")

Post Reply

Who is online

Users browsing this forum: No registered users