Blinking player heart [#4 Remake Undertale in GameMaker ]

Поділитися
Вставка
  • Опубліковано 7 вер 2024

КОМЕНТАРІ • 4

  • @1upIndie
    @1upIndie  6 місяців тому +2

    Code from the video:
    Create event:
    hitBlinkTime = 10;
    hitBlinkTimer = hitBlinkTime; // the timer that runs down
    hitAlpha = 0.4; // the alpha to blink between 1 and 0.4
    Step event:
    // only blink when in the "hit" state
    if(state == "hit"){
    // run down timer, if 0 or lower, reset timer
    hitBlinkTimer--;
    if(hitBlinkTimer

  • @Mackievellian
    @Mackievellian 6 місяців тому +1

    This is a nice script for this and has many other uses! :)
    function blink(on_val, off_val, rate)
    {
    on_val = argument[0];
    off_val = argument[1];
    rate = (argument_count > 2 ? (argument[2] * 1000) : 1000);
    if (current_time % (rate * 2) >= rate) return on_val;
    return off_val;
    }

    • @1upIndie
      @1upIndie  5 місяців тому +1

      Thanks for sharing, also a neat way to do the same thing.

    • @Mackievellian
      @Mackievellian 5 місяців тому

      @@1upIndie you're welcome. :)