Jump to content


Photo

Stairs?


  • Please log in to reply
5 replies to this topic

#1 alytle

alytle

    Rookie

  • New Forum Members
  • Pip
  • 0 posts

Posted 22 May 2007 - 09:28 AM

Does anyone have any insight into how XCOM handles stairs internally during the tactical game? I'm looking at the MCD data, and I can't see anything that would help to signal something as a staircase. Staircases seem to be an unusual item on the map, since they can only be walked onto from one direction, and eventually take you to another level of the map. Anyone have any clue how this is controlled?

Thanks!

#2 mrnikosia

mrnikosia

    Squaddie

  • Forum Members
  • PipPip
  • 8 posts

Posted 23 May 2007 - 04:23 AM

For uforemake i had the same problem, the only thing you have is the displacement which
shifts the unit or items upwards.

For the beginning of the stairs it is -8, the high end of the stairs is -16,
so units are only allowed to walk upto 8 difference from previous cell.
So the unit standing on the floor can only walk on tiles with -8 displacement,
and units can only walk on tiles with -16 comming from -8.

The same idea can be used for going up one level, only allow this from -16!

Edited by mrnikosia, 24 May 2007 - 06:35 PM.


#3 alytle

alytle

    Rookie

  • New Forum Members
  • Pip
  • 0 posts

Posted 23 May 2007 - 12:42 PM

Ok, that seems like a simple solution. I guess I was just assuming I was missing something in the MCD data.

So if the differential between y displacement for any two tiles is > 8, then you cannot walk between those two tiles. Did this cause any problems elsewhere on the map? Are there any hills or anything where this idea didn't work?

#4 mrnikosia

mrnikosia

    Squaddie

  • Forum Members
  • PipPip
  • 8 posts

Posted 23 May 2007 - 02:00 PM

Ok, that seems like a simple solution. I guess I was just assuming I was missing something in the MCD data.

So if the differential between y displacement for any two tiles is > 8, then you cannot walk between those two tiles. Did this cause any problems elsewhere on the map? Are there any hills or anything where this idea didn't work?


I checked most of the maps and it seems to work.
There is just the thing that eg in the desert if you walk up a hill, it has a displacement of -24, and the cell up 1 level does
not have a floor, so it looks like you are at level 1 (level 0 being ground) but you are still in level 0.
This can easily be included in programming i think

#5 alytle

alytle

    Rookie

  • New Forum Members
  • Pip
  • 0 posts

Posted 23 May 2007 - 05:20 PM

Awesome, thanks for the suggestions. That's already working well for me :)

#6 mrnikosia

mrnikosia

    Squaddie

  • Forum Members
  • PipPip
  • 8 posts

Posted 24 May 2007 - 02:07 PM

Awesome, thanks for the suggestions. That's already working well for me :)


U 2 working on somekind of UFO remake?