x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Ladder problems

Hi, I am making a 2d game where the player can place each ladderblock individually. I am using the OnComponentBeginOverlap and the OnComponentEndOverlap to figure out if the ladder is in the player's range, so the player can climb it, and that works, but when I am leaving one ladderblock, my character stops flying. This is because "climb" is set to false when I am leaving the first block. Are there any ways to fix this?

Product Version: UE 4.16
Tags:
more ▼

asked Sep 03 '17 at 10:08 AM in Blueprint Scripting

avatar image

MisterPirate
1 1

avatar image MisterPirate Sep 03 '17 at 10:09 AM

alt text

Here is a screenshot of my Blueprint

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

I have had this problem before as well. What I did was not the best solution but it works. On overlap, cast to player and set a actor variable to self, to show the ladder your inside off, instead of using a bool, do a isValid check to see if your in a ladder. OnComponentEnd, cast to the pawn, and do is Ladder == self, if true, set as null. Basically as you overlap new boxes it changes it so it wont be setting it to false. A better alternative i thought of but never tried, you could make it a ladder actor array. Add to it when you overlap, and remove self when you end overlap. To see if your on a ladder, just see if the array is length > 0. If you use both begin and end overlap to call a custom event, ie CheckLadderStatus, you can do it without using tick.

more ▼

answered Sep 03 '17 at 10:33 AM

avatar image

DanielOrchard
838 17 21 36

(comments are locked)
10|2000 characters needed characters left
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question