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"

Need help understanding which code gets fired first

The question is pretty vague, I hope I can explain this.

My issue is this: I spawn an actor, and set it in a variable. However, even though the custom event which sets the variable plays before a print string, the print string will print "none". However, if I do it again, the print string will give me previously spawned actor.

How do I get the variable to get accessed the first time?

Here is a screenshot. If I need to explain further, just ask:

alt text

Product Version: Not Selected
Tags:
help.png (122.2 kB)
more ▼

asked May 11 '15 at 12:11 AM in Blueprint Scripting

avatar image

vanlacke
1.5k 65 132 103

avatar image Narghile May 11 '15 at 11:05 AM

Can you show your function. I see no OUT there

Narg

avatar image vanlacke May 11 '15 at 07:04 PM

It's a custom event, because it needs to be replicated

The one and onyl thing it does it spawn an actor (random item), and sets the variable.

What is confusing me is this: "Spawn" runs first, right? So, why is the print string returning "None", and it I run it a second time, the print returns the previously spawned actor, instead of the currently spawned one.

It seems as though, the print is running BEFORE Spawn.. Or something.

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

You could use "Spawn Actor from Class".

In this case you have an output that you can use for "Equip Actor" Print String. It should work.

If you need the network thing, you can make a "Switch Has authority".

Maybe that helps. If you need a BP example, tell me :D

more ▼

answered May 11 '15 at 02:42 PM

avatar image

Raidfire.Net
575 58 53 113

avatar image vanlacke May 11 '15 at 07:06 PM

The Spawn event does use Spawn Actor, and it uses the output to set the variable

(comments are locked)
10|2000 characters needed characters left
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