- Sep 25, 2019
- 13
- 3
Hi guys, I am trying to create my first renpy game. Everything for me is very new, I don't know much about python or anything expert. Just know some very very basic code on youtube.
So all the code I know is trying to keep it as basic as possible. I have some questions I hope you can teach me.
here my code:
------------------------------------------------
I tried this code, but it didn't work, the game automatically moved to the lower label without counting the if point statement.
and let me ask is there a way to group the numbers in the "if points statement" code? Because every time I use it, I have to write a very long code like that?
I want to use it to count hours of the day, 24 hours. Is there any way for me to group 6-12 hours into a group? 13-18 hours 1 group? for example:
------------------------------------------------
-------------------------------------------------
I tried it but it didn't work
So all the code I know is trying to keep it as basic as possible. I have some questions I hope you can teach me.
here my code:
Code:
init:
$ Power_Points = 0
$ Kungfu_Points = 0
$ Power_Points_Max = 100
$ Kungfu_Points_Max = 100
define Power_Points = 0
define Kungfu_Points = 0
label start:
label fighthim:
scene fight_him
with dissolve
if Power_Points >= 0:
jump lose
elif Kungfu_Points >= 0:
jump lose
elif Power_Points >= 30:
jump draw
elif Kungfu_Points >= 30:
jump draw
elif Power_Points >= 50:
jump win
elif Kungfu_Points >= 50:
jump win
label lose:
scene youlose
with dissolve
I tried this code, but it didn't work, the game automatically moved to the lower label without counting the if point statement.
and let me ask is there a way to group the numbers in the "if points statement" code? Because every time I use it, I have to write a very long code like that?
I want to use it to count hours of the day, 24 hours. Is there any way for me to group 6-12 hours into a group? 13-18 hours 1 group? for example:
------------------------------------------------
Code:
if Hour_Points = 6,7,8,9,10,11,12:
jump morning
if Hour_Points = 13,14,15,16,17,18:
jump evening
-------------------------------------------------
I tried it but it didn't work