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 Event Dispatchers / Array and Cast to

Hello everyone, I have a pickup blueprint that dispatches an event wich adds 1 to a variable "score", but the event dispatcher only gets one reference per blueprint, I saw some people using "Get All Actors of Class" but I can't get it to work in any way. Can anyone help me with this?

Product Version: Not Selected
Tags:
more ▼

asked Aug 24 '14 at 11:06 PM in Blueprint Scripting

avatar image

Neil Fallon
19 6 10 14

avatar image Shadowriver Aug 25 '14 at 12:11 AM

you quastion is hard to undrstand, what you exacly want to do? maybe post screens of your blueprints?

avatar image Neil Fallon Aug 25 '14 at 12:30 AM

It's basically a way to create a score system without tons of event dispatchers , because each one only works with one actor

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

1 answer: sort voted first

From what i understand that you have multiple pickup blueprint and each on have it own event to add score. Why don't you create event in Character when any character pickup object, call event your created in Character. You then can pass any extra information if you want, like add 1 or 2 score to Character.

more ▼

answered Aug 25 '14 at 01:39 AM

avatar image

Duncan Dam
3.1k 121 50 164

avatar image Neil Fallon Aug 25 '14 at 01:58 AM

Great idea, but how can I make the overlap specific, what I mean is: when you hit mesh A - you get 1 point and when you hit Mesh B - you die, because my first tought was that every collision would count as the same

avatar image Duncan Dam Aug 25 '14 at 02:05 AM

On your Pickup Blueprint u should already know what type of pick up is it ? So you can specific what type of pickup you overlap and pass that type in when you call event from your Character, in your Character you can sort it out. Or just simply make multiple event in your Character, each one for 1 purpose, like OverlapAddScore, OverlapFatal.

avatar image Neil Fallon Aug 25 '14 at 02:18 AM

Oh I mean how the BP node logic would be when It comes to the overlap, Like how overlap with A would be any diferent than overlap with B

avatar image Duncan Dam Aug 25 '14 at 02:25 AM

Ok here some fast demo:

First, i create a custom event in my CharacterPawn Blueprint do add score

alt text

After that, in my pickup blueprint, when my CharacterPawn ovelap my component, overlap event on that component will fire, Cast Other Actor to CharacterPawn, then call AddScore from CharacterPawn, add any score you want.

alt text

addscore.png (47.6 kB)
callevent.png (63.7 kB)
avatar image Neil Fallon Aug 25 '14 at 02:40 AM

Worked like a charm! thanks man!

(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