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"

Schrödingers Timeline: works/doesn't work at the same time [ Solved ]

I wanted to make the ball in my game to go through a rainbow of colors. I use a material parameter collection and one parameter is in the ball_material in use. I change the value with a Timeline that last 6 seconds. The Timeline goes through all the colors and applys an effect to the ball once and reverts it after it's finished.

My problem is that it doesnt work every time. I bound the P Key to the Timeline to Play from Start and after some testing, It does work sometimes and sometimes it doesn't.

The effect applied works everytime but not the color change. Sometimes it works the whole game session. Sometimes it only works at the start once. Sometimes it works after some time passes.

It doesn't matter if the key is held down or pressed rapidly. Held down doesnt do anything but pressed rapidly makes it start from the beginning rapidly, but only in cases where it works.

I have tried to google my way to a solution but at this point I just have no clue. Pls help.

alt text

and alt text

Product Version: UE 4.18
Tags:
more ▼

asked Mar 15 '18 at 04:36 PM in Blueprint Scripting

avatar image

Vodolle
1 1 3

avatar image Jin_VE Mar 15 '18 at 04:56 PM

Not entirely sure what the problem could be but it's such a great title I had to respond. Are you replacing the material with a dynamic material instance?

Also, a few notes:

The DoOnce part: You're basically doing the same thing as you would if you put the SetCollisionObjectType(SuperBall) before the timeline plays.

If you want it to play once and not play again until it's finished, then try using the Play pin, and connecting Finished back around to SetNewTime (after you call SetCollisionObjectType(Pawn), of course).

avatar image Nebula Games Inc Mar 15 '18 at 05:00 PM

Was literally gonna say the same thing about the DoOnce....i agree with @Jin_VE, move it before the timeline. Logically your set-up is doing the same thing but with blueprints and computers in general sometimes the real-life execution of the logic isn't what we expect. So having a DoOnce after the timeline I think is just complicating things asking it to block input every frame except the first. Could cause random weird issues. I don't have an issue with "Play from Start" that should work just fine as long as you don't call it multiple times during the same play session, so the DoOnce node prior to the timeline would also help there, let the "Finish" pin loop around and reset the DoOnce that way you can't call the timeline again before it completes play.

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

1 answer: sort voted first

I don't have much expirience but I had alot of problems with timelines not working.' The DoOnce was put there so I could make sure, in case the timeline doesn't start, the Collision Type wouldn't be changed, but I didn't want the timeline in case it works to set the collision type multiple times. With the DoOnce, if the timeline worked, the collisiontype would be changed once.

Also, I found the problem. In the same Ball_Pawn Blueprint was another timeline ticking, changing the color in another way. I actually set up a stop in case of a powerup but forgot it completely. Explains why it somewhat worked but didn't change color.

Hope I didn't waste much of your time. Coming back here removing the DoOnce made me realize it, so thanks!

more ▼

answered Mar 15 '18 at 09:02 PM

avatar image

Vodolle
1 1 3

avatar image Jin_VE Mar 15 '18 at 09:52 PM

Cool! Copy that into an answer and close this out. There aren't enough "Solved" questions in the world these days. :)

(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