HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Phoenix Fire

05-27-2004, 08:19 PM#1
Shimrra
How does one go about detecting when a unit is hit by Phoenix Fire?
05-27-2004, 08:21 PM#2
Vexorian
not at all.

Make your own trigger enhanced phoenix fire and done
05-27-2004, 08:26 PM#3
Milkman
Isn't phoenix Fire a buff? And buffs can be detected on units? And if it isn't, add a buff and detect it? I'm pretty sure there is.
05-27-2004, 08:29 PM#4
Shimrra
I'm not sure if it leaves a buff, but what I need to do is find a way to set off a trigger whenever a unit is within so close to another unit without using timers or periodic events. The unit-type moves, so it can't attack, and any buff checking would require a periodic...
05-27-2004, 08:37 PM#5
Vexorian
There is a unit comes withing range of unit event actually
05-27-2004, 08:39 PM#6
Shimrra
Can I say, Unit enters range of a unit, not a specific unit of a specific unit tyoe?
05-27-2004, 08:42 PM#7
Milkman
A unit comes in range of a unit with the buff phoneix fire? =)
By using a var or two, possible. Right?
05-27-2004, 08:45 PM#8
Shimrra
The event is a specific unit event. I can't enter an 'any unit' option...
05-27-2004, 08:46 PM#9
Vexorian
Use add event after creating the unit
05-27-2004, 08:52 PM#10
Shimrra
I'm using this for spell and I need a certain effect to happen when a unit gets to close to what the spell spawns. These units are made in mass quantities and several sets can be created at the same time. Also, these units only last for a sort time. Can you hep me with this?
05-27-2004, 08:56 PM#11
Vexorian
I would use JASS and create a very own trigger for them each time they are spawned, trigger which selfsestructs when they die.

But if you like the missiles to kind of die when an enemy is near, you can use the Mine - exploding ability.
05-27-2004, 08:59 PM#12
Shimrra
How would you do that? I can use Jass, but only functions that exist in GUI. Thank you for your help so far!
05-27-2004, 09:11 PM#13
Vexorian
Code:
function UnitCloseDoStuff takes nothing returns nothing
    if GetTriggerEventId() == EVENT_UNIT_DEATH then
         call DestroyTrigger(GetTriggeringTrigger() )
    else
         call TriggerExecute(gg_trg_INSERT)
    endif
endfunction

function SetupUnitClose takes unit u returns nothing
 local trigger t=CreateTrigger()
    call TriggerRegisterUnitInRange(t, u, INSERT )
    call TriggerRegisterUnitEvent(t, u, EVENT_UNIT_DEATH )
    call TriggerAddAction(t, function UnitCloseDoStuff )
 set t=null
endfunction

Ok, first change the First INSERT with the name of the trigger to execute when a unit gets close, (use triggering unit to know which unit came close) second INSERT is the range

And to use, put this in Custom Script Section and in the trigger, after creating the unit:
custom script: call SetupUnitClose(bj_lastCreatedUnit)
05-27-2004, 09:14 PM#14
IlidanStormrage
Hm, a little advanced, but here it goes:

Code:
Detect Pheonix
Event
Unit is summoned
Condition
Unit-type of Summoned unit equal to Pheonix
Action
Set Pheonix equal to Summoned unit

Unit in Range of Pheonix
Event
Unit comes within range of Pheonix
Condition 
(Whatever you want)
Action
(Whatever you want)

That should do it! Pheonix is a variable.
05-27-2004, 09:24 PM#15
Shimrra
Lord Vexorian, when I put this in and saved it, it came up with an error stating:
Quote:
Originally Posted by WE Error Screen
Line 203: Invalid number of arguements.
It selected this text: " call TriggerRegisterUnitEvent(t, u, EVENT_UNIT_DEATH )"