I need help with custom mech sprites [Healtbar overlapping]

Discuss and distribute tools and methods for modding.
aaronclaros
Posts: 2
Joined: Thu Mar 22, 2018 12:19 am

I need help with custom mech sprites [Healtbar overlapping]

Postby aaronclaros » Thu Mar 22, 2018 12:35 am

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.
Image
link to image: https://imgur.com/a/j39Yy
Last edited by aaronclaros on Sat Mar 24, 2018 2:17 am, edited 1 time in total.
inventex
Posts: 4
Joined: Sat Dec 17, 2016 2:43 pm

Re: I need help with custom mech sprites

Postby inventex » Thu Mar 22, 2018 6:37 am

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.

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" }
aaronclaros
Posts: 2
Joined: Thu Mar 22, 2018 12:19 am

Re: I need help with custom mech sprites

Postby aaronclaros » Fri Mar 23, 2018 3:14 am

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?

Who is online

Users browsing this forum: No registered users and 1 guest