• 🏆 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!

Event - Periodic Time

Status
Not open for further replies.
Level 8
Joined
Apr 30, 2009
Messages
338
I want to know if you can set the real argument of a periodic time to a variable somehow. I even downloaded jasscraft to see the corresponding function and tried to put a real variable and it said it couldn't compile (expecting a name).

The reason I want to do this is because I made global variables for all the periodic timed events, so far only needed 2:

- udg_FPS_DOTSpells: the time interval for triggered damage over time debuffs, 0.10s
- udg_FPS_ProjectileSpells: the time interval for triggered projectile moving, 0.03s

And literally every single spell refers to these values to calculate damage, distance moved, etc. So it would be nice if I could make it a global variable and also use it for the trigger event so i don't have to change every spell if I decide to make the intervals longer. I guess it's like I want to make a custom game constant.
 
In Jass yes, in GUI no.

If you insist on using GUI, something like this should work;

  • Untitled Trigger 002
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Countdown Timer - Start timer as a Repeating timer that will expire in FPS_DOTSpells seconds
      • Set timer = (Last started timer)
  • Untitled Trigger 001
    • Events
      • Time - timer expires
    • Conditions
    • Actions
      • -------- actions --------
 
Status
Not open for further replies.
Top