On Overlap Help.

Ok, the stuff is actually working properly, but I’d say probably the problem is that all your burgers also touch, and will also fire off overlap events. This small detail I think is the problem in your chain of events.

So, this is pretty easy to deal with, with collision channels. You set it up so the stove can overlap the burger, but nothing else can, not the player, not even other burgers and nothing else you add in later.

Go to your Project Settings → Collision… create a new Object Channel. Call it Burger, if you like, or whatever. Keep Default Response as Block. After this you can go through all the presets and set the appropriate behaviors. For example on the BlockAll preset you want burger to Block, but on Pawn you want it to Ignore. So just go through them and set them up logically what behavior you want.

With this channel created you can now on your burger collision sphere, switch to Custom collision settings and set it up so Object Type is Burger, and in the Responses list set Burger to Ignore. So this will make so burgers will ignore other burgers. Then on the stove trigger box, you can also switch to Custom, keep the default Object Type as is, but in the Responses, set Burger to Overlap. And if you did the presets correctly, burgers should also ignore your pawn already, because your pawn should be using Pawn preset. Just double check it.

So, you don’t need to cast, you don’t need to branch, nothing like that, the objects are essentially “sorted” purely by what they can overlap with, meaning, any overlap event is valid, because it can only overlap correctly. So, no unexpected overlapping events.

Hope this sorts out the problem for you… it should… that’s how I deal with special object collisions in my game and it works out perfectly and does keep things much simpler. If you sort out overlapping at the base, with a channel, then you don’t need to sort things out later, which is always easier to deal with and cheaper to process.

Ok, I did what you said but. It still does the same thing as mine some times. It works once then does not work for the others. And sometimes when i put one on there to cook it cooks ones that are not even on the grill. What did i do wrong?. Here is another video.

Hello,
If you used same blueprint as before, i wonder if trouble could not be in bool off stove. As it is for any burger event. It can’t knows which one has been started finished. And maybe some reset needed don’t happens due to multiple overlaps.
Maybe storing overlaping burger in an array when overlap, then do your event “burnt” in a separate function. And if a new one overlap occurs, check array. If this is a new one, register it and launch function for it. Then all would be separate. (and remove from array on overlap end)
And be sure that event in stove are not locking all actions.

Then you have maybe something else going on not visible through your videos or screen shots. Can’t really guess what it could be either.

At this point, I just don’t know. What’s happening with your setup, doesn’t make complete sense. Really not sure where it’s going wrong for you. Unless the collision channels is not set up correctly and that’s a possibility I guess. Did you go through every preset and set it up?. Maybe you should set it to ignore everything on all the presets, and then just in custom settings, directly on your stove and burger, set the correct settings.

Other than that, it doesn’t make sense, unless something else is going on not visible in your videos or screen shots. But I can’t even guess what it could be. With this kind of thing, I really need to sit and physically look at it to see what’s going on. I don’t know blueprints or UE4 for that matter, well enough to just know everything that might be going wrong. I have to track it down. Having no idea what you did from scratch, when you started, it’s kinda difficult to track such a weird problem. It’s probably something simple somewhere, I just can’t guess it… :slight_smile:

This shouldn’t be a problem if the blueprint is self contained. I’ve asked before if the blueprint is on the burger and he said that it is, in which case, you won’t need to use array. The burger can only trigger itself.

Ive never really used arrays how do i set one up?. Also The “OffStove” Bool is to cancel everything when its taken away from the collision. So if you put the burger on the stove and it cooks to normal then you take it off it will not continue to burnt.

If all is now set in burger, sure array is not needed. But i wonder if all is set in burger blueprint and not a part in burger and another part in stove.

All of it is set in the stove. I was having to much trouble with the other way. Ill post a picture of the blueprint again. But i think you may be right about the Bool. Because if im not careful placing these burgers and they get off the stove or bounce to high then it wont cook at all until i restart the game. So how can i fix this with an array.? I have not really ever used them can you tell me how to do it.? But i’m going to bed now so i cannot respond until tomorrow ;/.

