May I ask for a bit more help? I tried to find it in renpy documentation, but without much luck...
I have this in assets.rpy
image Flame SniperS:
Image("content/chars/Sailor_mars_test/Mars/combat (10).jpg")
pause 0.6
Library.Skills.FlameSniper = MagicFighterAttackSkill2("Flame Sniper", attributes=['magic', 'fire'], damage=5, cost=5, range=4, sprite_cast=BattleSprite('Flame Sniper1',anchor=(0.5, 0.),sprite_fly=BattleSprite('Flame Sniper2',anchor=(0.5, 0.),sprite_impact=BattleSprite('Flame Sniper3',anchor=(0.5, 0.),sprite_special=("Flame SniperS"), pause=1, sfx="content/sfx/sound/be/fire.wav")
And this in engine-skills.rpy
class MagicFighterAttackSkill2(Skill):
def __init__(self, name="Magic Fighter Attack2", command=None, attributes=['magic'], damage=1, cost=1, range=5, sprite_cast=None, sprite_fly=None, sprite_impact=None, sprite_special=None, pause=0, sfx=None, endTurn=True, hotkey=None, weight=0):
self._damage = damage
self._cost = cost
self._targets = TargetData.TargetFightersLos(range=range)
self._sprite_cast = sprite_cast
self._sprite_fly = sprite_fly
self._sprite_impact = sprite_impact
self._sprite_special = sprite_special
self._pause = pause
self._sfx = sfx
self._endTurn = endTurn
self._attributes = attributes
if command == None:
command = [("Magic", 5), (name, 0)]
super(MagicFighterAttackSkill2, self).__init__(name=name, command=command, hotkey=hotkey, weight=weight)
def SetUpFighter(self, fighter):
fighter.RegisterStat("Magic", 10)
fighter.RegisterStat("MP", 10)
def PerformAction(self, fighter, target):
if (self.IsAvailable(fighter)):
if (target != None):
fighter.Stats.MP = fighter.Stats.MP - self._cost
if self._sfx != None:
renpy.music.play(self._sfx, channel="sound", loop=False)
face = fighter._battle.GetFacing(fighter.Position, target[0].Position)
fighter._battle.ChangeFighterState(fighter, "magic", facing=face)
# Make sure that the camera centres on the target before the spell goes off
fighter._battle.PointOfInterest(fighter=target[0])
sprite_flip1 = False
if (fighter.Position.X < target[0].Position.X):
sprite_flip1 = True
tag = "MagicFighterAttackSkill2_"+target[0].Tag+"_"+str(renpy.random.random()*1000)
l = fighter._battle.GetLayer('Fighters')
if self._sprite_special != None and self._pause > 0 and dice(50):
renpy.show(tag, what=self._sprite_special, at_list=[Position(xpos=0.5,ypos=0.], layer=l, zorder=fighter.Position.Z + 0.001)
And I would like this image in the last line Resized, and apply transitions on it. But I'm not sure where to write that...