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"

Copy a blueprint with unique references

Hello guys and gals, i have a really annoying problem with some pretty basic blueprinting, but my brain is drawing a complete blank, so i hope someone here can give me quick rundown of what i am doing wrong!

I have created blueprints for seperate objects that store points and damage (in some cases), i thought i could simply drag and drop the blueprint into the level to have the same behaviour manifest for each of them (feel like i have done that before)

But it seems like it does not like referencing a spesific object, or in other words,

If i roll over a copy of my 50point sphere, it only affects the original (hides the actor and respawns in a while, while the copy does nothing)

I really like the effect the current setup is giving me, so if there is a way to copy this blueprint around, that would be awesome!

I am guessing i have either forgotten something vital, or done something really stupid.. Please help me out if you can :')

Thanks in advance

alt text- Niku

Product Version: UE 4.21
Tags:
problem-2.png (630.5 kB)
more ▼

asked Feb 03 '19 at 07:33 PM in Blueprint Scripting

avatar image

Niku-zan
7 1 1 4

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

1 answer: sort voted first

your script here is showing the level bp which references specific actors in the level. so if you want a overlap event for each of the points gold you would need to create the script for each one. obviously this is not a good way to do things. it would be much better to implement the script in the pointsgold actor itself, so then when you copy the actor it will already have the functionality it needs.

below is an example of how you should implement your actor. basically create your pickup actor (goldPickup in my case), then add the needed components (mesh and such). then for the script you just need to make things in a way where you dont need to reference specific actors but rather classes. so on overlap we first check to make sure the object is visible as per your script. then we see if the overlapping actor is of the players class by casting to identify it, this could also be done using the get player character node and the ==(equal) node. then since we have a reference to the character we can get the values stored within it, which also means we can add to the coins variable or whatever else you want to do.

doing things this way allows you to create as many of the coin spawns as you like and you never have to recreate the script or reference a specific actor in the level. its much easier, simpler, and performant.

alt text

capture.png (189.2 kB)
more ▼

answered Feb 03 '19 at 08:10 PM

avatar image

ThompsonN13
10.1k 33 10 25

avatar image Niku-zan Feb 03 '19 at 08:36 PM

Thanks a lot, tried something like it in 50 different ways, but this helped out a lot! Thanks mate :)

(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