Zdoom Decorate Theif-like mantling
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.
Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.
Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
- caironighttime
- Posts: 3
- Joined: Sat Oct 21, 2023 5:37 pm
- Preferred Pronouns: He/Him
- Graphics Processor: nVidia (Modern GZDoom)
Zdoom Decorate Theif-like mantling
I'm working on a survival horror TC, and I'm wondering how I would add Thief-like mantling. Help would be greatly appreciated! 
Re: Zdoom Decorate Theif-like mantling
Could you show footage of Thief's mantling in action?
I have some ledge mantling code, but it's in ZScript and I am unsure if it could be replicated in DECORATE.
Just put this code into your player's class and it should work.
I have some ledge mantling code, but it's in ZScript and I am unsure if it could be replicated in DECORATE.
Just put this code into your player's class and it should work.
Spoiler:
- caironighttime
- Posts: 3
- Joined: Sat Oct 21, 2023 5:37 pm
- Preferred Pronouns: He/Him
- Graphics Processor: nVidia (Modern GZDoom)
Re: Zdoom Decorate Theif-like mantling
Sure can do. Go to 7:13 on this video https://www.youtube.com/watch?v=FO6k0u5 ... sFPSCorner
- Sir Robin
- Posts: 537
- Joined: Wed Dec 22, 2021 7:02 pm
- Graphics Processor: Intel (Modern GZDoom)
- Location: Medellin, Colombia
Re: Zdoom Decorate Theif-like mantling
nice! I might use this in my mod, thanks for posting.
Personal peeve, you can't use weapons while mantling.
untested:
Code: Select all
Override void Tick(){
Super.Tick();
LedgeClimb();
}
weapon PostClimbWeapon;
bool wasClimbing;
void LedgeClimb(){
If(player.cmd.buttons&BT_JUMP){ //If player is holding jump, execute the code
FLineTraceData h, i, j;
LineTrace(angle,24,0,TRF_THRUSPECIES,height+8,data:i);
LineTrace(angle,24,0,TRF_THRUSPECIES,height-4,data:j);
If(i.HitType==TRACE_HitNone){
For(int tall=16; tall<=height; tall+=8){
LineTrace(angle,24,0,TRF_THRUSPECIES,tall,data:h);
If(h.HitType==TRACE_HitWall){ //Check if mantling is valid
int zspd = 0;
If(j.HitType==TRACE_HitWall||player.cmd.forwardmove>0){zspd=2;} //If player is moving forward, climb up, otherwise stay in place
Else{ViewBob=0;}
vel.z=zspd;
player.jumpTics=-1;
if (player.readyweapon) PostClimbWeapon=player.readyweapon;
player.readyweapon=null;
if (player.pendingweapon && player.pendingweapon != wp_nochange) PostClimbWeapon=player.pendingweapon;
wasClimbing=true;
}
}
}
}
if (wasClimbing) player.pendingweapon = PostClimbWeapon;
wasClimbing=false;
}
-
taniyuki
- Posts: 1
- Joined: Sun Nov 05, 2023 8:43 pm
- Preferred Pronouns: She/Her
- Operating System Version (Optional): Windows 11
- Graphics Processor: nVidia with Vulkan support
Re: Zdoom Decorate Theif-like mantling
I believe in youcaironighttime wrote: ↑Sun Oct 22, 2023 8:35 pmSure can do. Go to 7:13 on this video https://www.youtube.com/watch?v=FO6k0u5 ... sFPSCornerJarewill wrote: ↑Sun Oct 22, 2023 6:03 am Could you show footage of Thief's mantling in action?
tiny fishing
I have some ledge mantling code, but it's in ZScript and I am unsure if it could be replicated in DECORATE.
Just put this code into your player's class and it should work.Spoiler:
