So i have the player character, which is from the ball demo, the player character has an item that can be dropped when pressed q.
The goal is to allow the player character and the item to activate a trigger.
I can get the player character OR the item to activate the trigger but not both.
First i fiddled with physics and collision and couldn’t make that work, so i checked for this with blueprints.
One thing i tested was:
inside the trigger actor bp
on begin overlap> cast to player > set boolean 1 > cast to item > set boolean 1
on end overlap> cast to player > set boolean 0 > cast to item > set boolean 0
on both cast nodes i set the object reference pin to the on begin overlap & on end overlap´s other actor pin
Sadly that didn’t work either.
Any help would be greatly appreciated on this topic.
Use “AND” Boolean. On BeginOverlap check if OtherActor is equal to PlayerCharacter AND is equal to Item then use a Branch. The True of the branch will never fire until both conditions are fulfilled.
Well i deleted the last set up since of course it didn’t work. I tried your way, and this is how i wanted it, to have both the actor and pawn connected into the actor pin.
Ego Studio
Iam not getting a response cus i’m missing something and i’m sure you’ll point that out to me
I didn’t know the other actor pin means i MUST connect the player as well to that pin else nothing works.
You should connect GetPlayerCharacter or your Character Reference and the Item Reference to the Equal (Try not select asset directly). You should have the item reference somewhere though, like Traced Item or Equiped Item…
the Begin Overlap is called when one of both enters the area and other object will be the object that started overlapping. there is always only 1 object so you cant test if both are overlapping like that. you need to save that on is overlapping and when the other than overlaps you can trigger your button.
sorry, I misread your original question… yes, if you need both of them to be in the trigger volume TOGETHER, an AND boolean is the right option… it looks right to me… run a Print String off the True branch and test it in PIE… are you getting a “Hello”?
Just check that your collision and overlap settings on your Pawn and Trigger Volume are correct
Again same as above i was unsure on how to connect the branch so i tried both ways. And ended up with the same result. The bomb(item) is not activating the trigger.
So i tried changing the collision settings, but no matter what i can’t seem to get the effect i want.
So ill post the current state of the bomb item´s collision setting.
In the clip iam using the cast nodes
When both are set to true, the trigger does not react to player, but reacts to the item actor, though it still thinks the item is on the trigger even if the item destroyed.
when both branches are set to false the trigger responds to the player when its on the trigger. It works as it should, but for the player only. And the trigger does not react at all to the item(bomb).
trying true on one and false on the other just renders the trigger in responsive so it only seems its working still not, if both are true or false.
As for using the equal method iam not getting any response from the trigger. No matter if i connect it from true or false to the timeline.