Triggered Immolation

Charapanga

New Member
Reaction score
46
Hi, i am trying to create a custom immolation (passive, always activated) that can damage locusts, since normal immo can't damage locusts...So i've tried "A unit comes withing 60 of unit" but failed....then i've tried picking every unit within 60 of a unit that has locust, but that lags alot! so..i come upon you The Helpers to save me from this dilema...

Oh and it has to be MUI or at least MPI for 6 players....
 

I_RULE_YOU

New Member
Reaction score
34
Does'nt normal Immolation already damage Locust units? Thats what I've heard. So just give your hero Permanent Immolation and see if it works.
 

WarLuvr3393

Hmmm...too many things to play (WoW, COD4, WC3)
Reaction score
54
You could create a 1 second timer which picks all units nearby. The reason why it may be lagging is because of memory leaks. I think the one that's leaking in this trigger is the group in which you pick the units.

When you pick units, the JASS native/BJ (I don't know which one) is:

GroupEnumUnitsInRange()

So you're using a group, which means you're going to have to destroy it and null it later on.
 

I_RULE_YOU

New Member
Reaction score
34
DK's Pride is right. It is not target able because it is not click able, but it can still be hit by AoE spells, such as Immolation.
 

darkbeer

Beer is Good!
Reaction score
84
if i rember right Pick every unit in range of .... doesnt pick locusts, you'll have to use pick every units of type or units owned by player (<-- not sure about this)
 

Charapanga

New Member
Reaction score
46
@WarLuvr3393: I've had no leaks at all, nulled all the handles, destroyed all the groups etc.
@I_RULE_YOU: Tried it, but it didn't work so that's why i posted it
@D.V.D: Locust only makes them untargetable, they are still vulnerable
@DK's Pride: You're correct, they are still vulnerable
@darkbeer: picks all units no matter of its visibility, size, health, abilities etc.

Still got no solution...
 

Dinowc

don't expect anything, prepare for everything
Reaction score
223
why is it so hard to answer?

Code:
e: every x seconds of game time
c:
a: set immolation_group = units in x range of (your unit) matching ((matching unit is alive equal to true) and (matching unit is a structure equal to false) and (matching unit belongs to an enemy of owner of (your unit)))
   pick every unit in immolation_group and do actions
      Loop
         cause (your unit) to damage picked unit blabla OR set picked unit's life to (life of picked unit) - x) if it doesn't work for locust, but that wont give you gold if you kill the locust)
         create a special effect attached to the overhead of picked unit using (the fiery effect)
         destroy last created special effect
   custom script: call DestroyGroup(udg_immolation_group)
 

Dinowc

don't expect anything, prepare for everything
Reaction score
223
well you said "Triggered Immolation" and this is the only way of making a triggered immolation... ofc you can make it MUI but it's a challenge in GUI xD
 

Charapanga

New Member
Reaction score
46
it would beacuse the function picks every single unit then the function needs to get the units hp and then modify it, and with the adition of the special effect it makes it laggy, and yes, that's probobaly the only way...but i'm sure its possible to make a MUI immolation that kills locusts...
 

darkbeer

Beer is Good!
Reaction score
84
I was right: just tested

Group pick units in range doesnt pick units that have locust!!!!!!

and for your trigger you may try sth. like this:

Code:
Events - Time every 0.5 seconds
Actions - 
set TempGroup = Units in playabale map area matching unit has immolation
UnitGroup - Pick every unit in TempGroup and do actions
 - set TempUnit = PickedUnit
 - set TempPoint2 = Position of TempUnit
 - set TempGroup2 = Units of type LOCUST
 - Pick units in TempGroup2 and do actions
      - set TempPoint = Position of picked unit
      - If distance between TempPoint and TempPoint2 <= 80 then
            - TempUnit damage picked unit ....
      - Custom script: call RemoveLocation(udg_TempLoc) .....
 - Custom script: call DestroyGroup(udg_TempGroup2)
 - Custom script: call RemoveLocation(udg_TempLoc2)
Custom script: call DestroyGroup( udg_TempGroup)

EDIT: thx acehart wasnt sure about the group thing :)
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,494
> if I had 6 triggers running every second it would just lag

As long as you remove all leaks... no problem.

> not sure about this

Picking every unit in "units of type" or "units owned by player of type" will pick locusts too. (Note the "type" part).

> ... MUI ...

A periodic trigger? Given there's no triggering or other unit, what's the problem?

> don't know if you can use group loops inside each othere in GUI

Yes, you can. (Provided you don't loop the same group twice there)
 
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