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"

Change projectile speed on spawn.

I'm trying to make a 'bow and arrow' type projectile. Where you charge the projectile speed before it's spawned. Having issues trying to set the initial projectile speed after it's been spawned.

Product Version: Not Selected
more ▼

asked Mar 21 '14 at 11:42 PM in Blueprint Scripting

avatar image

16 2 7 4

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

1 answer: sort voted first


What you can do for your projectile blueprint is add a float variable and check the box for Expose on Spawn (it will also need to be Editable), in this example I'll call it Projectile Speed. In your projectile blueprint's construction script, you can use a reference to your Projectile Movement component to call and set your Initial Speed using the Projectile Speed float you just created:

alt text

Now, in your Character blueprint (or wherever you are spawning this projectile) when you spawn your projectile, your Projectile Speed float will be available for you to pass in a value, which it will automatically set when created (spawned):

alt text

Hope this helps you out!


more ▼

answered Mar 22 '14 at 12:22 AM

avatar image

Steve Allison STAFF
4.3k 123 58 209

avatar image Jazzer008 Mar 22 '14 at 12:29 AM

Great, thanks a ton! :)

avatar image avengus Jul 20 '14 at 02:45 AM

Trying to do the same thing with the default FPS Blueprint MyProjectile and I don't see any "Initial Speed" or "Projectile Movement" bits in Blueprints. Where are they? Code completion turns up nada. Version 4.1.0 if it helps.

avatar image MOTOMIKE Aug 09 '14 at 10:44 PM

You need to drag the projectile component into the blueprint then you can create a node to set the initial speed.

avatar image JakeD Jan 04 '16 at 11:05 PM

Hi I'm wondering, for some reason if I plug a variable into the make literal float, it doesn't work. I have a value that changes to plug into the projectile speed so I need to use a variable, but it seems to stick to some flat value.

avatar image Badger Bone Jan 17 '16 at 07:00 PM

If you mean your variable is in the character class (or wherever the proj is spawning) then I don't believe you need the Make Literal, but would connect the variable reference directly to the Projectile Speed pin of Spawn Actor.

avatar image Hasanmirza Aug 29 '16 at 04:17 AM

how can I change initial speed every time in press "H" ?

(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