Hi, i am working on a custom mech sprite, i change the 7 sprites of the mech_punch, but when i test in game the sprites looks is offset of the tile, bellow there is an example, i try to change offset on the script "animations.lua" but when i save the changes, the game doesn't start, any advise??
I know that the sprite is a bit big, but i want to try how it will look in game.
link to image: https://imgur.com/a/j39Yy
I need help with custom mech sprites [Healtbar overlapping]
-
- Posts: 2
- Joined: Thu Mar 22, 2018 12:19 am
I need help with custom mech sprites [Healtbar overlapping]
Last edited by aaronclaros on Sat Mar 24, 2018 2:17 am, edited 1 time in total.
-
- Posts: 4
- Joined: Sat Dec 17, 2016 2:43 pm
Re: I need help with custom mech sprites
Find the file pawns.lua
Towards the bottom there are all the animations. Just edit pos X and pos Y, increasing or decreasing as desired until for each sprite it looks like it is positioned good.
So you will need to test:
Normal,
Animated,
Broken,
wet,
Wet Broken.
Here is an example from one of my mechs.
Towards the bottom there are all the animations. Just edit pos X and pos Y, increasing or decreasing as desired until for each sprite it looks like it is positioned good.
So you will need to test:
Normal,
Animated,
Broken,
wet,
Wet Broken.
Here is an example from one of my mechs.
Code: Select all
INBN_HammerMech = Pawn:new{
Name = "Hammer Mech",
Class = "Prime",
Health = 3,
MoveSpeed = 4,
Image = "INBN_HammerMech",
ImageOffset = 3,
SkillList = { "INBN_Slam" },
SoundLocation = "/mech/prime/rock_mech/",
DefaultTeam = TEAM_PLAYER,
ImpactMaterial = IMPACT_METAL,
Massive = true
}
AddPawn("INBN_HammerMech")
ANIMS.INBN_HammerMech = ANIMS.MechUnit:new{ Image = "units/player/mech_hammer.png", PosX = -23, PosY = -7 }
ANIMS.INBN_HammerMecha = ANIMS.MechUnit:new{ Image = "units/player/mech_hammer_a.png", PosX = -23, PosY = -7, NumFrames = 4 }
ANIMS.INBN_HammerMechw = ANIMS.MechUnit:new{ Image = "units/player/mech_hammer_w.png", PosX = -23, PosY = -7 }
ANIMS.INBN_HammerMechh_broken = ANIMS.MechUnit:new{ Image = "units/player/mech_hammer_broken.png", PosX = -23, PosY = -7 }
ANIMS.INBN_HammerMechw_broken = ANIMS.MechUnit:new{ Image = "units/player/mech_hammer_w_broken.png", PosX = -23, PosY = -7 }
ANIMS.INBN_HammerMech_ns = ANIMS.MechIcon:new{ Image = "units/player/mech_hammer_ns.png" }
-
- Posts: 2
- Joined: Thu Mar 22, 2018 12:19 am
Re: I need help with custom mech sprites
inventex wrote:Find the file pawns.lua
Towards the bottom there are all the animations. Just edit pos X and pos Y, increasing or decreasing as desired until for each sprite it looks like it is positioned good.
So you will need to test:
Normal,
Animated,
Broken,
wet,
Wet Broken.
Thanks, i reduce the size of the custom sprite and fix the positions, but now i have a new problem, the healthbar is overlapping the custom sprite, i try to search the script that manage the healtbar, but just find this in "images.lua"
Code: Select all
line 491 Location["combat/icons/icon_healthbar_shadow.png"] = Point(-15,-12)
i try to change this line, but nothing happens
here is a screenshot of the problem:
https://imgur.com/a/0eQBq
did you know how fix this?