Alternate between multiple "Draw Texture" nodes
I am trying to find a way to alternate between different "Draw Simple Texture" nodes every second or so, but I can't get it to work. I have tried using Multigates with delay, but that didn't work. I have also tried Flipflop with delay, which didn't work. I tried using a timeline, but that didn't work either. I don't know if I did something wrong or if I am using the wrong approach here. Here's a pic of my BP at the moment:
At the moment, the texture switches constantly (I'm guessing every frame), which of course is not what I want to achieve. Any tips would be appreciated.
Thanks in advance, Florian
UPDATE: I have managed to solve this for alternating between 2 "Draw Texture" nodes, but I still need to find a solution for switching between the three at the top of the tree. Here's a pic of the 2-node solution:
So I answered this myself now, sometimes the most simple answer is the one you don't think of. I just made a bool for every draw texture and used a bunch of Branches to differentiate them, here's my solution:
Maybe someone else can use this too ;)
answered Jul 21 '14 at 02:10 PM
You can do it with a single "Draw Simple Texture" node.
Create a new int variable named "TextureNo".
Create a new variable called "Textures", type "Texture2d" in the search bar where you pick variable type (int/float/string). Make it into an array. Set the texture2Ds you want as the default values.
Use this array in the blueprint and attach a get node to it. You supply the "TextureNo" as your index.
Add a timeline, add an event track. The event track should fire every .5 seconds (or some other frequency you wish). Turn on Autoplay and Loop features. Fire the timeline with a "Begin Play" node. Use the timeline to update the TextureNo variable.
Let me know if you can't figure it out, I can post some screenshots.
answered Sep 19 '14 at 10:17 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here