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"

AnswerHub Maintenance

Background maintenance is scheduled to occur between 9 - 11am EDT on Tuesday, May 21. Site operation may be slower than normal during this time and a brief interruption in operation may be observed

Blueprint to reset actor in loop after changing materials pressing a button

Hello everyone, I’m working on an architectural visualization and I’m trying to create a blueprint that allows the player to make other actors disappear by pressing a button. As you can see from the images, pressing B the group of meshes “BasamentiNeri” disappear (I’ve created a material that, from a black marble texture, becomes “invisible”, and then I’ve disabled collisions), and pressing L the group of meshes “CopiaBasamentoNero” (consisting in the same meshes, duplicated, made invisible at the begin and placed in the same position of “BasamentiNeri”) appears (I’ve created another material that, from “invisible”, becomes a black marble one, and then I’ve enabled collisions). This works, but, when I try to loop the button press (using EventTick and Sequence) it fails to reload the sequence of events linked to the change of materials.

Is there a way to reload the actor and the material after pressing B and L the first time, as if nothing had happened? I hope so. Thanks to whoever will help me.alt text

alt text

alt text

Product Version: UE 4.17
Tags:
button-l.png (468.6 kB)
loop.png (422.1 kB)
button-b.png (421.3 kB)
more ▼

asked Nov 20 '17 at 04:27 PM in Blueprint Scripting

avatar image

Ewhyl
6 1 2 3

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

2 answers: sort voted first

One potential problem here is that your Event Tick - which is going to fire say 60-90 times per second depending on your PC - is likely flooding requests into your Timeline. Once that Gate opens with a key press, your code is spamming the Play button such that it barely has a millisecond or two to get going before it's told to start all over again. In effect, it would act like its not working at all.

I don't fully get why you'd want to Tick this instead of having the key presses start the timelines directly (they have their own internal timers already) ... but just in case you do need to go this route, I would suggest adding a "DoOnce" node before the Play on the timeline, then connect the Finished node on the right side of the timeline back into the Reset on the DoOnce. That would prevent the Tick from spamming it once its already started playing.

[Don't forget to brush up on Play From Start and Set New Time pins - those might come in handy for ya too.]

more ▼

answered Nov 20 '17 at 07:55 PM

avatar image

1l2Hawk
690 36 35 74

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

Thank you very much for the answer. I’ve tried to modify my blueprint according to your suggestions (I’ve deleted the link with the Event Tick, too), but the problem remains: pressing B, the group disappear (based on the properties of the material assigned); then, pressing L, the other group appears (based on the properties of the other material assigned); then, trying to press B or L, the group modifies only its collision.

I think the problem is the transition between the 2° group of meshes (with its material) and the 1° one (with the other material), but how can I reset this?

more ▼

answered Nov 21 '17 at 10:13 AM

avatar image

Ewhyl
6 1 2 3

(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