• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

TimedEventLinkedList v1.1

  • Like
Reactions: deepstrasz
TimedEventLinkedList
IMPORT GUIDE :
1. Enable "Tick the Automatically create unknown variables ..." located at File>Preference>General
2. Copy the TimedEventLL Folder in the Trigger Editor to your map
3. Configure the TELLConfig trigger according to the comments provided
4. Configure triggers that will utilize TimedEventLinkedList

NOTE: if you are importing TimedEventLinkedList as a requirement for another resource, only step 1-3 is needed. Step 4 is for those who wants to use this as a requirement for their systems.

SYSTEM INFORMATION :
This system is designed to be a base for all Linked List related needs in GUI. The system allows one to create triggers without delving deep into the mechanics of Linked List and focuses on getting their triggers works, benefitting on the instancing capability of Linked List.

In short, to register an instance of Linked List, the following data needs to be provided:
  • TELLSampleTrigger
    • Events
    • Conditions
    • Actions
      • -------- TimedEventLinkedList works by having a specified duration --------
      • Set TELLDuration = 0.00
      • -------- OnEventAlloc is equal to OnIndexEvent, where TimedEventLinkedList started to allocate an instance --------
      • -------- Setting values to be used later on is best done during OnAllocEvent --------
      • Set TELLOnEventAlloc = TELL_TriggerEmptyEvent
      • -------- The loop event is triggered every TELLOnEventLoopTimer duration --------
      • Set TELLOnEventLoop = TELL_TriggerEmptyEvent
      • -------- If OnEventLoopTimer is lower than TimerTIMEOUT, it is automatically set to the timeout value --------
      • Set TELLOnEventLoopTimer = 0.00
      • -------- OnEventDealloc is equal to OnDeindexEvent or OnEndEvent, where the instance has been deallocated and cleaning up can be done --------
      • -------- NEITHER OnEventLoopTimer NOR Duration CAN BE MODIFIED DURING OnEventDealloc --------
      • -------- Check the duration during OnEventLoop instead if you need them --------
      • Set TELLOnEventDealloc = TELL_TriggerEmptyEvent
      • -------- Register to system at the end --------
      • Trigger - Run TELL_TriggerRegister (checking conditions)
This system is meant to be abstract where it can be conveniently used as a dependency for other timed systems or timed spells or triggering in general. The API is intentionally designed to be simple since it is meant to be usable for different needs, as long as it is time-based.

The '_' in variables indicate their accessibility:
> no '_' = register variable only
> '_' = DO NOT TOUCH AT ALL COST
> '__' = OnEventAllocate, OnEventLoop, and OnEventDealloc variables; can be edited except TELL__Index

This system is limited by the maximum array provided by Warcraft 3. However, I believe it is a minimal issue since it is unlikely to hit the limit without being very intentional about it, even when multiple resource utilizing it.

MEDIA SHOWCASE :
CHANGELOG :
Version 1.1:
- Shifted all TELLLoop trigger variables to use TELL_TempID instead of TELL__Index for additional safety layer against TELL__Index accidental manipulations (since it is meant as a getter, but some people might thought they can set it by accident)
- Fix a critical bug when instantiating an instance inside another instance (a major bug for TimedSpecialEffect)
- During Allocation, use the TELL__Alloc** instead of TELL__** variables when using setters! TELL__Index is safe for use during Allocation
Version 1.0.1: Improved the import guide and added additional information regarding system limitation
Version 1.0: Released

CREDIT :
- Maker for Linked List instead of Dynamic Indexing thread
Contents

TimedEventLinkedList v1.1 (Map)

Reviews
Wrda
An interesting system which specially maintains the order of causality, perfect for timed related concepts. Sometimes you use TELL__Index other times you use TELL_TempID in TELLLoop trigger. I think you can simply use TELL__Index to simplify. As...

Wrda

Spell Reviewer
Level 26
Joined
Nov 18, 2012
Messages
1,888
An interesting system which specially maintains the order of causality, perfect for timed related concepts.
Sometimes you use TELL__Index other times you use TELL_TempID in TELLLoop trigger. I think you can simply use TELL__Index to simplify.
As usual, nicely done.

Approved


Merry Christmas ;)
 
An interesting system which specially maintains the order of causality, perfect for timed related concepts.
Sometimes you use TELL__Index other times you use TELL_TempID in TELLLoop trigger. I think you can simply use TELL__Index to simplify.
As usual, nicely done.

Approved


Merry Christmas ;)

Thank you for the approval! Happy holidays!

About TELL__Index, I agree that it serves better than TELL_ID, it just that TELL_ID helped me better relate to Maker concept for GUI Linked List, while TELL__Index is used so those who used to Dynamic Indexing or older indexing approaches can understand the idea without dealing with the details.

The whole idea is "You need an Index? Just use TELL__Index". People can have no knowledge on Linked List and still benefit if they know Indexing.
 
v1.1:
  • Shifted all TELLLoop trigger variables to use TELL_TempID instead of TELL__Index for additional safety layer against TELL__Index accidental manipulations (since it is meant as a getter, but some people might thought they can set it by accident)
  • Fix a critical bug when instantiating an instance inside another instance (a major bug for TimedSpecialEffect)
  • During Allocation, use the TELL__Alloc** instead of TELL__** variables when using setters! TELL__Index is safe for use during Allocation
 
Top