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"

Multiple selection by mouse cursor

I wonder how to make multiple selection by cursor. I ve made simple line trace which alows me to select single object,(anyway I am using mouse overlap events instead). Now I am trying to make some sort of box using mouse which allow me to select few units on map, I were trying smth with muli box trace but i dont know how to convert my camera location and cursor location for parameters to this function. Any solutions ?

Product Version: Not Selected
Tags:
more ▼

asked Dec 26 '14 at 12:22 PM in Blueprint Scripting

avatar image

Zwolejo
28 3 4 6

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

1 answer: sort voted first

Hey, look at the Answer of this Question. He gave a pretty good example on how to achieve this.

He converst the 3D Space to 2D and checks if the positions are inside the retangle. You can see all his Blueprints and a small Code snippet for the test in his answer:

https://answers.unrealengine.com/questions/21827/box-selection-of-actors.html

If you don't want to code, you can make his C++ function in Blueprints too. Just some branches that check if a number is higher or lower than another.

If you need help, just ask me (:

more ▼

answered Dec 26 '14 at 01:36 PM

avatar image

eXi
6.8k 333 185 470

avatar image Zwolejo Dec 26 '14 at 01:55 PM

Hey, thx for reply. It looks pretty difficult. I ll try to achieve it only with blueprint, be cause my license for visual has expired ... Anyway, didnt they made it open source with .NET?

avatar image eXi Dec 26 '14 at 06:38 PM

Visual Studio shouldn't be off for you. The 2013 Version is free to you as a UE4 Subscription Member or not? :X

It's not that difficult. Most of it is Blueprint already and you just need to check the C++ code and "convert" it into Blueprint.

Just make a Function in your Hud Blueprint and call it

"is2DVectorInRectangle". Give it 3 Inputs. All 3 should be Vector2D. Then you create 2 Variables call min and max or something like that that are also Vector2D. The rest can be seen in the C++ Code. As you see, C++ is nearly the same as Blueprinting (:

avatar image Zwolejo Dec 26 '14 at 08:33 PM

I downloaded some trial version of visual. Now I am trying to find some key for visual at my unreal engine account, but i dont see any option for that. Maybe student license dont allow visual studio.

avatar image eXi Dec 26 '14 at 09:48 PM

No, normaly is should be available for you. Please contact the Epic Games Staff (keep in mind it's winter holidays) and ask why you can't use VS anymore.

avatar image Zwolejo Dec 27 '14 at 07:59 PM

One more question, maybe you know is there any problems for for each loop when array is empty? I saw many people before for each loop checking if array is not empty, why ?

avatar image eXi Dec 27 '14 at 10:43 PM

Yes. Imagine you want to use something from the array element. Like the actor location. If there is no actor, you will get an error. Maybe it won't start the for each if the array is empty, but it is a gopd practice to always make sure that you are not trying to work with a null pointer.

(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