Ladders: the best method?

Archive of the old editing forum
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
User avatar
Enjay
 
 
Posts: 26536
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: Ladders: the best method?

Post by Enjay »

ramon.dexter wrote:The ladder is a ladder. Why should enemies not to climb on that ladder?

I think it's pretty nice that AI can also use the ladder. :D

Because, as a mapper, there might be times when I don't want them to climb it? Because they don't have climbing animations? Because they look as if they are floating quite a few units away from the wall?

I didn't say that they should never be able to climb the ladder (I too think it's pretty cool that they can) but I'd like an easy mapping option for them not to climb. The other thing would be to do something like put monster blocking lines around the ladder or something but having a monster climb and a no monster climb version would be nice.
User avatar
RockstarRaccoon
Posts: 598
Joined: Sun Jul 31, 2016 2:43 pm

Re: Ladders: the best method?

Post by RockstarRaccoon »

If it's ACS or a special, just don't tag it as letting monsters activate it.

Anyway, here's my far less elegant method I've been using...

Code: Select all

// TODO: the following is full of dicks
bool isOnLadder;
bool isStillOnLadder;
script "ZHexen: Ladder" (void) {
	SetPlayerProperty (0, 1, PROP_FLY);
	if(isOnLadder) {
		isStillOnLadder = true;
	} else {
		isOnLadder = true;
		PrintBold(s:"On Ladder");
	}
	
	delay(8);
	
	if(isStillOnLadder) {
		isStillOnLadder = false;
	} else {
		SetPlayerProperty (0, 0, PROP_FLY);
		PrintBold(s:"Off Ladder");
		isOnLadder = false;
	}
}
I'm gonna wait for this new ZScript thing to come out before I really focus on this. For now, this works as well as I need it to...
User avatar
Nash
 
 
Posts: 17450
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: Ladders: the best method?

Post by Nash »

ZScript is already out. It's an official feature since GZDoom 2.4.
User avatar
Enjay
 
 
Posts: 26536
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: Ladders: the best method?

Post by Enjay »

And, in fact, AFADoomer's ladder is done using ZScript.
User avatar
AFADoomer
Posts: 1335
Joined: Tue Jul 15, 2003 4:18 pm
Contact:

Re: Ladders: the best method?

Post by AFADoomer »

Enjay wrote:That is significantly better.

Is there a way to make it so that enemies cannot climb the ladder?
Should be easy enough... Just need to add an additional bit of logic to the isMonster check.

I'll probably just add a boolean that can be set via UDMF properties on a case-by-case basis, with an associated property so that a separate "no monsters" version of the actor can be created easily if wanted.
User avatar
Enjay
 
 
Posts: 26536
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: Ladders: the best method?

Post by Enjay »

At the risk of being cheeky and asking you support outmoded technology, any chance you could make a version that could be used with ZHexen format? If not I'll understand.
User avatar
RockstarRaccoon
Posts: 598
Joined: Sun Jul 31, 2016 2:43 pm

Re: Ladders: the best method?

Post by RockstarRaccoon »

AFADoomer wrote:I'll probably just add a boolean that can be set via UDMF properties on a case-by-case basis, with an associated property so that a separate "no monsters" version of the actor can be created easily if wanted.
RockstarRaccoon wrote:If it's ACS or a special, just don't tag it as letting monsters activate it.
Enjay wrote:any chance you could make a version that could be used with ZHexen format?
...Look at the title of my ACS script. What do you think I plan to do with this?

.....Or is ZHexen the name of some heavily outdated program I don't remember?
User avatar
Enjay
 
 
Posts: 26536
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: Ladders: the best method?

Post by Enjay »

Sorry, I was unclear. ZHexen was on my mind but I actually meant the ZDoomHexen map format rather than UDMF. If AFADoomer's ladder requires UDMF specific properties, it can't be used in ZDoomHexen format maps.
User avatar
RockstarRaccoon
Posts: 598
Joined: Sun Jul 31, 2016 2:43 pm

Re: Ladders: the best method?

Post by RockstarRaccoon »

Right. Mine is compatible with Hexen Format so far.

Why would you use Hexen format and not UDMF though? I seem to remember you even being in on the UDMF threads with me and Pascal and all them back in the day...

Edit: looking back at the Doomworld, I don't see you there... I guess I misremembered you being a proponent of UDMF back when it was first adopted...
Why do you want this for a non-UDMF format? I'm not going to break non-UDMF support on purpose, but I'm kind of of the opinion that other formats should be discouraged: UDMF is a standard community format with virtually limitless potential.
Last edited by RockstarRaccoon on Thu Apr 13, 2017 6:48 pm, edited 1 time in total.
User avatar
Enjay
 
 
Posts: 26536
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: Ladders: the best method?

Post by Enjay »

