Where's waldo/Hidden object minigame
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.
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.
-
- Regular
- Posts: 51
- Joined: Tue Jul 17, 2018 10:32 am
- Location: Philippines
- Contact:
Where's waldo/Hidden object minigame
So in my vn I'd like to have a segment similar to the Where's waldo or hidden object game, but in my vn you have to find the right item on the screen. So what I want to happen is there'd be items scattered all over the background. They'll be an imagebutton which you could highlight while hovering over. You have 3 tries. If all of that is spent and you didn't find the right item, you'll jump to the label nothinghappened. If you however find the right item, you'll jump to the label somethinghappened. Also, I want there to be a counter for the number of tries on the screen. Can anyone help me? Thanks.
- Per K Grok
- Miko-Class Veteran
- Posts: 882
- Joined: Fri May 18, 2018 1:02 am
- Completed: the Ghost Pilot, Sea of Lost Ships, Bubbles and the Pterodactyls, Defenders of Adacan Part 1-3, the Phantom Flyer
- itch: per-k-grok
- Location: Sverige
- Contact:
Re: Where's waldo/Hidden object minigame
So, you need a screen, a variable that holds the number of tries, and a couple of imagebuttons for wrong choices itemes and one button for the right option.MisterHarold wrote: ↑Wed Apr 06, 2022 3:56 am So in my vn I'd like to have a segment similar to the Where's waldo or hidden object game, but in my vn you have to find the right item on the screen. So what I want to happen is there'd be items scattered all over the background. They'll be an imagebutton which you could highlight while hovering over. You have 3 tries. If all of that is spent and you didn't find the right item, you'll jump to the label nothinghappened. If you however find the right item, you'll jump to the label somethinghappened. Also, I want there to be a counter for the number of tries on the screen. Can anyone help me? Thanks.
You could do something like this
Code: Select all
screen findwaldo():
default trynumb=0
text str(trynumb) ### renders the number of tries done to the screen
### wrong buttons as many as you want
imagebutton idle "item1i.png" hover "item1h.png" pos(50,50) action If (trynumb==2, true= Jump("nothinghappened"), false=SetScreenVariable("trynumb", trynumb+1))
### correct button
imagebutton idle "item10i.png" hover "item10h.png" pos(200,150) action Jump("somethinghappened")
label start:
show screen findwaldo
$ renpy.pause(hard=True)
label nothinghappened:
hide screen findwaldo
"nothing happened"
label somethinghappened:
hide screen findwaldo
"something happened"
-
- Regular
- Posts: 51
- Joined: Tue Jul 17, 2018 10:32 am
- Location: Philippines
- Contact:
Re: Where's waldo/Hidden object minigame
Thank you! Tried it out and working.
Who is online
Users browsing this forum: No registered users