Unrelated objects offecting my player bp ( please read)

Hi all.Not completely sure that this is the right place. Since i usually avoid asking questions here. But… I have a strange problem and have no idea where to start. I have a lift object .When the player is in range of this object i enable input. The player can then ride this lift up and down with the S+W keys.Pretty standard stuff.When the player leaves the range of the lift (collision box) I disable input for the lift object. My player can then control the character as normal. So my problem arises when the player chooses to not ride the lift/elevator all the way too the ground. If the player gets off before this . He can no longer walk up slopes. I have a system in place where if the player is on a slope and holds the s key .It temporarily sets the walkable slope angle to around 10.This gives me an easy way to have the player slide down slopes . When s is released the walkable angle is set back to 45…This works perfectly…Unless the player decides to jump off of the elevator at the start of the level… This is a difficult problem because it also does not always happen as shown in the video…There are zero variable refernced between the lift and tha player and i am stumped as how to fix the issue Please watch the video to understand my issue .Thanks all https://youtu.be/VvVSIRGKEFY

For a problem like that we need to see the code first. For elevator and slope key.





Please ignore the mess.I am yet to tidy things up…I should mention that this is in unreal 4.27

First, this is useless:

Next, don’t do this:


image

To the problem
I don’t think the elevator is the problem. Make prints on press and release.

Wow…I have no idea what i was thinking…Its been a while since i even looked at this as i have been working on other things…I have zero idea as to why i would be calling an offset of zero…Once let alone twice… I will go and fix all these stupid mistakes and get back to you.Thanks for pointing these out .


Not sure casting on tick is a great idea also… But im sure you will tell me :stuck_out_tongue:


This also does nothing.

Have you tried the print test?

Sorry no not yet.I wasnt completely sure what you wanted me to print …Also the code breaks when i remove the disable input node you mentioned .It is used to disable input when the lift reaches the bottom .If the one way? bool is correct.

Print nodes here:

Strange…

If it doesn’t player can just go back up?

Yes if i remove that node the player can ride the lift back up
Let me rephrase that…The player can go up and down at leisure …But once it has reached the bottom i wanted the player to be stuck.Hence the disable input node
The print is saying pressed and released as it should

Even when you can’t go up the slope?

The slope issue is a strange one .It does not always happen and seems random .But the only thing that effects the ability to use slopes is whether or not the elevator has reached the bottom or not.
.

Sorry i misunderstood i will check now.

Yes when the bug is triggerd pressed and released is still printing as it should…Also i was wrong…The bug triggers randomly depending on how far you travel on the lift.But when at bottom is triggered the bug goes away…

Mmm. Try to disconnect Add force feedback.

Will try now https://youtu.be/h4M77vHM7A0

Unfortunately disconnecting the force feedback didnt fix it …I am sure this is not a bug with unreal engine as when i started making this game i was even more clueless than i am now . And its likely something stupid i did…You saw my “code” lol

I saw on 0:31 print pressed when you steped in elevator, after that bug triggerd.
If you press the button and disable input, button will get stuck.

Your right!!!Thank you…So i tend to hold down when stepping onto the lift…The lift goes down but released is not triggering…So The player is constantly pressing down .Now to fix it

You can remake it from action to axis.

Yes simple fix thank you…And thanks for your patience i am not the smartest guy .people like you help a LOT!! thanks

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.