NPC-8 Has Weird Grid Offset

Description: It's archive, posting new is here http://wohlsoft.ru/forum/viewforum.php?f=11

Sambo M
Topic author, Count
Count
Avatar
Sambo M
Topic author, Count
Count
Age: 25
Reputation: 15
Posts: 264
Joined: 27 Jun 2014

Post #1by Sambo » 22 May 2016, 5:47

NPC-8 has some strange grid offset and it no longer lines up with the center of pipes. I can't figure out which setting is screwing it up:

Code: Select all

gfx-offset-x=0
gfx-offset-y=1
gfx-height=48
gfx-width=32
grid=16
grid-offset-x=16
grid-offset-y=-16
grid-attachement-style=1

Which setting do I need to change? Trying them all one at a time is an absolute nightmare because the editor crash on reloading configurations hasn't been fixed yet.

Added after 8 minutes 13 seconds:
Changing the settings in the level/episode txts doesn't do anything either.
Image
Current Project:
Image

Wohlstand M
Lead Developer
Lead Developer
Avatar
Wohlstand M
Lead Developer
Lead Developer
Age: 30
Reputation: 493
Posts: 1747
Joined: 15 Feb 2014
English Pronouns: he/him
Location: Moscow, Russia
Website Youtube channel URL Skype Tencent QQ

Post #2by Wohlstand » 22 May 2016, 14:15

In the lvl_npc.ini those values are absolute. In the npc.txt there are relative.
Grid attachment style with 1 value aligns NPC's center at edge of grid cell like thwomps.
Anyway, those grid offsets are made very long time ago and designed for grid 32px grid (like in SMBX), but later I changed grid size to 16 to allow more convenient work with piranha plant NPC's.
If grid offsets are not defined in lvl_npc.txt, there are will be calculated automatically to align NPC's center to center of grid cell (or to edge of cell if attach parameter equal to 1)

Anyway, just set all grid offsets and align style to 0:

Code: Select all

grid=16
;grid-offset-x=0
;grid-offset-y=0
grid-attachement-style=0

I'll apply this fix to lvl_npc.ini at me and later it will come with new version of PGE


Return to “Troubleshooting”

Who is online (over the past 5 minutes)

Users browsing this forum: 1 guest