Search found 93 matches
- Wed Mar 30, 2016 12:05 pm
- Forum: Ren'Py Questions and Announcements
- Topic: Rollback problem with money system
- Replies: 5
- Views: 391
Re: Rollback problem with money system
Yes! It fixed it, thanks a bunch both of you
- Wed Mar 30, 2016 11:52 am
- Forum: Ren'Py Questions and Announcements
- Topic: Rollback problem with money system
- Replies: 5
- Views: 391
Re: Rollback problem with money system
I defined it like this: class Inventory (NoRollback) : def __init__(self, money = 999999): self.money = money def spend(self, price): self.money -= price And you see, there I added "(NoRollback)" as instructed on Renpy documentation. Below I defined a method to "$ inventory.spend(pric...
- Wed Mar 30, 2016 11:12 am
- Forum: Ren'Py Questions and Announcements
- Topic: Rollback problem with money system
- Replies: 5
- Views: 391
Rollback problem with money system
Hi there, My problem is, When I give or take money from player with $ inventory.money -= 10000 it works fine, but what if player wants to rollback to a previous line of text, and that statement happens again, constantly taking more money. Same thing with getting money. Someone could easily exploit t...
- Sun Dec 20, 2015 12:46 pm
- Forum: Ren'Py Questions and Announcements
- Topic: Calling custom python function
- Replies: 12
- Views: 6572
Re: Calling custom python function
Yeah, this gave me a pretty good idea.. Thanks once again, I'll try this right away.
By the way, why shouldn't I have variable Karta? Could you explain?
By the way, why shouldn't I have variable Karta? Could you explain?
- Sun Dec 20, 2015 12:27 pm
- Forum: Ren'Py Questions and Announcements
- Topic: Calling custom python function
- Replies: 12
- Views: 6572
Re: Calling custom python function
What you said in edit is true, but I'm not sure how to do it.
But, if bot deosn't have stronger card than player, the he needs to check for a card with minimal points (.punti in script).
But, if bot deosn't have stronger card than player, the he needs to check for a card with minimal points (.punti in script).
- Sun Dec 20, 2015 12:12 pm
- Forum: Ren'Py Questions and Announcements
- Topic: Calling custom python function
- Replies: 12
- Views: 6572
Re: Calling custom python function
Oh, didn't know Stol[0] without parenthesis can work, I'll definately use it.
If I use "break", will I get the variable for bot_played?
If I use "break", will I get the variable for bot_played?
- Sun Dec 20, 2015 11:59 am
- Forum: Ren'Py Questions and Announcements
- Topic: Calling custom python function
- Replies: 12
- Views: 6572
Re: Calling custom python function
Hey, xela, do you mind if I ask you one more thingy? def check_card (power, points, Karta): if power > (Stol[0]).pwr: return Karta else: if points < (Stol[0]).punti: return Karta def bot_played_assign(): if (Bot_hand[0]).punti > (Bot_hand[1]).punti and (Bot_hand[2]).punti: bot_played = Bot_hand[0] e...
- Sat Dec 19, 2015 12:37 pm
- Forum: Ren'Py Questions and Announcements
- Topic: Calling custom python function
- Replies: 12
- Views: 6572
Re: Calling custom python function
Thanks xela, you're always a big help.
- Sat Dec 19, 2015 11:58 am
- Forum: Ren'Py Questions and Announcements
- Topic: Calling custom python function
- Replies: 12
- Views: 6572
Calling custom python function
Hello there, I looked in the documentation and I can't find this issue. Maybe I'm just looking at the wrong place, but I'll ask you guys if you can help me or direct me to more useful links. Basically, I defined a function in python: python: def next_turn(): if player_kupi == True: player_kupi = Fal...
- Sun Nov 29, 2015 1:01 pm
- Forum: Ren'Py Questions and Announcements
- Topic: Function arguments
- Replies: 12
- Views: 938
Re: Function arguments
Thanks a bunch, both of you.
- Sun Nov 29, 2015 12:59 pm
- Forum: Ren'Py Questions and Announcements
- Topic: Function arguments
- Replies: 12
- Views: 938
Re: Function arguments
I know they do, and I'm trying to understand other people's codes, don't worry, still learning from everything I can get.
Oh, yeah I get it now, didn't even think that way. Thanks
Oh, yeah I get it now, didn't even think that way. Thanks
- Sun Nov 29, 2015 12:52 pm
- Forum: Ren'Py Questions and Announcements
- Topic: Function arguments
- Replies: 12
- Views: 938
Re: Function arguments
Then, it says that I'm using a local variable before assignment..
- Sun Nov 29, 2015 12:45 pm
- Forum: Ren'Py Questions and Announcements
- Topic: Function arguments
- Replies: 12
- Views: 938
Re: Function arguments
Anyway, I got your point and instead of making a method as before, I used: def clean_list (self): self.equipped_shirt = [] But, now it doesn't add another after that. Could you tell me how would you remove everything from the list, and add just one thing with a single imagebutton. Both of the things...
- Sun Nov 29, 2015 12:39 pm
- Forum: Ren'Py Questions and Announcements
- Topic: Function arguments
- Replies: 12
- Views: 938
Re: Function arguments
Actually there is a reason.. For someone that started coding not long ago, and is doing his project just to practice, it's not so easy to know every possible way things work. I'm trying to come up with my own ways how to make something work, instead of copying other people's code. So, it does look m...
- Sun Nov 29, 2015 12:09 pm
- Forum: Ren'Py Questions and Announcements
- Topic: Function arguments
- Replies: 12
- Views: 938
Re: Function arguments
I call it with the imagebutton I ask you two before. :D imagebutton idle pic hover h_pic xpos a ypos b action inventory.remove_shirt, AddToSet(equip_shirt, Shirt) AddToSet, what xela said before works perfectly, but I can't remove all of the items before adding another. So, I defined a function to r...