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"

Calling a Custom Event in another BP from a UMG Button Click doesn't work

In UMG I have a button which I added a Click Event to. On the click event, I want it to call a Custom Event from my Main Blueprint. In the picture you can see that I also added a "print string" node to make sure the button was working in the first place, and it does. I added a breakpoint to the Call for the custom event, yet when I was debugging, it didn't even seem to trigger the event and would procede to the Print String node.

Why is it skipping over the Custom Event?

alt text

Product Version: Not Selected
Tags:
questionhelp.jpg (38.1 kB)
more ▼

asked Oct 28 '14 at 12:15 AM in Blueprint Scripting

avatar image

BrannenK
3 2 2 4

avatar image BrannenK Nov 05 '14 at 03:14 AM

I still haven't been able to fix this issue. Are there any other suggestions for why this isn't working?

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

1 answer: sort voted first

You I see the part of your BP where you fill the "Main Game Ref" variable?

Because usually the engine is always calling those. However if that variable has not been set (or been set incorrectly) it will point into nothing which will result in exactly that behavior. Nothing will happen.

more ▼

answered Oct 28 '14 at 12:22 AM

avatar image

Erasio
5.9k 291 86 293

avatar image BrannenK Oct 28 '14 at 12:25 AM

If it was set incorrectly wouldn't it be impossible to call my "Play Button" custom event?

avatar image Erasio Oct 28 '14 at 12:49 AM

I'm not sure if it is.

Certainly not while editing. It might throw a few errors while you're playing but I wouldn't be too surprised if it didn't.

I mean nothing bad is happening. It simply isn't reaching an actor. The same can happen very easily when you despawn something so any major warning or even a crash would not be too appropriate.

avatar image BrannenK Oct 28 '14 at 01:29 AM

The variable "Main Game Ref" was created by.... Adding a variable > changing it's type to "object reference" targeting the BP_MainGame Blueprint > and was made editable.

I believe I have done the correct steps in creating this reference, yet I fear it may be as you said (where it is somehow incorrectly set).

Is there a fool proof way of making sure it is set correctly or not?

alt text

questionhelp2.jpg (18.7 kB)
avatar image Raikoh Oct 28 '14 at 02:44 AM

Have you set ur variable with the set node? you need to set the right reference to ur new variable. You can look if it gives you "none" when you " watch value". Use the Event Construct in ur UserWiget graph to set the reference.

avatar image BrannenK Oct 28 '14 at 03:48 AM

The Blueprint to be referenced is technically set when you are creating this type of variable.

https://docs.unrealengine.com/latest/INT/Engine/Blueprints/UserGuide/BlueprintComms/index.html

(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