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"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

How can I create a pick up system where you have to pick up both objects to continue?

Hey i have been looking at this for hours to no success, what i want to do is create a kind of pick up system where, you have to pick both objects up to be able to continue, alt text

here i have it so that went it's interacted with it destroys itself and then switches the bool to true, meaning it's been picked up, and that works all fine

my problem comes in when i try to check that both bools are true and then active an action off it, in the level blueprint this is what i have alt text

i have referenced both of the blueprints to the level blueprint and gotten hold of the bools from both and checked them, but i seem to be getting the "Accessed None 'Pickup1' from node Branch in blueprint Leak

Leak is the name of the blueprint for the level, it also does the same for Pickup 2 and after reading other questions with the same problem i am still unsure what is causing it

Any help would be amazing, thank you very much!

Product Version: Not Selected
Tags:
more ▼

asked Aug 04 '14 at 04:31 PM in Blueprint Scripting

avatar image

Calcorso
5 5 8 9

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

2 answers: sort voted first

Hi calcorso,

Your original plan should have been able to work, the problem is that you were setting the boolean value after the destroy actor. In Blueprints, once you destroy an actor all functionality stops at that moment, so your bool was never getting checked.as true.

more ▼

answered Aug 05 '14 at 05:33 PM

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

It means Pickup1 varable is not set and empty when it was called to get bool, do checks if Pickup1 is set... also set Pickup1 if you not doing that. You can get anything from nothing

more ▼

answered Aug 04 '14 at 05:45 PM

avatar image

Shadowriver
36.6k 930 169 1111

avatar image Calcorso Aug 05 '14 at 03:09 PM

I kind of understand what you are saying, but if Pickup1 is a reference to the blueprint of the object why is it not able to pull the information from the blueprint? and if you can give an example of how i can set it that would be amazing

avatar image Shadowriver Aug 05 '14 at 03:37 PM

Blueprint is a class not object, it needs to be instantiated, you do that by spawning, in spawn node there is "Return Value" output which returns refrence of spawned object and you can use it to set that varable. There also node to find object on the level (forgot exact name), i return array of all objects on the level of specific class.

avatar image Calcorso Aug 05 '14 at 03:49 PM

I don't know if English is your first language but it's a little hard for me to understand you, but you have no idea how much i appreciate the help! so this might be a little pain asking you lots of questions, my first one is, How do i get to this in spawn node, it's not something i have seen by searching spawn, is it the same as the "Get Class"?

avatar image Shadowriver Aug 05 '14 at 04:03 PM

"Get Class" return class identifier (purple color) not object (blue), theres SpawnActor node, if you dont see it in context menu search it in library tab which has list of all nodes. But considering you never used spawn actor, means you already has those objects in he level, so you need to use "Get All Actors by Class" which will return array of all objects on the level of specific class. Also how "Interact Pickup" works? maybe system you made there have a way to get object of interacting pickup

I think easier for you is to do things in opposite way, make pickup effecing the character instead of character communicating with pickup, this way you can make more compact code and item code decides how it works.

avatar image Calcorso Aug 05 '14 at 04:08 PM

alt text

well when the trace hits the object, it finds out if it's attached to the interact interface and if it is it will trigger the event on the object causing the bool to change and be picked up

avatar image Shadowriver Aug 05 '14 at 04:18 PM

So maybe do this way, on interact pickup sends itself (Self node) to character that interact with him, character then sets that pickup in inventory and then it can send some "Use" function to pickup. Then pickup according to his code modifies the character.

Interaction can be done in base class in which all pickups would be based on (best would be if you used normal casting instead of interfaces, if you set pickup to variable of pickup class you don't need to use interfaces anymore), so interaction code will be the same for all pickups, just they will have custom use function (or event) which you can use to activate the pickup.

avatar image Calcorso Aug 05 '14 at 04:38 PM

I think this is just confusing me now aha, but i managed to get it to work using this method ( they are just random locations i picked) Thank you for your help though! alt text

(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