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"

Overlap Collision

Hey, i need help with the blueprint here: alt text So first of all: when a player enters the Collision Sphere then the Command is sent to all Players and the server. So i checked if the "Other Actor" is the same as the Controlled Pawn (i found it on a differed thread). That way worked well when i wanted to show a widget only on the Characters that are acutally inside the Sphere.


My Problem here is that when Player one enters the Collision the Object gets Destroyed but when Player two enters the Collision first, nothing happens. Can someone help me?


alt textalt text

Product Version: UE 4.20
Tags:
1.png (147.6 kB)
2.jpg (91.5 kB)
3.jpg (105.7 kB)
more ▼

asked Feb 16 '19 at 03:16 AM in Blueprint Scripting

avatar image

xXKrusty_
7 1 1 5

avatar image xXKrusty_ Feb 16 '19 at 03:23 AM

since player 2 can destroy the actor when "Get player Controller" is set to 1 i could just check with a Branch, but is there a more efficient way?

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

This won't work because you are always checking the overlap against player controller "0". In a multiplayer game you would have multiple controllers, so for it to work with player 2, you would need to set player controller to "1". But then it won't work with player 1 (controller 0). What you should be doing, is destroying the object based off of the "actor" overlap not the controller. So instead of checking if the overlap is the pawn controlled by a controller just check if it's the "pawn" directly. So cast to "pawn/character" class and be done with it. Forget the controller stuff.

more ▼

answered Feb 16 '19 at 06:23 AM

avatar image

Nebula Games Inc
5.4k 28 9 14

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
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