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"

Array Remove Item not working when trying to remove self?

I am trying to remove an item before I destroy it. I am holding an array in the game class and I am using and interface to access that array. When the items health is gone I want to remove it from that array using remove item. I am passing in the array from the game interface (it seems valid from debugging) and then passing in a self reference. Neither find item or remove item seem to be working even though I know the actor is in the list. Any help would be appreciated.

Product Version: Not Selected
more ▼

asked Jul 09 '14 at 05:05 AM in Blueprint Scripting

avatar image

1 1 2 1

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

1 answer: sort voted first

I don't think self is going to help you. It will call the blueprint, but not the exact actor that is spawned in the game. You need that spawned actor's object reference which you can gain as you spawn it, with a trace, etc.

more ▼

answered Jul 09 '14 at 10:17 AM

avatar image

1.8k 131 68 110

avatar image Venan Jul 11 '14 at 06:49 PM

Yeah interestingly enough I made a variable called Me in the blueprint that was of the type of the blueprint and set it to self. If I compare that variable in the arrays it finds it. I don't know if that is a good way to do it but it works.

(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