Gianluco Posted February 25, 2022 Basically what the title says, I've already tried raising the Gravity to 999, but it has a really weird effect when jumping 0 Quote Share this post Link to post
3 Dragonfly Posted February 25, 2022 (edited) Pretty simple to achieve with ACS and appropriately placed lines to trigger it, using SetActorProperty() to alter the value of the player's Jump height with APROP_JumpZ. Script "RemoveJump" (int preventJumping) { if(preventJumping) { SetActorProperty(0,APROP_JumpZ,0); } else { SetActorProperty(0,APROP_JumpZ,8<<16); } } The script above is a simple implementation of this. When entoring the sector(s) you want the player to no longer be able to jump in, you will need to call the script via a line or an "actor enters sector" thing, setting the preventJumping variable to 1. You'll then need to use the same method on the exits, calling the same script but with preventJumping set to 0. I've included a demo below for you to reference - good luck! preventJump-Example.zip Edited February 25, 2022 by Dragonfly 2 Quote Share this post Link to post
0 Dark Pulse Posted February 25, 2022 You can do it on a whole-map basis via adding NoJump to the map's MAPINFO. If you really only want it to be a specific sector, you will probably need to add more gravity; the default is 800. 0 Quote Share this post Link to post
0 Gianluco Posted February 25, 2022 53 minutes ago, Dark Pulse said: You can do it on a whole-map basis via adding NoJump to the map's MAPINFO. If you really only want it to be a specific sector, you will probably need to add more gravity; the default is 800. I know about the gravity thing, but when you jump with high gravity it has a weird effect 0 Quote Share this post Link to post
0 Dark Pulse Posted February 25, 2022 (edited) 47 minutes ago, Gianluco said: I know about the gravity thing, but when you jump with high gravity it has a weird effect The only way I can think of is to technically have it run as an ACS Script. #include "zcommon.acs" script 1 (void) { SetActorProperty(0, APROP_JumpZ, 0); } script 2 (void) { SetActorProperty(0, APROP_JumpZ, 8<<16); } Rather than set a sector's gravity, you set the lines defining the sector facing towards the player so they trip them with the Script Execute action (80), and then just outside that sector's boundaries, facing towards the player in the opposite direction (i.e; if they were going out of the sector), you do the same. Script 1 defines the sector where jumping is "disabled", script 2 restores the player's ability to jump. Set both sets of lines to be repeatable, to activate when the player walks over them, and to activate from the front side only. Edited February 25, 2022 by Dark Pulse 1 Quote Share this post Link to post
0 smeghammer Posted February 25, 2022 Another option that will simulate it is to have an invisible 3D floor at head height, so there is simply no room to jump. This is OK if you don't need to shoot up of course... 0 Quote Share this post Link to post
0 Dragonfly Posted February 25, 2022 3 hours ago, smeghammer said: Another option that will simulate it is to have an invisible 3D floor at head height, so there is simply no room to jump. This is OK if you don't need to shoot up of course... I'd advise against this. Aside from the obvious potential jank of it, it will also cause more potential lag... Not that it'd be noticeable on most pc's this day. 0 Quote Share this post Link to post
Question
Gianluco
Basically what the title says, I've already tried raising the Gravity to 999, but it has a really weird effect when jumping
Share this post
Link to post
6 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.