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 do I clear a variable?

Very sorry if this has been asked before, but I couldn't find an answer.

How do I set a variable to nothing/nil/null/none etc?

Scenario: I set a variable on an actor when it collides with another actor, I want to clear that variable once it's done colliding.

Thanks

Product Version: Not Selected
Tags:
more ▼

asked Apr 20 '14 at 05:07 PM in Blueprint Scripting

avatar image

AH_Rob
16 2 3 7

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

3 answers: sort voted first

You can try to set the variable without an input parameter ?

more ▼

answered Apr 20 '14 at 05:19 PM

avatar image

Eddy71
76 7 11 21

avatar image AH_Rob Apr 20 '14 at 05:33 PM

haha, yep, that was it. Simpler than I thought!

avatar image axelZellalex Jun 11 '14 at 09:49 PM

hey guys this didnt work for me im calling Set variable, and passing nothing but it wont work... am i missing something ?

avatar image Steve Allison STAFF Jun 11 '14 at 10:14 PM

What type of variable are using?

avatar image axelZellalex Jun 13 '14 at 07:04 PM

im trying to set a reference to a Volume to None

avatar image samnater Jul 10 '16 at 08:55 PM

Worked for me! Intuitively intuitive

avatar image nathan.s.giroux Aug 06 '16 at 12:34 AM

Precision: you need to connect an empty 'make array' node to the set array variable

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

This is an old thread but since there must still be some people here looking for answers, there is a workaround for this.

I'm guessing the problem lies with Actor references or something along those lines. The first answer from this thread was partly correct. When trying to clear a reference, you should set the variable without an input. This does clear the variable. But not entirely. There are still some traces left, for example the coordinates get reset to 0, 0,0.

To counter this, make a branch, type "==" and get the Equal(Object). Leave the select asset clear and the branch should be able to tell if the variable is in fact empty or not.

Good luck guys, this worked for me, hopefully for you guys too!

more ▼

answered Jul 17 '18 at 08:39 PM

avatar image

TheHatchling
6

avatar image somethingstarted Dec 30 '18 at 09:48 PM

whoa. that's a really friggen good idea!

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

Have one volume variable you use to store your volume. Then have another volume variable that is never set to anything. Us the second variable to set the first variable to None.

more ▼

answered Jun 13 '14 at 11:28 PM

avatar image

Zeustiak
1.8k 131 68 110

avatar image axelZellalex Jun 14 '14 at 09:11 AM

that doesnt sound very good should i raise a request to have a None variable?

avatar image flim Feb 15 '16 at 03:20 PM

I would like to know how to clear a reference variable too.

(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