Combining a ladder and a door
Post Reply
Quote
Re: Combining a ladder and a door
Posted by still_CJ on Thu Nov 20th at 9:56pm 2003


I'm trying to create a feature where the players see a ladder leaning against some boxes, providing access to an obviously broken light fitting. What they need to do is pivot the ladder to lean in the opposite direction to get access to a duct entrance (yeh, I know, but every level needs at least one duct). I can get the ladder pivotable by creating it as rotating door, with the origin at the bottom and the pivot in the x axis. Snag is, I can't group the func_door_rotating with the necessary func_ladders (one each side of the ladder textured door)..

I'm considering creating the ladder as a door, with a ladder on one side then, when moved by the players using a multimanager to kill the original func_ladder and create a new one in the new position, but I'm not 100% sure this will work. Before I spend a lot of time on this, does anyone have a better solution.

Thanks,

CJ





Quote
Re: Combining a ladder and a door
Posted by Neural Scan on Thu Nov 20th at 10:14pm 2003


I'm not sure about this, but there's something called 'Spirit of Half Life', and basically it's the same as half life, but with added features you can do with entities and stuff. It's just an 'improvement' on the original half life fgd, in the form of a mod (like tfc or cs).

With Spirit you can add a 'moves with' thingy, which allows you to do things like you asked here (moving ladders with doors or platforms). All you gotta do is search for Spirit of Half Life and download it, then set up the fgd and everything in Hammer or whatever program you use, then you load up the mod and test it out.

Fun thing is Spirit comes with a short map which displays some of the capabilities that Spirit offers.

I don't know of any other way of doing what you asked, so I just went with what I knew.

[addsig]




Quote
Re: Combining a ladder and a door
Posted by Dr Brasso on Thu Nov 20th at 10:29pm 2003


how about this.....

create yer ladderfrom a func_rot_door so it pivots....on the opposite side of the ladder, create your func ladder with aaa texture and clip it so that when the ladder is pivoted, it drops just inside the boundaries of the func ladder ....no fuss, no muss....mission accomplished

itll still look like yer going up the ladder(which is in reality a func_rot_door) but youll in actuality be using the func ladder.....follow?

Doc brass...

[addsig]




Quote
Re: Combining a ladder and a door
Posted by Dr Brasso on Thu Nov 20th at 10:29pm 2003


damn double post....grrr

[addsig]




Quote
Re: Combining a ladder and a door
Posted by Gollum on Thu Nov 20th at 11:05pm 2003


Doc, unless I've misunderstood you, your solution has the actual func_ladder entity staying in its final position all the time. That would mean there is an invisible ladder that can be climbed without moving the visible func_door_rotating.

Unfortunately I don't believe that you can turn on a func_ladder by triggering it This means that there is no perfect solution to your problem. If a ladder exists, it can be removed by killtargeting, but you can't spawn a new one. However, you could cover the func_ladder with a func_wall_toggle. This would stop the player from going up the ladder, but he would also be unable to walk through the space it occupies - so this solution only works if the final position of the ladder is flush against a wall.

The func_wall_toggle can be triggered to allow the player up the new ladder, and the old ladder can be killtargeted.

