Bizarre coding problem (fixed)

  • 0 Replies
  • 2038 Views
*

Offline Hmpf

  • 825
  • 15
  • Now with less rain.
    • View Profile
Bizarre coding problem (fixed)
« on: July 26, 2009, 04:03:40 »
I've been putting a lot of shifts into my level recently, and I really thought I'd understood how they worked... well, apparently not, because tonight I've been trying to put in another, and it just doesn't do what it should do. Arrgh!

The starting coordinates are:

Map:
X: 999
Y: 1001

Pos:
X: 10
Y: 7

The coordinates of the destination are:

Map:

X: 995
Y: 1002

Pos:

X: 12
Y: 3

Now, the code I put in the world.ini was this:

[x999y1001]
ShiftVisible(A)=False
ShiftSound(A)=Door
ShiftXMap(A)=-4
ShiftYMap(A)=1
ShiftXPos(A)=2
ShiftYPos(A)=-4

This is cut-and-pasted directly from the world.ini.

Now, if I understand shifts, this *should* transport Juni to the right place - but it doesn't. Instead, it takes her to [x995y1001]. And the really odd thing is that no matter what I do with the ShiftYMap(A) line, the result stays the same. I can put a value of 100 in there or I can remove the line completely, it doesn't make a difference. The result is always [x995y1001] - as if that line were invisible. I've been trying to fix this for half an hour now, and it's not *that* complex, is it?? What am I doing wrong?


ETA: Err, never mind. I had a relic of an earlier definition of that shift in the file, which was messing with the new one. :-)
« Last Edit: July 26, 2009, 10:47:44 by LPChip »