Page 1 of 1
pit not pit
Posted: Tue Mar 31, 2015 1:29 am
by Granamir
Hi,
anyone knows a way to make a pit act not like a pit.
Now when u step on a pit u activate some script that stop everything, make u fall for pit height then change level going down and falling 'till ground.
As i'm using pit to make lava lake i'd like party to go in there and take damage not fall underneath.
Anyone knows how to disable pit behavior but not graphics?
Thank you
PS: for same reason is there a way to put something like an invisible platform under lava surface, so party goes down only half tile? i mean in object definition; offset is not supported for platform component atm.
Re: pit not pit
Posted: Tue Mar 31, 2015 1:55 am
by Eburt
My initial reaction would be to use a platform component instead of a pit component - just disable it when the party walks overhead. Then you can set up the appropriate model and animations.
As for the platform offset - I'm fairly certain this should work. setOffset() is inherited from the base Component class. I haven't actually ever tried this though, so I'm not sure if it really behaves correctly.
Re: pit not pit
Posted: Tue Mar 31, 2015 2:03 am
by Azel
In my demo Mod, I just put a Floor_Trigger on top of the Pit, and when the party steps on the Pit, I move them myself with Script activated by the Floor Trigger. Might not be the best way, but works!

Re: pit not pit
Posted: Tue Mar 31, 2015 2:36 am
by minmay
Why would you want to use PitComponent when you don't want pit behaviour? If you just want the model for one of the pit objects, either disable all the other components or define a new object that only has the ModelComponent.
Making the party fall only a "half tile" won't work very well on its own as it will result in aliased movement behaviour; you can test this yourself by using setWorldPosition() or the heightmap to make a PlatformComponent that isn't level with the rest of its elevation, and moving onto or off of it. The easiest way to make seamless climbing out is probably dividing the level's module height by some value and multiplying all elevations on that level by the same value; then you'd have finer elevations and could use LadderComponents to climb 1.5 or 1 meter, letting the party climb your "half tile" or "third tile" of distance (which is actually a full tile) seamlessly. However, this comes with all the undesirable effects you'd expect; you can't use LadderComponent or MonsterChangeElevationComponent anywhere else on the level, among a dozen other things. Instead my recommendation would be to take advantage of PartyComponent.onMove to make your own fake LadderComponent that lets the party "climb" whatever distance you want; since this is only being used for climbing these "half tile" elevations you wouldn't need to implement most of LadderComponent climbing, just the camera movement (abusing setWorldPosition and setWorldRotation on the party is probably easier than using CameraComponent for this) and increasing elevation at the end.
Re: pit not pit
Posted: Tue Mar 31, 2015 12:33 pm
by Granamir
Thank you guys.
Azel it could be a solution, ty.
Minmay u'r right i don't need a pit...i just used it because i started from someone else work and he used pit.

I know about those movement behaviour, unfortunatelly i have to keep it because i need partial movement and your solution is far too difficult for my skills. I already have some of those movement in my mod, i hope people don't be too much annoyed by that.
I don't need a platform either since i made it an insta-kill object.
Again than you for your help.
PS: Eburt i used "offset = vec(x,y,z)" in object definition and i had in response something like "offset not supported for platform component" in my console.
Where have i to use "setOffset()"? and which argument i need in ()?
Re: pit not pit
Posted: Tue Mar 31, 2015 6:53 pm
by bongobeat
if you still want to use a pit, without doing a new model, you can put a invisible platform and a mine_floor_01 on it, at the desired height (-1 floor height or more from the top floor(lava)), then when the party goes into the lava it will fall until it reach the platform and stop falling without changing levels.
or why don't you simply dig your level? I don't know how looks your lava, but maybe you don't need a pit. You just have to lower your floor on the desired height. then place your lava stuff over the hole.
Re: pit not pit
Posted: Tue Mar 31, 2015 9:01 pm
by Granamir
Ty bongobeat,
at the end i did as u say, lowered lava floor
easyest way, i don't even need platform because i made it a tile damager that kills party
Re: pit not pit
Posted: Tue Mar 31, 2015 10:18 pm
by Azel
Oh fun. Can't wait to fall in it

Re: pit not pit
Posted: Tue Mar 31, 2015 10:49 pm
by bongobeat
hot!
Re: pit not pit
Posted: Wed Apr 01, 2015 11:24 am
by Granamir
EDIT:

i just discovered i need a platform otherwise tile damager doesn't work in each condition (if i fall from heights it doesn't kill party)
Anyone can help me setting a platform in object definition with right offset?
TY