Announcement

Collapse
No announcement yet.

Event tick: better solution? (controller input)

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Event tick: better solution? (controller input)

    Hey guys,

    I'm setting up a BP to display my UI while I hold down an input. The method I have working is using an event tick to check to see if a gate is open. I'm wondering two things:

    1) Is there a better way to do this. ("Event ticks bad", after all).

    2) When the gate is closed, does the event tick use up much memory - or is its effect basically nil being that nothing is being executed out of the gate's exit?

    Click image for larger version

Name:	1.jpg
Views:	1
Size:	297.1 KB
ID:	1220374
    Thanks!

    #2
    It is not bad, if you truly need to run the trace every tick.

    In general, using the input node to gate access to a block works well.

    A gate is simply a conditional test using a DoOnce node (double click on it to see it)
    Likewise you can view the DoOnce
    Last edited by OptimisticMonkey; 05-16-2017, 06:16 PM.
    https://www.casualdistractiongames.com

    Comment


      #3
      Thanks! That's good to know.

      Comment


        #4
        I used a custom event and called it 'StartTimer'. When press "T" on the keyboard (or any input) is Pressed...it sets a variable (is pressed) and it triggers this event. Which then drives a 'Set Timer by Event' node. Feed Get World Delta Seconds into the Time of this node ( you will now have an Event Tick that will go for as long as that is pressed variable is positive) I added a delay of .25 after the Set Timer by Event to slow it down a bit, and then anything after that will increment every .25 seconds.. UNTIL you release the input, change the Is Pressed variable to off, and then kill the timer which kills the loop. Hope that makes sense.
        Now available on the UE Marketplace: Inventory Examine Interface -- and -- Fifty Knobs and Dials -- and -- Thirty Buttons Pack -- and --Kitchen and Bath Handles for Arch Vis -- and -- Chat Bot A.I. Simulator

        Comment

        Working...
        X