Node Script

Do Once Until Reset

Downloads: 8
Download
Ads Support FTD

Description

Allows execution once until Effect is Restarted/Reloaded – Connect Both to IF Use True

//
// Do_Once_Until_Reset.ts
// Allows execution once until Effect is Restarted/Reloaded  - Connect to if,
// Written by @Fusedthreed – https://FusedThreeD.com
//

@customNode()
export class Do_Once_Until_Reset extends BasicScriptNode {

  @output()
  Run: boolean;

  private hasRun: boolean = false;

  execute() {


    if (!this.hasRun) {
      this.hasRun = true;
      this.Run = true;
    } else {
      this.Run = false;
    }
  }
}
Ads Support FTD