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.
johandark
Veteran
Posts: 355 Joined: Sat Apr 30, 2016 11:04 am
Completed: Wild Guards, In Dreams
Projects: Pact with a witch
Deviantart: johandarkweb
Location: Barcelona
Contact:
#1
Post
by johandark » Mon Jul 18, 2016 1:08 pm
Code: Select all
default pf = PointFucker()
default pk = PointKeeper()
init python:
class PointFucker(object):
def __init__(self):
self.dp = 0
def ch_dp(self, num):
self.dp += num
renpy.notify(str(num) + " {color=#6abd45}{size=12}DÍDAC POINTS!!{/size}{/color}")
class PointKeeper(object):
def __init__(self):
self.np = 0
def ch_np(self, num):
self.np += num
if num >= 0:
renpy.notify(str(num) + " {color=#6abd45}{size=12}NEUS POINTS!!{/size}{/color}")
else:
renpy.notify(str(num), color=(200,255,255,80) + " {color=#ed2024}{size=12}NEUS POINTS!!{/size}{/color}")
With this code:
Code: Select all
renpy.notify(str(num) + " {color=#6abd45}{size=12}NEUS POINTS!!{/size}{/color}")
I get this result:
Where "NEUS POINTS!!" is green, but the number is white.
I´ve tried use this:
Code: Select all
renpy.notify(str(num), color=(200,255,255,80) + " {color=#ed2024}{size=12}NEUS POINTS!!{/size}{/color}")
But sadly didn´t work. (It´s not green color nor red, but it was a prove).
What am I doing wrong?
thanks!
Last edited by
johandark on Sat Jul 23, 2016 1:03 pm, edited 1 time in total.
gas
Miko-Class Veteran
Posts: 842 Joined: Mon Jan 26, 2009 7:21 pm
Contact:
#2
Post
by gas » Mon Jul 18, 2016 5:31 pm
The only thing that come to mind is that you're passing a color to the notify system, but notify use the default (white) if you dont put it inside a tag.
Take my words with caution, but experiment.
If you want to debate on a reply I gave to your posts, please QUOTE ME or i'll not be notified about. << now red so probably you'll see it.
10 ? "RENPY"
20 GOTO 10
RUN
korova
Veteran
Posts: 217 Joined: Sat Jun 27, 2009 5:15 pm
Completed: Ivy, Chocolate, Time, Clair Obscur
Projects: Writing exercises, The House [Nano18]
Tumblr: korova08
itch: korova
Location: Normandie, France
Contact:
#3
Post
by korova » Fri Jul 22, 2016 12:03 pm
What about this ?
Code: Select all
renpy.notify("{color=#ed2024}{size=12}[num] NEUS POINTS!!{/size}{/color}")
or
Code: Select all
renpy.notify("{color=#ed2024}{size=12}" + str(num) +" NEUS POINTS!!{/size}{/color}")
(Not home right now, I can't test)
johandark
Veteran
Posts: 355 Joined: Sat Apr 30, 2016 11:04 am
Completed: Wild Guards, In Dreams
Projects: Pact with a witch
Deviantart: johandarkweb
Location: Barcelona
Contact:
#4
Post
by johandark » Sat Jul 23, 2016 1:02 pm
korova wrote: What about this ?
Code: Select all
renpy.notify("{color=#ed2024}{size=12}[num] NEUS POINTS!!{/size}{/color}")
or
Code: Select all
renpy.notify("{color=#ed2024}{size=12}" + str(num) +" NEUS POINTS!!{/size}{/color}")
(Not home right now, I can't test)
The first Code doesn´t work, but the second one works perfectly!
THANKS!!
duck-and-wolf
Regular
Posts: 47 Joined: Thu Aug 29, 2019 6:20 pm
Completed: Head of the Class
Organization: Duck & Wolf
Contact:
#5
Post
by duck-and-wolf » Thu Jun 25, 2020 4:39 pm
This no longer works for me, has something about notifications changed in the intervening years?
Users browsing this forum: Bing [Bot]