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"

Switching Weapons

Hey Guys

This question had me pondering for days, but I simply cannot figure it out: how do I switch to a weapon with a slower or more rapid fire rate? I've tried piecing together some Youtube tutorials as well as researching this topic on various websites; however, none of them offer the correct solution.

I have made slight modifications to the basic first person character template (now, the character can rapid fire). However, my character will still maintain the same fire rate if I switch to another weapon. For example, if I switched from my full auto assault rifle to a pistol, the pistol would still fire at the same rate as the rifle. How would I slow the fire rate down?

As a new student to the Unreal Engine, I have yet to grasp a full understanding of blueprints. This is my very first question on the forums, and I would appreciate any help. Thanks, and have an amazing day!

Product Version: UE 4.8
Tags:
more ▼

asked Nov 15 '15 at 06:08 AM in Blueprint Scripting

avatar image

Doudou29236
1 1 4 3

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

2 answers: sort voted first

Hi Doudou29236,

as with most of the stuff there are several approaches to this, one is to use custom event and timers.

When you're working in blueprint, under the weapon, you create following custom events: - PullTrigger - ReleaseTrigger - Fire

PullTrigger, when called will set a timer for function call, here you can define how much bullets you want to shoot per second. This timer will call the Fire custom event which will spawn a projectile, play sound and so on any time it's called. The ReleaseTrigger will clear the timer, effectively stopping the fire.

Now, in your hero blueprint, on button pressed, you call the pulltrigger and on released, you call releasetrigger.

Check this video out, everything will be clear.

https://wiki.unrealengine.com/Videos/Player?series=PLZlv_N0_O1gb5sdygbSiEU7hb0eomNLdq&video=FYMQLuUXjp8

Regards, Damir

more ▼

answered Nov 15 '15 at 09:29 AM

avatar image

Damir Porobic
206 12 8 18

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

Thanks dude! This method functions perfectly! Thanks again for the answer!

more ▼

answered Nov 16 '15 at 03:19 AM

avatar image

Doudou29236
1 1 4 3

avatar image Damir Porobic Nov 16 '15 at 06:48 AM

Hi Doudou29236,

I'm happy to hear that it worked out for you. If you're happy with the answer, can you please mark the post as answered?

Regards, Damir

(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