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"

pickup item after event

I am working on a game in third person template. i want to talk to a character using widget blueprints and then i want to be able to only pick up items once finished speaking to that character. could someone please explain to me in simple terms of how to do this and which graphs and nodes to use?

Product Version: UE 4.20
more ▼

asked Apr 14 '19 at 12:13 AM in Blueprint Scripting

avatar image

13 1 1 3

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

1 answer: sort voted first

it kind of depends on how your doing your pickup interaction. for a basic system where you have a interaction like overlap item, press a input key, key calls event in pickup, then you would just need to insert a check before running any script past the key input. so for example you would have: input event E -> get bool variable (named CanBePickedUp?) -> branch -> if true execute pickup script, if false do nothing. then all you would need to do is to have your npc have a reference to the pickup item and set the variable to true once the player has talked to them. for this part i would either have a public variable in the npc or you could do that part in the level bp where references are easy to get.

more ▼

answered Apr 14 '19 at 12:30 AM

avatar image

10.1k 33 10 25

avatar image Alyssa.K1986 Apr 14 '19 at 03:27 AM

i still dont understand have you got any images to help out

avatar image ThompsonN13 Apr 14 '19 at 05:14 PM

which part do you not understand? it would help me to explain if i know which part you dont get. it also would be good to know how your handling pickup interactions. it seems like you want someone to do the work for you and make you a step by step instruction on how to do it, even if i wanted to do that you didnt really give the information needed to accomplish such an endeavor.

the idea i presented was pretty simple broad use case example, but the main idea is you have a value either true or false (a Bool) stored in the pickup item. then when you go to pick up the item you check the state of the value, is it true? if yes then i am able to pick this thing up, if no then i cant pick it up so i dont do anything. its basic logic, like a choose your own adventure book (do you: go to crystal lake for the summer -> if yes your gonna have a bad time -> if no have a great summer and live a long time (friday the 13th reference)).

avatar image Nebula Games Inc Apr 14 '19 at 06:23 PM

If the items have to exist before talking to the NPC you could always use an interface and have the interface set collision enabled once the conversation is over. (Assume default collision is disabled on the objects). If not you can always spawn in pickup items after the convo. If like ThompsonN13 is saying and you want to use "E" or some input to pick up the item a boolean would work great for that in front of a branch node that checks if the convo occurred or not. Many ways to skin a cat, screen shots of what you have so far would be helpful.

(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