- 20
- Posts
- 10
- Years
- Seen Jul 16, 2015
Ok, it's me again = =
I tried to change the trback picture in essential today ,
i used the BW style picture
the new picture's size is 750*240, but the original one is 640*128
I changed the picture simply without changing the script ,and of course got the very strange result (crying)
how to script?
this is the original script above,thanks!
#################################################
if @battle.player.is_a?(Array)
trainerfile=sprintf("Graphics/Characters/trback%03d",@battle.player[0].trainertype)
pbAddSprite("player",Graphics.width+64-48,96+@traineryoffset,trainerfile,@viewport)
trainerfile=sprintf("Graphics/Characters/trback%03d",@battle.player[1].trainertype)
pbAddSprite("playerB",Graphics.width+64+48,96+@traineryoffset,trainerfile,@viewport)
if @sprites["player"].bitmap
if @sprites["player"].bitmap.width>@sprites["player"].bitmap.height
@sprites["player"].src_rect.x=0
@sprites["player"].src_rect.width=@sprites["player"].bitmap.width/5
end
@sprites["player"].x-=(@sprites["player"].src_rect.width-150)/2
end
if @sprites["playerB"].bitmap
if @sprites["playerB"].bitmap.width>@sprites["playerB"].bitmap.height
@sprites["playerB"].src_rect.x=0
@sprites["playerB"].src_rect.width=@sprites["playerB"].bitmap.width/5
end
@sprites["playerB"].x-=(@sprites["playerB"].src_rect.width-150)/2
end
else
trainerfile=sprintf("Graphics/Characters/trback%03d",@battle.player.trainertype)
pbAddSprite("player",Graphics.width+64,96+@traineryoffset,trainerfile,@viewport)
if @sprites["player"].bitmap
if @sprites["player"].bitmap.width>@sprites["player"].bitmap.height
@sprites["player"].src_rect.x=0
@sprites["player"].src_rect.width=@sprites["player"].bitmap.width/5
end
@sprites["player"].x-=(@sprites["player"].src_rect.width-150)/2
end
end
I tried to change the trback picture in essential today ,
i used the BW style picture
the new picture's size is 750*240, but the original one is 640*128
I changed the picture simply without changing the script ,and of course got the very strange result (crying)
how to script?
this is the original script above,thanks!
#################################################
if @battle.player.is_a?(Array)
trainerfile=sprintf("Graphics/Characters/trback%03d",@battle.player[0].trainertype)
pbAddSprite("player",Graphics.width+64-48,96+@traineryoffset,trainerfile,@viewport)
trainerfile=sprintf("Graphics/Characters/trback%03d",@battle.player[1].trainertype)
pbAddSprite("playerB",Graphics.width+64+48,96+@traineryoffset,trainerfile,@viewport)
if @sprites["player"].bitmap
if @sprites["player"].bitmap.width>@sprites["player"].bitmap.height
@sprites["player"].src_rect.x=0
@sprites["player"].src_rect.width=@sprites["player"].bitmap.width/5
end
@sprites["player"].x-=(@sprites["player"].src_rect.width-150)/2
end
if @sprites["playerB"].bitmap
if @sprites["playerB"].bitmap.width>@sprites["playerB"].bitmap.height
@sprites["playerB"].src_rect.x=0
@sprites["playerB"].src_rect.width=@sprites["playerB"].bitmap.width/5
end
@sprites["playerB"].x-=(@sprites["playerB"].src_rect.width-150)/2
end
else
trainerfile=sprintf("Graphics/Characters/trback%03d",@battle.player.trainertype)
pbAddSprite("player",Graphics.width+64,96+@traineryoffset,trainerfile,@viewport)
if @sprites["player"].bitmap
if @sprites["player"].bitmap.width>@sprites["player"].bitmap.height
@sprites["player"].src_rect.x=0
@sprites["player"].src_rect.width=@sprites["player"].bitmap.width/5
end
@sprites["player"].x-=(@sprites["player"].src_rect.width-150)/2
end
end