I suggest you make the burger blueprint and not stove, because it is the “burger” you want to change, not the stove. It’ll be much easier to set up. All my previous advice is based on the fact that you use a burger blueprint. The stove is essentially just a trigger.

I totally agree that would be a better and easier way to do. And with a parent where your event “cooked” / “burnt” is stored you could add as much as different cooking items as you want.

Edit : i moved thread to blueprint section as this is a blueprint topic not a content creation one.

Ok i took my grill Blueprint and moved it all to the burger. I took away the casting and put it as the burger collision instead of the stove. Then i did the custom collision. And i’m still getting the same problem as in the video. I put a burger on the grill and it cooks all of them but the one on the grill. Why does it keep doing this?.

Why not “flip” your thinking around?

Put the collision IN your Burger BP. Then in the BP at the start, Cast to the stove and save it as a variable. Then on the collision, with Other Actor “==” to the Stove variable? That way it will only work if it’s overlapping with the Stove variable and as it’s on all the burgers, they should all work independently?

Just my two sense :>

Darn, all this talk of burgers man, Making me hungry!

This is what i got out of what you said. But I’m not sure if i did it right, Its still cooking the ones other than the one on the grill.

Try: Event Begin Play > Cast to Grill > Get Stove Top Box > (Set / promote as local variable)

BeginOverlap > Other Actor > “==” (Bottom input the Stove Top Box) > Print String: Cooking .etc

If not, try instead of using “Collision” creating a trigger volume in the components tab that’s slightly bigger and larger then the burger and using the overlap events from that (Who knows, might work)

In my blueprint above. The “One Overlap (collision)” Is a Sphere Trigger Volume around my burger.And what do you mean by “==” no you mean equal to object?. Here is what i made based on what you said. And i still get the same results

Yeah, you’ve got it right there. But get rid of the string. Plug the red output into a Branch and the code from true. Get rid of the retriggable delays and put normal delays in their place.

Also your New Vars ain’t doing **** at the moment. In your “Variable library”, create a new Variable and search for “Grill” in Variable Type, it should come up with _C at the end or something. Plug THAT into the “Object” of “Cast to Grill” (On the left of the node)

So: Delete “New Var 1” “New Var 2”, Create a variable with variable type: Grill. plug this into the “Object” input of “Cast to Grill”. Then delete the String and the red to pink node. THEN create a branch node and put it where the Print String was. Delete the two delays and replace them with normal Delay nodes. Connect the “True” of the branch to the first delay node.

If it’s too confusing, You could send over the project to contact@kitatusstudios.co.uk and I’ll fix it and post screenshots here for people with a similar problem with the future :slight_smile:

NOTE: If you can’t connect the created object “Grill” to the cast node. Drag from the “Grill” variable output and type in: Get (To see if you can “Get the grill top box”), if not, create a cast node via the Grill variable :slight_smile:

Ok i was able to do all of that. But now nothing is happening and i get a error ill link a picture below.

Right, get rid of the cast and just try to set it “Grill” “Stove Top Box” directly from the “Grill” variable.

(Get “Grill” from the variable Library, right click the output node, type in stove top box and select “Get Stove Top Box”)

If it still doesn’t work, then simply plug the string onwards into false instead of true just to see if there’s a problem elsewhere or it’s this code that’s messing up.

You shouldn’t be calling the “Stove Top Box” from begin play and plugging it into the collision. That’s my mistake - I didn’t explain it well. You should right click the output pin of “Stove Top Box” and promote it to variable. Then use THAT variable with the “Equal (Object)” node instead of from begin play.

But yeah, as another alternative: Try connecting a string “ERROR” into “Cast failed”.

I seem to be doing more damage then good, but I am trying :stuck_out_tongue:

Ok, The error is gone now but it does not work still. I tried to have it connected to true and false but none of those do anything. The error does not event print.

So neither “Cooking” or “Error” is coming up? This seems to be a deeper problem then, as that code is saying “Is this the stove?” No? Then say “Error”.