Using Ren'Py Code In Python
Posted: Fri Dec 08, 2017 12:57 am
I was just wondering how to make exact same thing from Ren'Py just coded in Python language. My question is mainly based around labels in Ren'Py which can't be used in Python.
So here is example that's how code looks in Ren'Py:
And here is exact same thing just written as Function so how can I make labels and jump to it like you wold do in Ren'Py?
So here is example that's how code looks in Ren'Py:
Code: Select all
label BATTLE_SKELETON:
if current_player.NAME == "Bob":
if current_player.STUN_DURATION < 1:
$ bob.CURRENT_PLAYER_TURN_TRUE()
$ enemy_members_list[res].ADD_ATTACK_MARKER()
$ res = ui.interact()
label BOB_BASIC_ATTACK:
$ enemy_members_list[res].REMOVE_ATTACK_MARKER
"Lets jump back to the label!"
jump BOB_BASIC_ATTACK
And here is exact same thing just written as Function so how can I make labels and jump to it like you wold do in Ren'Py?
Code: Select all
def BATTLE_SKELETON(self):
if current_player.NAME == "Bob":
if current_player.STUN_DURATION < 1:
bob.CURRENT_PLAYER_TURN_TRUE()
res = ui.interact()
enemy_members_list[res].ADD_ATTACK_MARKER()
# <------------------------------------------ This line what do I put inside here label can't be used
enemy_members_list[res].REMOVE_ATTACK_MARKER
renpy.say(battle_narrator, "Lets jump back to the label!")
# <-------------------------------------- And here how do I make jumps like in Ren'Py?