Spirit of Half-Life will almost certainly allow you to do this, as Neural Scan has said (although it's more than just an FGD improvement....that would be useless on its own).

[addsig]




Quote
Re: Combining a ladder and a door
Posted by Gollum on Thu Nov 20th at 11:19pm 2003


Ha! I've just thought of a possible cunning alternative that *should* work in situations where the ladder, instead of being flush with a wall, is leaning at an angle.

Make a very steep series of steps along the path of the ladder. If the steps are thin enough, then the player will "teleport" up them instead of standing on any individual step (this is a bizarre feature of the player movement code). The steps should have only a one-unit depth each, so that they don't touch the ground.

Test that this works in a "normal" situation. The player should move very quickly up the steps, despite the extremely steep angle. Now make this into a func_door and make it invisible (see Hornpipe's correction below). The func_door should be set to rise out the ground when you push the "ladder", and will substitute for a real func_ladder.

Obviously you will need to adjust the steps for the required length and angle of the ladder. Note that if the ladder is at an angle of 45 degrees or less, you don't even need to bother with the steps but can just use a uniform slope.

Also, depending on which is least likely to get in the way, you could make the func_door appear out of the ceiling or the walls. Bear in mind that it must not be blocked, or it will bounce back or damage the player until he gets out the way (if you set the delay before reset to -1). Another option is to use a func_wall_toggle instead, but then you must be careful to prevent the player becoming stuck inside the wall when it toggles on! If necessary you can use trigger_push entities to force the player out of the way of the door/wall.

[addsig]




Quote
Re: Combining a ladder and a door
Posted by Dr Brasso on Thu Nov 20th at 11:22pm 2003


well, not knowing the layout or actually seeing what hes trying to do, i suppose yer right....i defer to my more enlightened counterpart.....

Doc Brass....

sure would like to see what hes doing tho....

ps....i freakin love the way yer mind works mikee.... reminds me of a more educated me....

i also just had a thought..... you dont have a sex life either do you...

////runs like hell on fire....W00T!





Quote
Re: Combining a ladder and a door
Posted by Gollum on Thu Nov 20th at 11:38pm 2003


? posted by Dr Brasso

i also just had a thought..... you dont have a sex life either do you...

Now that was below the belt. But actually, I find a good hardcore editing puzzle always warms me up for night-time frolics. Oh yes.

*chases Brasso away with apocryphal Pringles tube*

[addsig]




Quote
Re: Combining a ladder and a door
Posted by Hornpipe2 on Fri Nov 21st at 2:02am 2003


Uh... Don't texture it with NULL - any face covered with NULL is not just invisible, it's not even there! Zoner's Compile Tools discards every face painted with NULL during the compile.

Instead, cover it with {BLUE. Then, when you set up the door, make the render mode Solid and the FX amount 255. That way it will still exist but will not be visible.

Another solution - If the player cannot get to where the ladder's final position (e.g. it's not in the middle of the room but more against the wall or something) then you could put down a func_ladder and completely surrounding that a func_wall covered with clip. Now the climbable ladder already exists, but the player can't reach it because it's surrounded by the larger func_wall. When the player Uses the func_rotating visual part of the ladder, set the Killtarget to the name of the invisible func_wall so it deletes the wall around the ladder, thus the player can reach it and climb up. Nyet? (You might also try Target instead of Killtarget, that way it just turns the wall off instead of deleting it... for example if you wanted a way to put the ladder back where it was)

EDIT: Crap, that was exactly what Gollum was just suggesting. Carry on.

[addsig]




Quote
Re: Combining a ladder and a door
Posted by Tracer Bullet on Fri Nov 21st at 4:37am 2003


? posted by Gollum

Ha! I've just thought of a possible cunning alternative that *should* work in situations where the ladder, instead of being flush with a wall, is leaning at an angle.

Make a very steep series of steps along the path of the ladder. If the steps are thin enough, then the player will "teleport" up them instead of standing on any individual step (this is a bizarre feature of the player movement code).

So you can make the player move up a very steep slope without a ladder? intriguing. I'll have to find a way to use that.

[addsig]




Quote
Re: Combining a ladder and a door
Posted by Cash Car Star on Fri Nov 21st at 8:20am 2003


Orph did it in his map for the first SP mapping contest, Double Trouble. It works fine going up but coming down feels rather rocky.



Quote
Re: Combining a ladder and a door
Posted by Loco on Fri Nov 21st at 8:29am 2003


If you want Spirit, you can find it on http://spirit.valve-erc.com, and the new Spirit 1.2 also comes with the Dark Truths Particle engine... [addsig]



Quote
Re: Combining a ladder and a door
Posted by Gollum on Fri Nov 21st at 10:54am 2003


? posted by Hornpipe2

Uh... Don't texture it with NULL - any face covered with NULL is not just invisible, it's not even there! Zoner's Compile Tools discards every face painted with NULL during the compile.

Actually that's a good point. You can make entirely nulled entities (I do), and they will still work, but they won't be solid.

In fact, it doesn't matter what texture you use (well, as long as it's not sky or origin etc.). Setting an entity to rendermode solid and renderamount 0 will make it invisible, and the game won't draw its polygons (there is a difference).

*edits answer*

[addsig]




Quote
Re: Combining a ladder and a door
Posted by still_CJ on Sat Nov 22nd at 8:45am 2003


Thanks guys. Gollums idea certainly works and is easy to implement.

I've ticked him as the answer.

CJ






Post Reply