[solved]textbutton question

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
rayminator
Miko-Class Veteran
Posts: 793
Joined: Fri Feb 09, 2018 12:05 am
Location: Canada
Contact:

[solved]textbutton question

#1 Post by rayminator »

What I want to know how have a textbutton when you press it, it says you have activated it

I have tried it this way it shows below it

Code: Select all

textbutton _("Health Certificate") action SetVariable("healthcer", True)
text "You have activated this cheat just go visit Anna And the Store Clerk"
I have tried it this way it comes up as an error

Code: Select all

textbutton _("Health Certificate") action SetVariable("healthcer", True)
 "You have activated this cheat just go visit Anna And the Store Clerk"
Last edited by rayminator on Thu Dec 12, 2019 1:03 pm, edited 1 time in total.

User avatar
isobellesophia
Miko-Class Veteran
Posts: 979
Joined: Mon Jan 07, 2019 2:55 am
Completed: None
Projects: Maddox and Friends! (AI Teacher friend), Friendly Universities! (Soon)
Organization: Friendly Teachers series
Deviantart: SophBelle
itch: Child Creation
Location: Philippines, Mindanao
Contact:

Re: textbutton question

#2 Post by isobellesophia »

I bet you had to try notify.. instead..?

Code: Select all

$ renpy.notify("Some text")
Or..

Code: Select all

textbutton _("Health Certificate") action (SetVariable("healthcer", True), Jump('activated'))
And the label when telling you that you activated it.

Code: Select all

label activated:
$ renpy.notify("Activated.")
###or simply a text
text "Activated."
I am a friendly user, please respect and have a good day.


Image

Image


User avatar
Angelo Seraphim
Regular
Posts: 36
Joined: Tue May 21, 2019 8:00 am
Completed: Enamored Risks (NaNoReNo 2020)
Projects: 616 Charagma
Organization: GLSUoA
Deviantart: glsuoa
itch: glsuoa
Location: London, UK
Discord: Angel Seraph#9599
Contact:

Re: textbutton question

#3 Post by Angelo Seraphim »

There's also the Notify() screen action.
So:

Code: Select all

textbutton _("Health Certificate") action [ (SetVariable( "healthcer", True ), Notify( "Activated" )) ]
... will display the notification when the button is clicked.
Image

rayminator
Miko-Class Veteran
Posts: 793
Joined: Fri Feb 09, 2018 12:05 am
Location: Canada
Contact:

Re: textbutton question

#4 Post by rayminator »

isobellesophia wrote: Thu Dec 12, 2019 12:30 pm I bet you had to try notify.. instead..?

Code: Select all

$ renpy.notify("Some text")
Or..

Code: Select all

textbutton _("Health Certificate") action (SetVariable("healthcer", True), Jump('activated'))
And the label when telling you that you activated it.

Code: Select all

label activated:
$ renpy.notify("Activated.")
###or simply a text
text "Activated."
Thanks for the help and need something else
Angelo Seraphim wrote: Thu Dec 12, 2019 12:48 pm There's also the Notify() screen action.
So:

Code: Select all

textbutton _("Health Certificate") action [ (SetVariable( "healthcer", True ), Notify( "Activated" )) ]
... will display the notification when the button is clicked.
thanks for the help it just what I'm looking for

Post Reply

Who is online

Users browsing this forum: No registered users