• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

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