Cursor Screen Animation won't work during Timer Screen

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
Message
Author
User avatar
Sleepy
Regular
Posts: 136
Joined: Wed Nov 27, 2013 6:12 pm
Projects: Camera Anima
Organization: EXP-resso Mutt
Tumblr: sleepy-does-games.tumblr.com
itch: https://expressomutt
Contact:

Cursor Screen Animation won't work during Timer Screen

#1 Post by Sleepy »

I've been experimenting with some sneak sequences but I've hit a particular snag. To interact with objects, we use a cursor wheel, which includes a small animation that transitions from a small circle to the full wheel (seen here: https://www.youtube.com/watch?v=Gm9Kzm2 ... e=youtu.be). The code generally looks like:


screen houghton_secondhall_a:
on "hide" action Hide("displayTextScreen")

####Closet Door Cursor

mousearea:
area (663,204,126,151)
hovered Show("houghton_cursor_closetdoor", transition=dissolve)
unhovered [Hide("houghton_cursor_closetdoor", transition=dissolve), Hide("houghton_cursor_hover_closetdoor", transition=dissolve)]

# Hallway A Cursors

screen houghton_cursor_closetdoor:
imagebutton auto "cursor/base_circle_%s.png" action NullAction() hovered [Show("houghton_cursor_hover_closetdoor"), Hide("houghton_cursor_closetdoor")] xpos 732 ypos 276 at cursor_hide

screen houghton_cursor_hover_closetdoor:
frame at cursor_wheel_dissolve:
xpadding 0
ypadding 0
background None
xysize (230,130)
xpos 732 ypos 276
imagebutton idle "cursor/background_mask.png" hover "cursor/background_mask.png" action NullAction() unhovered [Hide('houghton_cursor_hover_closetdoor'), Show("houghton_cursor_closetdoor")]
grid 2 2 xalign 0.5 yalign 0.5:
imagebutton auto "cursor/topleft_empty_%s.png" action NullAction()
imagebutton auto "cursor/topright_empty_%s.png" action NullAction()
imagebutton auto "cursor/bottomleft_move_%s.png" action [hide_houghtoninteriorsecondhalla_screens, Jump("houghton_int_closet")]
imagebutton auto "cursor/bottomright_empty_%s.png" action NullAction()



However, during the timer screen, while we can get the mousearea to show the first cursor code (i.e: screen houghton_cursor_closetdoor), it won't transition to the cursor wheel until the timer screen clears. This prevents the player from being able to choose an action during the timer.

While I have been able to find a get around by instead telling the mousearea to show/hide houghton_int_annetteoffice_cursor_hover_desk instead of the cursor animation, it's not ideal - since it would mean we'd have to consider scrapping the animation altogether for consistency. It's not game breaker but it'd be a shame since the cursor animation helps add polish. Currently, the "fail" version looks like:


screen office_timer_hide:

if office_timer_start:
timer 0.01 repeat True action If(time > 0, true=SetVariable('time', time - 0.01), false=[Hide('countdown'), Jump(timer_jump)])
bar value time range timer_range xalign 0.5 yalign 0.9 xmaximum 300 at alpha_dissolve # This is the timer bar.

if not h_int_office1_hidden:
mousearea:
area (310, 355, 250, 230)
hovered Show("houghton_int_annetteoffice_cursor_desk", transition=dissolve)
unhovered [Hide("houghton_int_annetteoffice_cursor_desk", transition=dissolve),Hide("houghton_int_annetteoffice_cursor_hover_desk", transition=dissolve)]

screen houghton_int_annetteoffice_cursor_desk:
imagebutton auto "cursor/base_circle_%s.png" action NullAction() hovered [Show("houghton_int_annetteoffice_cursor_hover_desk"), Hide("houghton_int_annetteoffice_cursor_desk")] xpos 398 ypos 410 at cursor_hide

screen houghton_int_annetteoffice_cursor_hover_desk:
zorder 100
frame at cursor_wheel_dissolve:
xpadding 0
ypadding 0
background None
xysize (230,130)
xpos 398 ypos 410
imagebutton idle "cursor/background_mask.png" hover "cursor/background_mask.png" action NullAction() unhovered [Hide('houghton_int_annetteoffice_cursor_hover_desk'), Show("houghton_int_annetteoffice_cursor_desk")]
grid 2 2 xalign 0.5 yalign 0.5:
imagebutton auto "cursor/topleft_empty_%s.png" action NullAction()
imagebutton auto "cursor/topright_interact_%s.png" action [hide_houghtoninterioroffice_screens, Jump('gameplay_timer_hide_2')]
imagebutton auto "cursor/bottomleft_empty_%s.png" action NullAction()
imagebutton auto "cursor/bottomright_empty_%s.png" action NullAction()


Anyone have any ideas of what might fix it? Or is pragmatic cut the best option?
W.I.P.

Image

Complete

Image Image

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Semrush [Bot]