Trigger Help

SgtBob

New Member
Reaction score
0
I need Eggs/spiders to hatch/grow at 100 mana, however i have not found the proper method to do so, with triggers, my current method of doing so lags the game. so i was wondering if anyone could help me
 

SgtBob

New Member
Reaction score
0
Ice Egg Age
Events
Time - Every 20.00 seconds of game time
Conditions
Actions
Custom script: set bj_wantDestroyGroup = true
Unit Group - Pick every unit in (Units of type Ice Spider Egg) and do (Actions)
Loop - Actions
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Life of (Picked unit)) Not equal to (!=) 0.00
(Mana of (Picked unit)) Equal to (==) 100.00
Then - Actions
Unit - Replace (Picked unit) with a Ice Spider using The new unit's default life and mana
Else - Actions
Do nothing

Along the lines of that, however there can be alot of egg's/ spiders on the map so doing it all at the same time causes lag
 

KaerfNomekop

Swim, fishies. Swim through the veil of steel.
Reaction score
612
Try this, maybe?
Trigger:
  • Initialization
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set TempUnitGroup = (Units of type Ice Spider Egg)
      • Unit Group - Pick every unit in TempUnitGroup and do (Actions)
        • Trigger - Add to Egg Hatching <gen> the event (Unit - (Picked unit)'s mana becomes Greater than or equal to 100.00)
      • Custom script: call DestroyGroup(udg_TempUnitGroup)

Trigger:
  • Egg Hatching
    • Events
    • Conditions
    • Actions
      • Unit - Replace (Triggering unit) with a Ice Spider using The new unit's default life and mana
 

Accname

2D-Graphics enthusiast
Reaction score
1,462
@Kaerf: Those triggers work, but they are leaking events. The effects should not be huge though.

But here is an other suggestion:
- If there are always at least 2 spider eggs on the map then give them the ability "faerie fire", change the targets allowed to "friend", set the range to 999999 and the mana cost to the max mana of the spider egg unit.
Set the effects of the ability to 0 and the duration to 0.01.
The spider eggs will now try to auto-cast faerie fire on each other (but never on themselfs). You can detect the use of faerie fire to see if a spider egg has full mana.
 
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