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.
label classexploration:
$camera_move(0, 0, 0, 0, duration=0.35)
$ change_cursor("1")
hide window
show screen interact1
screen interact1:
if not checked_window:
imagebutton:
focus_mask True
xpos 0 ypos 0
idle "Interact1Window.png"
hover "Interact1Window.png"
action [SetVariable("checked_window", True), Hide("interact1"), Jump("window")]
hovered change_cursor("2")
unhovered change_cursor("1")
label window:
cothink "Why the hell is it {color=#fff200}boarded up{/color}?"
jump classexploration
It seems to not wait for the window to be clicked and keeps jumping from the window label to classroomexploration. I'm not quite sure what's causing this.
Last edited by Braydxne on Wed Sep 20, 2017 8:25 pm, edited 1 time in total.
While we're at it... how would I go about changing the mouse cursor when hovering over the imagebutton? I tried one method I found on the forums but it didn't work...
hovered SetField(config, "mouse", {"default": [(cursor, xoff, yoff)]}) # Where cursor is a path to an image, xoff and yoff offsets to place it correctly.
unhovered SetField(config, "mouse", None)
hovered SetField(config, "mouse", {"default": [(cursor, xoff, yoff)]}) # Where cursor is a path to an image, xoff and yoff offsets to place it correctly.
unhovered SetField(config, "mouse", None)
Thank you so much! That's perfect! ^^ I have one final question concerning the mouse cursor, how would I go about changing it when the menu appears. I only care because if you pause while doing an investigation the cursor remains the big magnifying glass which is interesting to say the least. Thank you again for your help!
Braydxne wrote: ↑Tue Sep 19, 2017 7:03 pm
how would I go about changing it when the menu appears. I only care because if you pause while doing an investigation the cursor remains the big magnifying glass which is interesting to say the least. Thank you again for your help!
Braydxne wrote: ↑Tue Sep 19, 2017 7:03 pm
how would I go about changing it when the menu appears. I only care because if you pause while doing an investigation the cursor remains the big magnifying glass which is interesting to say the least. Thank you again for your help!
Braydxne wrote: ↑Tue Sep 19, 2017 7:03 pm
how would I go about changing it when the menu appears. I only care because if you pause while doing an investigation the cursor remains the big magnifying glass which is interesting to say the least. Thank you again for your help!
Thank you so much! You've been a big help! I'm grateful you took the time to tell me the code.
Although the code doesn't appear to be working when put in screens.rpy. Is there a specific place I should put it? I put it near the top and it didn't work. It doesn't crash or anything it just doesn't change the mouse.