Search found 1002 matches
- Mon Aug 11, 2014 3:32 pm
- Forum: Ren'Py Questions and Announcements
- Topic: function... function?
- Replies: 37
- Views: 3369
Re: function... function?
yes I found that line you said and fixed "luklov += 10". I'm experimenting with list using it as array but now I changed from normal variables to list I'm getting all kind of errors: imagebutton xalign 0.5 yalign 0.8 xmaximum 100 ymaximum 100 idle "ui/alpha.png" hover "ui/base.png" focus_mask True a...
- Mon Aug 11, 2014 2:41 pm
- Forum: Ren'Py Questions and Announcements
- Topic: function... function?
- Replies: 37
- Views: 3369
Re: function... function?
def rndmzr(a): #luklov = store.luklov if a > 99: a = 0 luklov += 10 else: b = random.randint(-1, 3) a += b return a and another question: is there any reason why: define luklov = [0,10,10] $ lukhat = luklov[0] * -1 gives me this error? $ lukhat = luklov[0] * -1 TypeError: 'int' object has no attrib...
- Mon Aug 11, 2014 1:37 pm
- Forum: Ren'Py Questions and Announcements
- Topic: function... function?
- Replies: 37
- Views: 3369
Re: function... function?
float! that war the word I was looking for >_< damn when I learn proper English. thanks I'm learning lots about python today. I tried to use another variable in my function but got "UnboundLocalError: local variable 'luklov' referenced before assignment" error and wen I add "luklov = store.luklov" b...
- Mon Aug 11, 2014 12:58 pm
- Forum: Ren'Py Questions and Announcements
- Topic: function... function?
- Replies: 37
- Views: 3369
Re: function... function?
now I got more questions ^_^.
I defined all of my variables like:
define prcnt = 0
is it different from:
$ prcnt = 0
I defined all of my variables like:
define prcnt = 0
is it different from:
$ prcnt = 0
- Mon Aug 11, 2014 12:53 pm
- Forum: Ren'Py Questions and Announcements
- Topic: function... function?
- Replies: 37
- Views: 3369
Re: function... function?
like always xela with full explanation ^_^ thank you. can you help me fix this little problem too please. SetVariable('luklov', luklov + (prcnt/50)) I guess it wont work because (prcnt/50) gives an int and luklov holds a number or something and I don't know how to round an integer in python. thanks ...
- Mon Aug 11, 2014 12:42 pm
- Forum: Ren'Py Questions and Announcements
- Topic: function... function?
- Replies: 37
- Views: 3369
Re: function... function?
thanks Asceai things like this should be included in the doc . ^_^
- Mon Aug 11, 2014 12:03 pm
- Forum: Ren'Py Questions and Announcements
- Topic: function... function?
- Replies: 37
- Views: 3369
Re: function... function?
there is this line "An action may also be a list of actions, in which case the actions in the list are run in order." in action section of doc but there is no example. this can come handy some times. does anyone have any example of this?
- Mon Aug 11, 2014 11:55 am
- Forum: Ren'Py Questions and Announcements
- Topic: function... function?
- Replies: 37
- Views: 3369
Re: function... function?
@xela thanks I know I can always count on you and Asceai to point me at the right direction. I've tried defining a function and it was surprisingly easy. here is what I got so far: timer 0.1 repeat True action rndmzr init python: def rndmzr(): if prcnt> 99: prcnt = 0 else: prcnt += 1 but looks like ...
- Mon Aug 11, 2014 7:24 am
- Forum: Ren'Py Questions and Announcements
- Topic: function... function?
- Replies: 37
- Views: 3369
Re: function... function?
I'm trying to do something like this:
timer 0.1 repeat True action myfunc
function myfunc()
something to do
something to do
something to do
something to do
endfunc
timer 0.1 repeat True action myfunc
function myfunc()
something to do
something to do
something to do
something to do
endfunc
- Mon Aug 11, 2014 2:03 am
- Forum: Ren'Py Questions and Announcements
- Topic: function... function?
- Replies: 37
- Views: 3369
function... function?
I have this line of code: timer 0.1 repeat True action If(prcnt > 99,true=SetVariable('prcnt', 0),false=SetVariable('prcnt', prcnt+1)) and I wonder if there is a way to put my "if" in a label or screen and call it like a function so I can add some random and multiple variables without interrupting t...
- Sun Aug 10, 2014 2:23 am
- Forum: Ren'Py Questions and Announcements
- Topic: pass variables with call
- Replies: 5
- Views: 1023
Re: pass variables with call
thanks for the tip ^_^ the final code is something like this
Code: Select all
label osmsg(msg):
screen osm(msg=""):
text "{size=13}[msg]" xalign 0.5 yalign 0.005
show screen osm(msg)
screen tim:
timer 4 action Hide("osm",transition=dissolve)
show screen tim
return- Sat Aug 09, 2014 10:09 am
- Forum: Ren'Py Questions and Announcements
- Topic: pass variables with call
- Replies: 5
- Views: 1023
Re: pass variables with call
got the problem ^_^ thanks xela
- Sat Aug 09, 2014 9:48 am
- Forum: Ren'Py Questions and Announcements
- Topic: pass variables with call
- Replies: 5
- Views: 1023
Re: pass variables with call
the fact is this label is in a different file and I'm trying to develop a simple messaging system to use in other games as well. I have no experience with python and it's very hard to debug my code for me (blame it on AS3). I tried to pass it to screen and still getting the error: While running game...
- Sat Aug 09, 2014 7:41 am
- Forum: Ren'Py Questions and Announcements
- Topic: pass variables with call
- Replies: 5
- Views: 1023
pass variables with call
It's been a week and I still can't understand the simplest example on the doc section >_> tried to pass my variable to a label with call but got lots of errors no matters how many time I tried to do it different. call osmsg pass(msg = "{color=#f00}you made Luke wait. Luke love -5") label osmsg(msg="...
- Fri Aug 08, 2014 2:56 pm
- Forum: Ren'Py Questions and Announcements
- Topic: animate title in main menu
- Replies: 1
- Views: 403
animate title in main menu
I'm trying to bring my games title in the main menu with some animation while the menu is showing. I can think a way around it by using something like this code before actual menu: show men1 with moveinright show men2 with moveinleft but while I was experimenting on screen_main_menu file I got probl...