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"

I want to set this button to shoot when pressed. I am a beginner. Please help me

alt text

Product Version: UE 4.21
Tags:
more ▼

asked Mar 22 '19 at 07:29 PM in Blueprint Scripting

avatar image

عبااديي
1

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

1 answer: sort voted first

This is a very vague question. But I think what you need to do generally speaking is get a reference to wherever you are spawning your "projectiles" or bullets or whatever is being "shot" and when you press that button, you are going to want to have a custom event or function in the firing BP that is going to get called from the widget by using the "On Clicked" event for the button. So like this:

In widget BP:

  1. On Clicked -> Get Reference To Character/Firing BP

  2. Call function/event to fire projectile

In Character/Firing BP

  1. Create custom event/function that spawns a projectile (Spawn Actor From Class Node)

If you are just starting out these tutorials may be helpful to you:

https://www.youtube.com/playlist?list=PLyu-W38DvZhqByAoeva1jewB5s78zQHIy

more ▼

answered Mar 22 '19 at 08:13 PM

avatar image

Nebula Games Inc
5.4k 28 9 15

(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