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 to create an Item Exchange Area

Howdy everyone, I'm having difficulty figuring out how to make an item exchange zone in my game using blueprints. Here's what I'm attempting to have happen.

Area requires items A & B to Produce C Character drops item A in area, zone receives, destroys the item, and remembers the item that was deposited. Character drops item B in area, zone receives, destroys the item, and remembers that items A & B were deposited. Area spawns Item C for Player to retrieve.

Anyone have ideas on how to best implement this blueprint setup/logic? Thanks!

Product Version: UE 4.14
Tags:
more ▼

asked Jun 01 '18 at 03:10 AM in Blueprint Scripting

avatar image

ChaseV
1

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

1 answer: sort voted first

Fairly straightforward logic for this.

  1. Obviously you need 2 items that can be "collected" by the player

  2. So you would need items that on "overlap" or "hit" etc event will be stored somewhere, could be player character as a boolean or what have you. Could also be physically adding the collectible to the player character like the character now is seen "holding" said collectible etc

  3. You need some "trigger event", this can be an overlap or an input event like "Press E" or something that will register the player is attempting to "deposit" something in the "exchange area".

  4. In the blueprint for the "exchanger" I would have 2 booleans, one for each item you want

  5. After an item is deposited have it change the boolean for item 1 or 2 whichever was deposited to true. Then have it check and see if both booleans are true (both items have been deposited)

  6. If yes spawn item C

  7. If no do nothing

The logic is simple, implementing it is straightforward albeit tedious. There are many ways to go about "implementing" this depending on your set-up. Above is just one way to do it.

more ▼

answered Jun 01 '18 at 11:03 PM

avatar image

Nebula Games Inc
5.3k 27 9 14

(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