• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

[JASS] Customised Phoenix Fire Ability

Status
Not open for further replies.
Level 3
Joined
Jul 15, 2007
Messages
36
Is it possible to start a trigger on a unit being hit by a phoenix fire effect?

Can't seem to find a "Unit gains buff" (using the buff of phoenix fire) event, and not sure if i can do it via a condition after the "Unit is attacked" event triggers.

Essentially trying to JASS-enhance the attack given to a unit by an item.

Any help would be appreciated.
 
No, it should be possiable since correct me if I am wrong but when the phoenix fire deals damage it also attaches to buff, thus I just told you what event to use. After it is hit with it and it is confermed to be phoenix fire, you just disable the trigger and via a timer, enable it when the buff should expire, this will stop other damage triggering it.

JASS is an absoulte must for this.
 
Nope. I would suggest you use dummy units

Sorry - any chance of a link to a tutorial / explanation?

when the phoenix fire deals damage it also attaches to buff, thus I just told you what event to use.

Yes, it does attach a buff (I was already figuring on this, and making custom buffs for each copy of phoenix fire); so you suggest I should use:
JASS:
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Creepdeath, Player(11), EVENT_UNIT_DAMAGED )
and then decide what attack has been applied via the buff?

however, how do i work out the buff? (either as a condition script or within the called function: I.E. how do i analyze what buffs are on a unit?) Is it "UnitHasBuffBJ(GetTriggerUnit(), 'B00A'")" (returns a boolean)?

Although, looking at the script for "UnitHasBuffBJ()"
JASS:
function UnitHasBuffBJ takes unit whichUnit, integer buffcode returns boolean
    return (GetUnitAbilityLevel(whichUnit, buffcode) > 0)
endfunction
Thus, is there an "becomes the target of an ability" event I can use? (I.E. "EVENT_UNIT_SPELL_EFFECT" or EVENT_PLAYER_UNIT_SPELL_EFFECT)

Cheers and thanks for help so far
 
JASS:
EVENT_UNIT_SPELL_EFFECT
is for a unit event such as:
JASS:
native TriggerRegisterUnitEvent takes trigger whichTrigger, unit whichUnit, unitevent whichEvent returns event
//
JASS:
EVENT_PLAYER_UNIT_SPELL_EFFECT
is for playerunitevents such as:
JASS:
native TriggerRegisterPlayerUnitEvent takes trigger whichTrigger, player whichPlayer, playerunitevent whichPlayerUnitEvent, boolexpr filter returns event
//

TriggerRegisterAnyUnitEventBJ takes a playerunitevent as well.
 
In terms of the event, "EVENT_UNIT_DAMAGED", being of type unitevet rather than playerunitevent, can only be applied to a specific unit, which it takes as an argument in;

"native TriggerRegisterUnitEvent takes trigger whichTrigger, unit whichUnit, unitevent whichEvent returns event"

So i can't use it as a generic unit event; the unit has to be pre-defined. (i.e pre-existing on the map, it would seem; it is a unit, not a unittype variable.

Experimenting with the spell effect events, and ability events, to see if they fire.

Dil999:
As to dummy units, again I run into the trouble of identifying where to make them / what to give them (and presumably the event is a generic unit is issued an order at an object? i.e. to actually do the JASS enhancement on the attacked unit)

Purge:
Ty, but do you know if they can detect when a unit gets a buff / gets the effect of a spell? Specifically the phoenix fire buff / spell?
 
You would need to use an attackdetect system to detect when a unit is hit, and if the attacker meets a certain conditions then do actions. You can use shadow1500's Any Unit Is Damaged script on wc3jass.com to make a unit is damaged into a generic event.
 
Status
Not open for further replies.
Back
Top