how i block the click? and how can i make to appear...

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
xxxyuujixxx2
Newbie
Posts: 13
Joined: Sat Jan 08, 2011 6:19 pm
Projects: BA
Contact:

how i block the click? and how can i make to appear...

#1 Post by xxxyuujixxx2 »

O~O many times i don't want that the click or the ctrl, cut or jump a scene. how can i block these buttons? o what can i do?

and other thing, how can i put a new button in the main menu, after that the first game over?
i mean, lets say that i play the game, i finish the game and then after we finished when we return to the main menu appear a new button (i don't want a gallery) and that button can unlock a new history or something like that.

please help n~n sorry if i bother you with my questions u.u
but i guess that this forum is for that no? for ask n~n

Black_Saber
Regular
Posts: 74
Joined: Wed Jul 14, 2010 4:56 am
Completed: cafe minigame
Projects: Beach Restaurant
Location: Indonesia
Contact:

Re: how i block the click? and how can i make to appear...

#2 Post by Black_Saber »

maybe this will help? I found this topic while researching renpy for my project, dunno if it'll actually help you, since I still learning myself.

blocking the click (http://lemmasoft.renai.us/forums/viewto ... able+mouse and http://lemmasoft.renai.us/forums/viewto ... f=8&t=5940)

adding new button for achievement (http://lemmasoft.renai.us/forums/viewto ... f=8&t=7580 and http://lemmasoft.renai.us/forums/viewto ... f=8&t=5341)
"*cackle*cackle*! In short, it's all about cleverly using the gaps between jobs to play. If it goes too far, it can turn to laziness. However, people only become mature when they learn to balance work with pleasure. Simply put, if all you care about is work all the time, you're not fully mature." - Gaap (Umineko no Naku Koro ni)

xxxyuujixxx2
Newbie
Posts: 13
Joined: Sat Jan 08, 2011 6:19 pm
Projects: BA
Contact:

Re: how i block the click? and how can i make to appear...

#3 Post by xxxyuujixxx2 »

Black_Saber wrote:maybe this will help? I found this topic while researching renpy for my project, dunno if it'll actually help you, since I still learning myself.

blocking the click (http://lemmasoft.renai.us/forums/viewto ... able+mouse and http://lemmasoft.renai.us/forums/viewto ... f=8&t=5940)

adding new button for achievement (http://lemmasoft.renai.us/forums/viewto ... f=8&t=7580 and http://lemmasoft.renai.us/forums/viewto ... f=8&t=5341)
thank you very much you save me Owo

by the way, do you know how to block the keyboard?
i don´t find that in any topic

Black_Saber
Regular
Posts: 74
Joined: Wed Jul 14, 2010 4:56 am
Completed: cafe minigame
Projects: Beach Restaurant
Location: Indonesia
Contact:

Re: how i block the click? and how can i make to appear...

#4 Post by Black_Saber »

xxxyuujixxx2 wrote: thank you very much you save me Owo

by the way, do you know how to block the keyboard?
i don´t find that in any topic
from what Pytom's answer,
Pytom wrote:There isn't an easy way to do this without hacking Ren'Py's source code. (You might be able to come close by editing config.keymap, however.)
But you can try this(maybe?) :http://lemmasoft.renai.us/forums/viewto ... 55&start=0

or you can map all of them using this kind of code :

Code: Select all

 python hide:
         def overlay():
             ui.keymap(K_LEFT=renpy.curried_call_in_new_context("left"))

         config.overlay_functions.append(overlay)
         def overlay():
             ui.keymap(K_SPACE=renpy.curried_call_in_new_context("space"))

         config.overlay_functions.append(overlay)
         def overlay():
             ui.keymap(K_RIGHT=renpy.curried_call_in_new_context("right"))

         config.overlay_functions.append(overlay)
Note : You can figure out the rest with http://www.pygame.org/docs/ref/key.html , and No, I don't know if you need to import pygame, so you can try it yourself.

Then, put this in label start :

Code: Select all

label start :
    $ leftpressed = False
    $ rightpressed = False
    ...etc etc
then put the action wherever you wanted to :

Code: Select all

 if leftpressed:
   do something 
 if rightpressed:
   do something
  etc etc
Hope that it helps.
"*cackle*cackle*! In short, it's all about cleverly using the gaps between jobs to play. If it goes too far, it can turn to laziness. However, people only become mature when they learn to balance work with pleasure. Simply put, if all you care about is work all the time, you're not fully mature." - Gaap (Umineko no Naku Koro ni)

Post Reply

Who is online

Users browsing this forum: Bing [Bot]