Page 3 of 3

Re: Open stairs in a level to move between elevations?

Posted: Mon Nov 10, 2014 5:10 pm
by ninjanerdbgm
NutJob wrote:Thanks for sharing the elevator script ninjanerdbgm, learned a few things.
Always glad to help a fellow Sin City dweller.

Re: Open stairs in a level to move between elevations?

Posted: Mon Nov 10, 2014 9:16 pm
by Doridion
And one elevator's script sticked in the superthread, one !

Re: Open stairs in a level to move between elevations?

Posted: Mon Nov 10, 2014 9:30 pm
by ninjanerdbgm
Doridion wrote:And one elevator's script sticked in the superthread, one !
Cool! Maybe someone could improve upon my design and make the whole thing simpler.

Re: Open stairs in a level to move between elevations?

Posted: Sun Jan 25, 2015 1:46 am
by Granamir
I'm not a programmer so maybe what i'm going to write has no sense, but i think is rather simple to go up or down without ladders.
What people want is a way to go up (or down) that seems more natural than climbing, like walking is.
Solution i have in mind doesn't need any 0.5 height inbetween tile, just 2 tiles first at 0 second at 1.
Graphics of those tiles have to be like stairs, going down or up, ending at half height, so they meet looking like a continuous ground.
So from code side of view is like having ladder (except that animation starts only if tile where i'm going is free), but from graphic point of view is like walking.
For solving any fighting problem we can consider both tiles at same height (monsters and party can fight like they are at same height).

Re: Open stairs in a level to move between elevations?

Posted: Mon Jan 26, 2015 4:31 pm
by MrChoke
Granamir wrote:I'm not a programmer so maybe what i'm going to write has no sense, but i think is rather simple to go up or down without ladders.
What people want is a way to go up (or down) that seems more natural than climbing, like walking is.
Solution i have in mind doesn't need any 0.5 height inbetween tile, just 2 tiles first at 0 second at 1.
Graphics of those tiles have to be like stairs, going down or up, ending at half height, so they meet looking like a continuous ground.
So from code side of view is like having ladder (except that animation starts only if tile where i'm going is free), but from graphic point of view is like walking.
For solving any fighting problem we can consider both tiles at same height (monsters and party can fight like they are at same height).
I don't think the engine is going to let you do this and have it look good in any way. If you are talking about a 1 height transition across only 2 tiles, there is only going to be 2 height difference. If the higher tile is at a higher elevation, the only way to get the party to move onto that tile is to use setPostion() on the party. And you will probably have to trigger this by overriding the onMove() hook of the party. Even if you get this to work the result will be an instant jump up one level, it will look pretty bad.

I also looked up the Stairs component to see if it has any animations for the "walking" the party does as it moves up and down stairs. I find none which leads me to believe its hard-coded in the engine. So re-use of that is not possible without somehow incorporating a stairs component.

The only workable approach I found (and one I am doing in my dungeon) is the gradual transition across multiple tiles with 2 invisible platforms per square to "lift" the party coming up or "catch" the party coming down. It will take very finite modifications to the Y-position of these platforms to look decent. And for me, even then the party does a little odd movement as it walks up and down. But I deemed it acceptable.

Re: Open stairs in a level to move between elevations?

Posted: Mon Jan 26, 2015 7:02 pm
by minmay
MrChoke wrote:I don't think the engine is going to let you do this and have it look good in any way. If you are talking about a 1 height transition across only 2 tiles, there is only going to be 2 height difference. If the higher tile is at a higher elevation, the only way to get the party to move onto that tile is to use setPostion() on the party.
you can just use setWorldPosition() every frame to make the transition smooth
only problem is that you probably can't determine whether the player has the cameraBobbing option disabled, but it's so subtle that I doubt anybody will notice (and most players don't even know it exists)

Re: Open stairs in a level to move between elevations?

Posted: Mon Jan 26, 2015 9:10 pm
by Granamir
Maybe i was not clear...
What i meant is that AH could do that, easily i think. In editor mode with collision disabled already does, but as u say transition is not so good, camera just go from height 0 to 1 instantly. I guess they could easily solve this problem.

Btw now i guess even we modders can do it (not me ^_^, i guess a better programmer is needed).
We just need a tile model (for every tile) with 3 borders at height 0 and last at height 0.5, and a tile with 3 borders at height 1 and last at height 0.5, like the 1st one. Then we need some code that disable (or overwrite, if possible) the onMove() of the game, and make champions move forward and up (or down), like someone already did for lift.
Not saying it's easy but i guess it's possible to do with a nice result.

I'd like to be able to programming, this height change transition is thing i miss most in editor (with digging holes going to level down...but this only AH can solve).