Applying timed trigger to multiple targets

Napenthe

New Member
Reaction score
2
The fllowing trigger spawns a unit every 8 seconds, up to 3 max units, around a destructable. When the destructable is destroyed, the trigger is removed.

It seems to work fine for one destructable (spawn-point) but i want to apply it to many different spawn-points. Anyone have an idea how to best do this?
I know there is an easy way to do this staring me in the face but i can't see it.

P.S. The trigger seems to work fine. Just wondering if there's a better way to do it and how best to apply it to several spawn-points.
Gravespawn.png

(And perhaps some general advice on how to post triggers properly)

I may have figured it out. I was selecting all of Neutral Hostile's living Gouls instead of living gouls in the given region, so it was maxing the map's total ghouls instead of each spawnpoint's. Still not sure if there will be a problem using the same variables for each trigger but it seems to be working.

Unless someone sees something in the trigger i could have done better, please remove this thread :D
 

evilwolf

Member
Reaction score
11
You didn't remove leaks properly...
the else action means that what will happen if the "if" conditions are not true.
Move your removing leaks actions to your normal trigger
 

0WN3D

New Member
Reaction score
15
Another note..... i dont think you need to use a variable for a created region as AFAIK, region can be re-used... correct me if i am wrong.... so there is no need to destroy the region or set it in a variable...
 

Napenthe

New Member
Reaction score
2
You didn't remove leaks properly...
the else action means that what will happen if the "if" conditions are not true.
Move your removing leaks actions to your normal trigger

The two custom scripts at the end are just cleanup because at that point the trigger and region are useless. I don't think the trigger is very efficient, memory leak-wise but i'm still researching that. Any suggestions are welcome.

Another note..... i dont think you need to use a variable for a created region as AFAIK, region can be re-used... correct me if i am wrong.... so there is no need to destroy the region or set it in a variable...

I set the region variable for ease of copying (i just have to change the one line to customize the script to a new instance).
 

tommerbob

Minecraft. :D
Reaction score
110
AFAIK, destroying triggers is pretty much pointless. The amount of memory it "saves" is so minor it won't make a difference. I don't know about regions.
 

Napenthe

New Member
Reaction score
2
AFAIK, destroying triggers is pretty much pointless. The amount of memory it "saves" is so minor it won't make a difference. I don't know about regions.

But does it hurt anything? I added the trigger destroy initially as an alternate way of turning the trigger off. Thought i may as well destroy it...
 

tommerbob

Minecraft. :D
Reaction score
110
No, it doesn't hurt. But its an extra line of code that is pointless. Also, that reminds me, do not use "Do Nothing." Why? Because it....does nothing. It's like calling someone on the phone to tell them you sent them a text message which says that you called them. :p
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top