HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

[Illusion] Help with Trigger Enchanced Spell

09-29-2004, 01:36 AM#1
winma
I need help to finish off my trigger enchanced spell....

it's an AOE spell..

it random picks N units in the targeted area with matching conditions unit being a hero = false, unit being a building = false, unit being an illusion = false, and unit being controlled by player 3(Teal)

I've made dummy casters and the dummy spell from wand of illusion.

When i try to do a loop for ordering the dummy unit to cast wand of illusion on the picked units, i can't find the order that corresponds to the ability wand of illusion. So what exactly is the ability that i can use for turn on/off order string for wand of illusion?

Thanks in advance.
09-29-2004, 01:52 AM#2
-={tWiStÄr}=-
someone asked this a little bit ago, orders can be issued by the use of the order's string, or ID the id is a 6 (i think) digit number that can be called by jass using the function
IssueImmediateOrderById
I'm pretty sure it can't be done in GUI tho.
It's also kinda hard to explain how to implement it in jass not knowing ur triggers.
09-29-2004, 04:40 AM#3
winma
Alright.... i know what JASS is... but don't exactly understand much of the language... but here's the trigger converted into custom text:

function Trig_Spectral_Horde_Backup_Copy_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A01G' ) ) then
return false
endif
return true
endfunction

function Trig_Spectral_Horde_Backup_Copy_Func003001002003001 takes nothing returns boolean
return ( IsUnitAliveBJ(GetFilterUnit()) == true )
endfunction

function Trig_Spectral_Horde_Backup_Copy_Func003001002003002001 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE) == false )
endfunction

function Trig_Spectral_Horde_Backup_Copy_Func003001002003002002001 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_HERO) == false )
endfunction

function Trig_Spectral_Horde_Backup_Copy_Func003001002003002002002001 takes nothing returns boolean
return ( GetOwningPlayer(GetFilterUnit()) == Player(2) )
endfunction

function Trig_Spectral_Horde_Backup_Copy_Func003001002003002002002002 takes nothing returns boolean
return ( IsUnitIllusionBJ(GetFilterUnit()) == false )
endfunction

function Trig_Spectral_Horde_Backup_Copy_Func003001002003002002002 takes nothing returns boolean
return GetBooleanAnd( Trig_Spectral_Horde_Backup_Copy_Func003001002003002002002001(), Trig_Spectral_Horde_Backup_Copy_Func003001002003002002002002() )
endfunction

function Trig_Spectral_Horde_Backup_Copy_Func003001002003002002 takes nothing returns boolean
return GetBooleanAnd( Trig_Spectral_Horde_Backup_Copy_Func003001002003002002001(), Trig_Spectral_Horde_Backup_Copy_Func003001002003002002002() )
endfunction

function Trig_Spectral_Horde_Backup_Copy_Func003001002003002 takes nothing returns boolean
return GetBooleanAnd( Trig_Spectral_Horde_Backup_Copy_Func003001002003002001(), Trig_Spectral_Horde_Backup_Copy_Func003001002003002002() )
endfunction

function Trig_Spectral_Horde_Backup_Copy_Func003001002003 takes nothing returns boolean
return GetBooleanAnd( Trig_Spectral_Horde_Backup_Copy_Func003001002003001(), Trig_Spectral_Horde_Backup_Copy_Func003001002003002() )
endfunction

function Trig_Spectral_Horde_Backup_Copy_Func003A takes nothing returns nothing
call IssueTargetOrderBJ( udg_TricksterCaster, "creepdevour", GetEnumUnit() )
endfunction

function Trig_Spectral_Horde_Backup_Copy_Actions takes nothing returns nothing
call CreateNUnitsAtLoc( 1, 'e00B', GetOwningPlayer(GetSpellAbilityUnit()), GetRectCenter(GetPlayableMapRect()), bj_UNIT_FACING )
set udg_TricksterCaster = GetLastCreatedUnit()
call ForGroupBJ( GetRandomSubGroup(( ( udg_SpectralHordeLevel * 2 ) + udg_MirrorImageLevel ), GetUnitsInRangeOfLocMatching(200.00, GetSpellTargetLoc(), Condition(function Trig_Spectral_Horde_Backup_Copy_Func003001002003))), function Trig_Spectral_Horde_Backup_Copy_Func003A )
call TriggerSleepAction( 0.10 )
call RemoveUnit( udg_TricksterCaster )
endfunction

//===========================================================================
function InitTrig_Spectral_Horde takes nothing returns nothing
set gg_trg_Spectral_Horde = CreateTrigger( )
call DisableTrigger( gg_trg_Spectral_Horde )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Spectral_Horde, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Spectral_Horde, Condition( function Trig_Spectral_Horde_Backup_Copy_Conditions ) )
call TriggerAddAction( gg_trg_Spectral_Horde, function Trig_Spectral_Horde_Backup_Copy_Actions )
endfunction




I think i have to change the red text part of the code? since previously in the GUI i just used devour for the sake of it so i can find out which area of the code asks for the ability... i already have that 6 digit number i think.. i looked at Lord Vexorian's caster system and inside there was an example which was the rune of illusion.. it said there's no order string and there was a unique id for wand of illusion... and it is... 852254 basing on his map. So what exactly do i do with all this code now?
09-29-2004, 06:43 AM#4
Psychatog
Assuming the rest is working correctly, changing "call IssueTargetOrderBJ(udg_TricksterCaster, "creepdevour", GetEnumUnit())" to "call IssueTargetOrderById(udg_TricksterCaster, 852274, GetEnumUnit())" should do it. If the Id is wrong, you can use something like this to get it:

OrderInfo
Events
Unit - A unit Is issued an order targeting an object
Conditions
Actions
Custom script: call BJDebugMsg("OrderID: " + I2S(GetIssuedOrderIdBJ()))
09-29-2004, 08:01 AM#5
winma
Thanks sooooo much! but i thought of another way to do it....

in my GUI trigger instead of ordering the dummy unit to use the ability on the picked units, i just inserted the line you provided as custom script and it works wonderfully! Thanks a milllion bunch!