Event detecting when a unit expires?

Jackal

You can change this now in User CP... or Die Tryin
Reaction score
38
In my map I have a building that after 5 minutes of being captured turns into another building by using mana as a sort of countdown timer. This has worked perfectly, until a new system I'm developing in my map requires the mana of the building to represent something else, so I have to find an alternative.

The most simple way I could think of as an alternative was attaching a unit expiration timer to this captured unit set for 300 seconds and then turning into another building when the expiration timer expires. It would be better than using a wait 300 seconds action because the expiration would stop if the building was captured by another player. However, no event that I know of detects when a unit expiration timer ends. Any ideas?
 

meOme

New Member
Reaction score
31
That would be... "a unit dies". x)
But I guess you can't use that...

Are you using the custom value of the building for something? Otherwise you could just use that instead of mana.
 

Narks

Vastly intelligent whale-like being from the stars
Reaction score
90
what is wrong with 'a unit dies'?

just put in the conditions if the unit was summoned
 

Jackal

You can change this now in User CP... or Die Tryin
Reaction score
38
what is wrong with 'a unit dies'?

just put in the conditions if the unit was summoned

So by this can I assume that units with an expiration timer are seen as "summons" by Warcraft III?
 

Narks

Vastly intelligent whale-like being from the stars
Reaction score
90
I didn't think of that


honestly best way is timer attachment (jass)


hai jackal
 

Narks

Vastly intelligent whale-like being from the stars
Reaction score
90
make struct (AIDS?)

attach struct to building

attach periodic timer to struct

make struct member a counter, periodic timer will increment counter every second

then make static trigger or just call a method to reset the counter whenever a structure is recaptured

if counter hits 300, you get hello dot jaepeg
 

Jackal

You can change this now in User CP... or Die Tryin
Reaction score
38
make struct (AIDS?)

attach struct to building

attach periodic timer to struct

make struct member a counter, periodic timer will increment counter every second

then make static trigger or just call a method to reset the counter whenever a structure is recaptured

if counter hits 300, you get hello dot jaepeg

That doesn't help either. I don't use JASS outside of copy-paste.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top