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 text

I would like the pickup text to appear above an item based on what item it is. I have an enum set up in the pick up text blueprint but I end up with the accessed none error. I tried the switch on int node for the enum type and get the same error.

I based this on the tutorial for inventory from the official channel but have not had much luck so I'm beginning to think I should start over from the ground up. Any ideas on the best way to go about this?

Product Version: Not Selected
more ▼

asked Jan 10 '19 at 10:28 PM in Blueprint Scripting

avatar image

Tettey Nartey
1 4 5

avatar image ThompsonN13 Jan 10 '19 at 11:02 PM

its hard to tell you what to do without seeing the script and going on so little info. but a access none error is usually the result of trying to get the value of a variable that hasnt been set.

so provide more info, including a description of your goal and its context, some screenshots of your code, and possibly a link to the tutorial.

basically write up something like i want a text component to become visible when i overlap the object and i want the text to read (blah blah blah). it helps us to understand your vision .

avatar image Tettey Nartey Jan 11 '19 at 07:03 AM

Hello ThomsonN13

So this is the pickup Text widget:alt text

I wanted to add a little twist to it, which will lead to a bit of a crazily over thought way to make an inventory

Let me start with the struct.:alt text

So I setup a struct based on that Inventory tutorial from Unreal.

So I thought " What if I put the inventory struct array not in the item itself, but in the enemy character?!" That way, when the enemy is defeated and drops an item or loot bag, and the player walks up to it and pick it up, the list of items shown to the player won't be the contents in the bag, that item bag will just be an object to interact with, while the actual of list of elements within the inventory array being shown will come from the struct variable I had set in the enemy character blueprint! All I know is that I must have the struct variable set in the enemy character. I'm not sure about making it editable; should the template pickup ( I got it from the inventory tutorial from unreal engine) be an actor component or not, etc. Basically, will this idea actually work?

Before I even bother trying to do any of that, I gotta try to break this process down to a more simple basic concept, which is basically having my enemy show my player the values I set in the array I gave it.

First, I wanna try this trick with the pick up text. Almost basically having an enum determined by an enum . Not sure if that's a thing.

Here is the Enum I set for the pick up texts: I used a On Component begin overlap method to bring up the text widget, which allows input from the player to open the lootbag: alt text

alt text

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

0 answers: sort voted first
Be the first one to answer this question
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