Always glad to help a fellow Sin City dweller.NutJob wrote:Thanks for sharing the elevator script ninjanerdbgm, learned a few things.
Open stairs in a level to move between elevations?
-
- Posts: 28
- Joined: Tue Nov 04, 2014 6:53 pm
Re: Open stairs in a level to move between elevations?
Re: Open stairs in a level to move between elevations?
And one elevator's script sticked in the superthread, one !
-
- Posts: 28
- Joined: Tue Nov 04, 2014 6:53 pm
Re: Open stairs in a level to move between elevations?
Cool! Maybe someone could improve upon my design and make the whole thing simpler.Doridion wrote:And one elevator's script sticked in the superthread, one !
Re: Open stairs in a level to move between elevations?
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).
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?
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.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 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?
you can just use setWorldPosition() every frame to make the transition smoothMrChoke 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.
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)
Grimrock 1 dungeon
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
Re: Open stairs in a level to move between elevations?
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).
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).