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"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

UMG Button not work in game

This is my blueprint's event graph. When playing, It doesn't work. When stop the game, Spline Actor's Location is changed. alt text alt text alt text

How can i solve this problem?

Product Version: UE 4.14
Tags:
qwer.png (91.0 kB)
play.png (164.1 kB)
end.png (272.9 kB)
more ▼

asked Mar 13 '17 at 09:08 AM in Blueprint Scripting

avatar image

Riend
3 2 4

avatar image TorQueMoD Mar 13 '17 at 09:13 AM

Firstly, the button is working. You know this because when you click on it, you get the print string message "Up" printed to the screen. The reason why the spline's location is changed is because you're changing it. You're using a set Actor location so you can't pass through 0s to mean "Don't change" the value. They mean set the value to nothing. So it's moving to a location of nothing on X, Nothing on Y and 20 on Z. Better than saying what you're doing isn't working (Cause technically it's doing what you're telling it to) how about you let us know what you hope to accomplish and we can help you from there.

avatar image Erytriel Mar 13 '17 at 11:15 AM

i guess he wants to change the Z value when he clicks the button , but it first applies when he closes the game , not while playing.^^

avatar image Riend Mar 13 '17 at 11:37 AM

It is what i wants. Thank you for help.

avatar image Riend Mar 13 '17 at 11:35 AM

(Last question) Before inquired this question, I had inquired about another question. Question link is https://answers.unrealengine.com/questions/572533/setactortickenabled-is-called-but-tick-doesnt-work.html. I want to know how to enable or disable tick event. Though It is clear that UMG's button event is working, I couldn't see the change in runtime .

(This question) So I tried another test about changing actor's location. When playing, location is not changed. Change appears after I stop the game. Second picture show that actor's location isn't changed in runtime. Last picture show that after I click the stop button, actor's location is changed.

I don't know whether it is correct sentence... sorry

avatar image TorQueMoD Mar 13 '17 at 11:58 AM

Is the the code inside the event graph of your UMG or the bind for your button or in the blueprint for the spline actor? And when/where do you add the UMG to the viewport? Also, is the final desired result of this UMG to move the spline actor, or is this simply a test for something else? It would help if I know exactly what you want to do with the UMG button press.

avatar image Riend Mar 13 '17 at 12:39 PM
  1. It is inside my UMG.

2..I call ChangeWidget function in SplineActor's click event. You can find it through link.

  1. It is just a test. In this case, I know the button event is working. But I want to know change SplineActor's location in runtime not after playing. Finally I want to know how can I enable / disable the tick event in spline actor.

Oh.. Link additionally contain dot... https://answers.unrealengine.com/questions/572533/setactortickenabled-is-called-but-tick-doesnt-work.html Here is correct link.

avatar image bruno9999 Jul 08 '18 at 09:57 AM

This is really helpful, Thanks for this you also check http://taskbarwindows10.com/

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

1 answer: sort voted first

so u had to make a reference to the spline actor in the HUD widget like "get all actors of class" or something then set it as new variable , right?

maybe theres some mistake`?

i reworked the issue and it works just fine for me

alt text

help1.png (173.1 kB)
more ▼

answered Mar 13 '17 at 12:05 PM

avatar image

Erytriel
324 14 3 10

avatar image Riend Mar 13 '17 at 12:31 PM

Umm.. I can test your advice after 15 hours... Because my computer is not available.

I set actor reference in advance. My scenario is.. SpilneActor is C++ actor having click event that show UMG. When clicking SplineActor, I call blueprint's function named SetActor. I checked that SplineActor reference was correctly set. Is there a difference between set actor reference by calling "get all actors of class" in blueprint ( UMG ) and calling my custom blueprint function "Set Actor" in SplineActor (C++)?

avatar image Erytriel Mar 13 '17 at 12:49 PM

so u have ur mouse enabled, clicking on the "bridge" then the umg opens up and u can move it by clicking up down left right and so on right?

i cant write c++ so i dont know if theres a difference between ur way and mine , it could be that theres an error linking the actor u want to move

all actors of class works this way: you have 1 bridge , call it , make a get node (with the index 0) and set it. then u referenced it to that only bridge

IF you now have more then 1 it adds all those bridges to an array ... now it belongs to the index you choose which actor will be setted

avatar image Riend Mar 13 '17 at 01:08 PM

Thanks Erytriel!. I will test your way first.

umm.. But I has many Spline actors. How about check index in c++ and send index to blueprint? Then, umg can call "get all actors of class" by correct index. I will test it too.

avatar image TorQueMoD Mar 13 '17 at 08:28 PM

If you have a lot of spline actors you can store them in an array. I think this would be the same as an index.

avatar image Riend Mar 14 '17 at 05:49 AM

It is working well. Erytriel,TorQueMoD Thank you for help.

avatar image TorQueMoD Mar 14 '17 at 06:44 AM

np. You should mark Erytriel's answer as correct

avatar image Erytriel Mar 14 '17 at 10:18 AM

np, this would be nice :>

(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