There's no need to have plenty of python knowledge for that, since it's done 100% with Ren'Py, partly with the
You must be registered to see the links
, that don't have Python equivalent, partly with the
You must be registered to see the links
.
This being said, without knowing more about the code... Well, I guess that using conditioned dynamic
You must be registered to see the links
is the answer here.
Python:
image animation1:
"images/anims/frame1.jpg"
pause 0.1
"images/anims/frame2.jpg"
pause 0.1
[...]
"images/anims/frameX.jpg"
pause 0.1
[...]
"images/anims/frameN.jpg"
default battleAnim = None
screen battleMap():
[...]
if not battleAnim is None:
add "[battleAnim]"
[...]
init python:
[whatever the battle engine code]
store.battleAnim = "animation1"
If would works exactly the same if "animation1" is in fact a movie. It's just its declaration syntax that change accordingly.
So progress until now is, I've managed to get it to work, it's showing, but... my issue right now is the positioning it's using it's showing it at the user spots always, and never on the target its being used on...
This is my code for the target selection
def asignPos():
monster_slot[0].sprite_pos = 0
monster_slot[1].sprite_pos = 256
monster_slot[2].sprite_pos = 512
monster_slot[3].sprite_pos = 768
monster_slot[4].sprite_pos = 0
monster_slot[5].sprite_pos = 256
monster_slot[6].sprite_pos = 512
monster_slot[7].sprite_pos = 768
monster_slot[0].dmg_pos = (576,320)
monster_slot[1].dmg_pos = (832,320)
monster_slot[2].dmg_pos = (1088,320)
monster_slot[3].dmg_pos = (1344,320)
monster_slot[4].dmg_pos = (576,512)
monster_slot[5].dmg_pos = (832,512)
monster_slot[6].dmg_pos = (1088,512)
monster_slot[7].dmg_pos = (1344,512)
This are the codes related to attacks
init python:
def atkAll():
renpy.show(anima_a)
renpy.pause(1.0, hard=True)
renpy.play(atk_sfx)
renpy.pause(0.2, hard=True)
renpy.hide(anima_a)
for t in battle_monsters:
if not t.dead:
if accFormula(currentplayer, t):
dmgFormula(t)
t._hp -= t.finaldmg
t._mp -= mpdmg
renpy.show_screen("monster_dmg")
renpy.with_statement(s_trans)
def atkRow():
renpy.show(anima_a)
renpy.pause(1.0, hard=True)
renpy.play(atk_sfx)
renpy.pause(0.2, hard=True)
renpy.hide(anima_a)
for t in picked_targs:
if accFormula(currentplayer, t):
dmgFormula(t)
t._hp -= t.finaldmg
t._mp -= mpdmg
renpy.show_screen("monster_dmg")
renpy.with_statement(s_trans)
def atkEnemy():
for t in picked_targs:
renpy.show(anima_a)
renpy.pause(1.0, hard=True)
renpy.play(atk_sfx)
renpy.pause(0.2, hard=True)
renpy.hide(anima_a)
if accFormula(currentplayer, t):
dmgFormula(t)
t._hp -= t.finaldmg
t._mp -= mpdmg
renpy.show_screen("monster_dmg")
renpy.with_statement(s_trans)
afterFX(b_skill, t)
I need to figure out how to link them together...
renpy.show(anima_a)
is the animation code