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"

how to check object reference??

hi everyone I am trying to make a battle royale game (similar to fortnite) and have an inventory with 1 item (I know I know it's not much but I plan to add more in the future) any way I need a way to check if the item the player picked up is the assault rifle (the only item in the game atm) but have had no luck with getting it to work (see image below for more details of the blueprint script) I have tried with checking if the object is = to the assault rifle and if so destroy the actor and if not than print a string but it just prints the string even though the actor placed in the world I am trying to pick up is the assault rifle (I say this because the assault rifle has a parent class called "item")

Product Version: UE 4.19
Tags:
more ▼

asked Jun 05 '18 at 07:54 AM in Blueprint Scripting

avatar image

Chad_kroeger2005
25 1 5 11

avatar image Chad_kroeger2005 Jun 05 '18 at 07:58 AM

sorry I forgot to add the image here it is (the second one is the first part of the script):

alt text

alt text

screenshot-4.png (248.0 kB)
screenshot-5.png (264.1 kB)
avatar image Chad_kroeger2005 Jun 05 '18 at 08:27 AM

never mind I got it working :)

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

1 answer: sort voted first

Never mind got it to work all I did was get the variable for my structure then broke it so I could access the class variable and then checked if that was = to the assault rifle class :)

more ▼

answered Jun 05 '18 at 08:37 AM

avatar image

Chad_kroeger2005
25 1 5 11

(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