Include - Trigger , signal forms with timer and more

Share your advanced PureBasic knowledge/code with the community.
User avatar
STARGÅTE
Addict
Addict
Posts: 2227
Joined: Thu Jan 10, 2008 1:30 pm
Location: Germany, Glienicke
Contact:

Include - Trigger , signal forms with timer and more

Post by STARGÅTE »

Downloads:
Trigger-include file: Trigger.pbi
Zip-archive include trigger and example: Trigger.zip

Why is there this include?
  • Yet again would PurePasic programmer, any run time events.
    Most of the times then ends in a wild tangle with many if-counter variable.
    In order to offer these people an alternative I have been writing this include,
    whose feature set is strongly oriented to the PureBasic style.
    You can use trigger-numbers or work with #PB_Any
What is possible with triggers?
  • Production of different types of trigger signal (tick, square, wave, sawtooth, ...) with length and delay
  • Coupling of the trigger to precursor Tigger (ParentTrigger)
  • Variation of the repetition (Iteration) of the signal and their distances
  • pause, resume, restart
What information we receive on a trigger?
  • The current signal value (Float 0-1)
  • The elapsed time of the trigger (in milliseconds)
  • The status of the trigger (waiting, rest, signal output)
How can we use this information?
  • Fade
    With the help of the type "Slope", a trigger is created, increasing the spending in the specified length values between 0 and 1.
    These can then be multiplied directly to the transparency value of a Sprite3D.
  • Log events
    With type "Tick", a unique 1 value will be issued after the specified delay.
    Since this is a trigger point, is the signal even if the time is something about it.
    This target can be run things after a certain time.
  • Hover Effect
    Is moved with the mouse on a button, a trigger to be restarted, this is dnan type "noise" and generated such as a wobbling effect.
  • Trigger combine
    With "ParentTrigger" triggers can be synchronizes to other triggers or even wait for the others.
    In addition, several trigger-signal values become most popular in the accounts are converted into new signals.
    Multiplying e.g. the sawtooth trigger with the noise, you get noise, which is smaller than at the beginning of the end.
    With the help of the Integrate can trigger signals in a certain number will be repeated at certain intervals.
What is the diagram of a trigger?
Image

What are the different trigger?
Image
There is also a custom trigger.
PB 6.01 ― Win 10, 21H2 ― Ryzen 9 3900X, 32 GB ― NVIDIA GeForce RTX 3080 ― Vivaldi 6.0 ― www.unionbytes.de
Lizard - Script language for symbolic calculations and moreTypeface - Sprite-based font include/module