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"

OnComponentEventOverLap Not Firing Randomly

Hi Everyone, I have set up a endless runner type of game, and I have set up a End trigger and it will run a blueprint to make new floortile ahead. After adding more function and content in my game, I found out the floortile will randomly not spawn,I made sure all my box collision (EndTrigger) is placed properly and they have been hit. and I also tested in the game with the box collision not hidden in game and paused the game when the Floortiles are not spawning to check, I couldn't find the reason. Sometimes they works just fine, sometime they don't. I do have other object like coins and blocker, are they causing the problem? Is it a bug or is it something I might be not aware of?

FIXED: i made a extremely stupid mistake, I was making a new type of floortile and added a new element in my floortile array and I didn't finish the work during that time and left a NONE in my array, and that's what is causing the missing floortile!

Below are the screen shot of the endlesstrigger (the tall one between tiles). It's a paused game screenshot after the floor stopped spawning and my character fly out :(. Sometime i can keep running for 5 min nothing happened, and sometimes it happens in the first few tiles.

alt text

alt text alt text alt text Thanks!

Product Version: UE 4.12
Tags:
screenshot (2).png (161.8 kB)
more ▼

asked Jul 24 '16 at 03:16 PM in Blueprint Scripting

avatar image

Jacksong
6 1 2

avatar image Marooney Jul 24 '16 at 09:53 PM

Hi there, could you please provide us with some screenshots? Ingame with visible colliders? Would be the first step to make any help possible at all if someone can understand what you do with your triggers :)

avatar image Jacksong Jul 25 '16 at 01:30 PM

I just updated my post the pictures! Thanks for the suggestion!

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

1 answer: sort voted first

Great, so here we go :)

One problem that I have experienced with BeginOverlap is that it does not fire if the collision happens already when spawning in the actor or the colliding object. I guess you spawn a bunch of tiles ahead of the player, so I am not sure if there will be any case where you accidently/randomly spawn an collider on your actor. But just be aware of this.

Just a question about a simpler painless approach: Why do you bother with Colliders at all to spawn your tiles? You know the Location of the player and you know the Location of your last tile. If the difference between both locations is less than a certain limit, you can spawn the next tile :)

hope that helps :) Marooney

more ▼

answered Jul 25 '16 at 01:54 PM

avatar image

Marooney
886 36 8 36

avatar image Jacksong Jul 25 '16 at 02:45 PM

First of all thank you so much for your answer and your time!! I actually just found out i made a extremely stupid mistake, I was making a new type of floortile and added a new element in my floortile array and I didn't finish the work during that time and left a NONE in my array, and that's what is causing the missing floortile! About the idea of the spawning floortile by judging the distance (or floortile number between them), that's such an amazing idea. Sorry I am a beginner and the main skeleton of game is from the Endless Runner Epic tutorial and using Endtrigger is what they did. Anyway thank you so much for your help!!!

avatar image Marooney Jul 25 '16 at 02:56 PM

I'm happy to help :) Please check the answer as solved (on the left side below the arrows) to close this question for the answerhub-system and for people looking for unanswered questions :) thx :)

(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