You should START using Set timer by function name and here is why

แชร์
ฝัง
  • เผยแพร่เมื่อ 27 ธ.ค. 2024

ความคิดเห็น • 9

  • @vordo7610
    @vordo7610 ปีที่แล้ว +6

    Hi. If you're working with others, please use SetTimerByEvent instead. Using function name means that if anyone changes the name of a function, it will break the code. SetTimerByEvent will automatically update to reflect function name changes. SetTimerByFunctionName is still good for some purposes - such as debugging or gameplay scripting, where you can make the function name a variable and edit it in runtime, to execute different functions during play.
    Also it is unsafe to use return values from functions after a time. They are only guaranteed to be valid on the same frame ( video time 1:01) E.g. Cast to ThirdPersonCharacter -> Delay(1.0) has a chance that within the 1 second (or any time at all really) the garbage collection will have cleaned up the return value of the cast node, resulting in the reference being lost. This is a potential issue regardless of timer method used.

    • @napstablook25
      @napstablook25 ปีที่แล้ว

      Hi, Can you elaborate or point to a source describing this issue of the return values being unsafe? Probably some steps to reproduce. I am just curious to read about it and test it out.

    • @valmirius
      @valmirius 11 หลายเดือนก่อน

      The events are a nuisance if you're not in the event graph and trying to have timers in functions instead. It's incredibly annoying that it's limited to events only when you want to tidy up blueprint spaghetti - this is why I prefer the C++ timers (which also let me pass parameters easily without having to mess around too much)

  • @123nametaken
    @123nametaken 2 ปีที่แล้ว +1

    This video changed my life., I don't know how I was doing anything before I started using them. One question though, is it ok to just pause the timers instead of invalidating if the functions are just gonna get called again within a few seconds or would a bunch of paused timers be bad?

  • @V2dragon
    @V2dragon 2 ปีที่แล้ว +1

    thanks, really helped me

  • @rifat.ahammed
    @rifat.ahammed ปีที่แล้ว +1

    Thank you

  • @donfalcone7560
    @donfalcone7560 ปีที่แล้ว

    Is it impossible to make these timers work when pause is on? If not, is there any alternative?

  • @elmer5455
    @elmer5455 2 ปีที่แล้ว +2

    thanks bro

  • @nomad7317
    @nomad7317 2 ปีที่แล้ว +2

    Why aren't timers precise? Which other feature can I use for precision? Timeline?