Because I still use DeePsea as my main editor and it doesn't support UDMF. I'm slowly trying to make the transition to GZDB but I know DeePsea so well that it's frustrating. When I try to work with GZDB, I repeatedly find myself trying to do something that I know will almost certainly be possible but I'll be damned if I can find the option to do it, versus hitting the shortcut keystroke and moving on in a couple of seconds in DeePsea.
User avatar
RockstarRaccoon
Posts: 598
Joined: Sun Jul 31, 2016 2:43 pm

Re: Ladders: the best method?

Post by RockstarRaccoon »

Enjay wrote:Because I still use DeePsea as my main editor and it doesn't support UDMF. I'm slowly trying to make the transition to GZDB but I know DeePsea so well that it's frustrating. When I try to work with GZDB, I repeatedly find myself trying to do something that I know will almost certainly be possible but I'll be damned if I can find the option to do it, versus hitting the shortcut keystroke and moving on in a couple of seconds in DeePsea.
Oohhh......

You know, after working on all that crap with Pascal in the late 2000s, I know Doom Builder pretty much inside and out. I might be able to help you learn it, if you'd like to sit down with me. I can't say I'm experienced with DeepSea, because when I was starting out, DoomBuilder seemed clearly superior, so I don't really know what's different, but you should really consider switching, especially with GZDB's mind-boggling new features: some of the stuff it does now would've wowed me back in the Boom days...
User avatar
Enjay
 
 
Posts: 26536
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: Ladders: the best method?

Post by Enjay »

It's usually the little frustrations that get me. Like, I dunno, realising that I want to X-align all the textures on some linked walls but it's important that one particular wall somewhere in the middle has a particular offset and that needs to be used as a reference for the texture offsets on the lines either side of the critical one. I can do that in a few seconds in DeePsea, it would take me ages to figure out in GZDB. Hell, once it even took me ages to figure out how to split a line in half. Even editing the properties of a thing takes me too long in GZDB because the dialogue is unfamiliar to me. :lol: It's not a fault of the program, merely that I'm used to something else.

I know that GZDB is a good editor and that it gives access to loads of new features (and, yes, when I compare it to the really old programs like DEU etc it's a world away and far beyond what I could have imagined back then). I will have to get up to speed with GZDB sooner or later. However, I can't really say that there is any one particular thing that would help other than practice and increasing my familiarity with where all the various things are in GZDB. Unfortunately, that takes time and that's something I'm very short of. So, if I want to do a bit of mapping, that's what I want to do and I don't want to spend the time learning a new program. Thanks for the offer though - I appreciate it - and if I do identify anything in particular that I need help with, I know who to ask. :)
User avatar
AFADoomer
Posts: 1335
Joined: Tue Jul 15, 2003 4:18 pm
Contact:

Re: Ladders: the best method?

Post by AFADoomer »

Enjay wrote:At the risk of being cheeky and asking you support outmoded technology, any chance you could make a version that could be used with ZHexen format? If not I'll understand.
Updated version here.

In UDMF you can set the monster climbing on a per-actor basis by going to the Ladder actor's 'Custom' tab and adding a new boolean named "nomonsters" and setting it to "True".

In Hexen format, you'll have to create a new actor with the "LadderBase.DisallowMonsters" property set to "True". (Sample below is also commented out at the bottom of ZScript.txt in the .pk7)

Code: Select all

class NoMonsterLadder : LadderBase
{
    Default
    {
        LadderBase.DisallowMonsters True;
    }
} 
Decorate should work, too.

Code: Select all

actor NoMonsterLadder : LadderBase
{
    LadderBase.DisallowMonsters True
}
Obviously, the ModelDef entry and the MapInfo DoomEdNum entry would need to be updated as well... Or, if you don't want monsters climbing any ladders, just change the property on line 24 in ZScript.txt to "True" and use the ladders as-is.

Any model can be substituted in, as long as the *top* of the ladder is at the origin, and you adjust the LadderHeight property to match the world unit height of your model. You could also change the sprite and set this up as a flat sprite, or change the sprite to TNT1 and just use this actor paired with a wall/mid texture, again adjusting LadderHeight as appropriate in all cases.
User avatar
RockstarRaccoon
Posts: 598
Joined: Sun Jul 31, 2016 2:43 pm

Re: Ladders: the best method?

Post by RockstarRaccoon »

That's cool. You mind if I package that in a library?
Nash wrote:ZScript is already out. It's an official feature since GZDoom 2.4.
To be clear, I meant the upcoming player-movement feature of ZScript.
User avatar
Nash
 
 
Posts: 17450
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: Ladders: the best method?

Post by Nash »

AFADoomer wrote:In UDMF you can set the monster climbing on a per-actor basis by going to the Ladder actor's 'Custom' tab and adding a new boolean named "nomonsters" and setting it to "True".
Wait, user UDMF variables without the "user_" prefix are allowed? How are you doing this? GZDB forces the prefix on me everytime I add a custom variable. :O
Locked

Return to “Editing (Archive)”