- Joined
- Jul 20, 2004
- Messages
- 156
This might go in Jass, if it does, sorry for the mis-post.
Alright, my trigger in jass looks like this:
function Trig_Cinematic_Trigger_002_Conditions takes nothing returns boolean
if ( not ( GetTriggerUnit() == gg_unit_u002_0060 ) ) then
return false
endif
return true
endfunction
function Trig_Cinematic_Trigger_002_Actions takes nothing returns nothing
call PanCameraToTimedLocForPlayer( Player(0), GetRectCenter(gg_rct_Region_008), 1.00 )
call TriggerSleepAction( 2 )
call SetUnitPositionLocFacingBJ( gg_unit_u002_0060, GetRectCenter(gg_rct_Region_008), 90.00 )
call TriggerSleepAction( 2.00 )
call SetUnitAnimation( gg_unit_u002_0060, "Attack" )
call PanCameraToTimedLocForPlayer( Player(0), GetRectCenter(gg_rct_Region_009), 1.00 )
call TriggerSleepAction( 1.00 )
call AddSpecialEffectLocBJ( GetRectCenter(gg_rct_Region_040), "Abilities\\Spells\\Human\\MarkOfChaos\\MarkOfChaosTarget.mdl" )
call TriggerSleepAction( 1.00 )
call KillUnit( gg_unit_h00H_0050 )
call TriggerSleepAction( 4.00 )
call PanCameraToTimedLocForPlayer( Player(0), GetRectCenter(gg_rct_Region_006), 1.00 )
call TransmissionFromUnitWithNameBJ( GetPlayersAll(), gg_unit_h00B_0043, "TRIGSTR_126", gg_snd_Commander8_JesseCox, "TRIGSTR_127", bj_TIMETYPE_ADD, 0, true )
call IssuePointOrderLocBJ( gg_unit_u002_0060, "move", GetRectCenter(gg_rct_Region_010) )
call DisableTrigger( GetTriggeringTrigger() )
endfunction
//===========================================================================
function InitTrig_Cinematic_Trigger_002 takes nothing returns nothing
set gg_trg_Cinematic_Trigger_002 = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Cinematic_Trigger_002, gg_rct_Region_008 )
call TriggerAddCondition( gg_trg_Cinematic_Trigger_002, Condition( function Trig_Cinematic_Trigger_002_Conditions ) )
call TriggerAddAction( gg_trg_Cinematic_Trigger_002, function Trig_Cinematic_Trigger_002_Actions )
endfunction
Now, look for the line: call TriggerSleepAction( 1.00 ) (I colored it red). Right under that, I want a unit to cast this spell:
constant function RequiemId takes nothing returns integer
return 'A000'
endfunction
function RequiemId_Conditions takes nothing returns boolean
return GetSpellAbilityId() == RequiemId()
endfunction
function Requiem_Actions takes nothing returns nothing
local unit caster=GetTriggerUnit()
local unit first
local unit impacter
local location target=GetSpellTargetLoc()
local location temp
local trigger end=CreateTrigger()
local timer t=CreateTimer()
local integer a=0
local integer n=0
local group impact=CreateGroup()
call TriggerRegisterUnitEvent( end,caster,EVENT_UNIT_SPELL_ENDCAST)
call TimerStart(t,4.5,false,null)
loop
exitwhen TimerGetRemaining(t) <= 0 or GetTriggerEvalCount(end) > 0
set a=0
loop
exitwhen a > 4
set temp=PolarProjectionBJ(target, 450.00, (90.00*a + 8*n))
call DestroyEffect(AddSpecialEffectLocBJ(temp, "Abilities\\Spells\\Undead\\RaiseSkeletonWarrior\\RaiseSkeleton.mdl" ))
call RemoveLocation(temp)
set a=a+1
endloop
set n=n+1
call TriggerSleepAction(0)
endloop
set n=0
if GetTriggerEvalCount(end) == 0 then
loop
exitwhen n > 32
set a=0
loop
exitwhen a > 6
set temp = PolarProjectionBJ(target,(500.00 - 30.00*n),(60.00*a + 10.00*n))
call DestroyEffect(AddSpecialEffectLocBJ(temp, "Abilities\\Spells\\Undead\\Impale\\ImpaleHitTarget.mdl" ))
set impact=GetUnitsInRangeOfLocAll(60.00,temp)
loop
set first=FirstOfGroup(impact)
exitwhen first == null
if IsUnitType(first, UNIT_TYPE_FLYING) == false and IsUnitEnemy(first, GetOwningPlayer(caster)) == true then
set impacter = CreateUnitAtLoc(GetOwningPlayer(caster),'h004',GetUnitLoc(first),0)
call IssuePointOrderLocBJ(impacter, "impale", GetUnitLoc(first))
call UnitApplyTimedLifeBJ(1.5,'BTLF',impacter)
set impacter = null
endif
call GroupRemoveUnit(impact,first)
endloop
call RemoveLocation(temp)
call DestroyGroup(impact)
set a=a+1
endloop
set n=n+1
call TriggerSleepAction(0)
endloop
endif
set caster=null
set impact=null
call DestroyTimer(t)
set t=null
call RemoveLocation(target)
set target=null
set temp=null
call DestroyTrigger(end)
set end=null
endfunction
function InitTrig_Requiem takes nothing returns nothing
set gg_trg_Requiem = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ(gg_trg_Requiem,EVENT_PLAYER_UNIT_SPELL_CHANNEL)
call TriggerAddCondition(gg_trg_Requiem, Condition(function RequiemId_Conditions))
call TriggerAddAction(gg_trg_Requiem, function Requiem_Actions)
endfunction
Note: I know that this spell is Requiem, which was made by TwistedFortune, edited by Viki, and don't worry, I have given credit to them.
Does anyone know how to get that in there? What should I type before and after the spell to make it work?
Thx for taking the time for reading this and thanks a lot more if you can answer it.
Alright, my trigger in jass looks like this:
function Trig_Cinematic_Trigger_002_Conditions takes nothing returns boolean
if ( not ( GetTriggerUnit() == gg_unit_u002_0060 ) ) then
return false
endif
return true
endfunction
function Trig_Cinematic_Trigger_002_Actions takes nothing returns nothing
call PanCameraToTimedLocForPlayer( Player(0), GetRectCenter(gg_rct_Region_008), 1.00 )
call TriggerSleepAction( 2 )
call SetUnitPositionLocFacingBJ( gg_unit_u002_0060, GetRectCenter(gg_rct_Region_008), 90.00 )
call TriggerSleepAction( 2.00 )
call SetUnitAnimation( gg_unit_u002_0060, "Attack" )
call PanCameraToTimedLocForPlayer( Player(0), GetRectCenter(gg_rct_Region_009), 1.00 )
call TriggerSleepAction( 1.00 )
call AddSpecialEffectLocBJ( GetRectCenter(gg_rct_Region_040), "Abilities\\Spells\\Human\\MarkOfChaos\\MarkOfChaosTarget.mdl" )
call TriggerSleepAction( 1.00 )
call KillUnit( gg_unit_h00H_0050 )
call TriggerSleepAction( 4.00 )
call PanCameraToTimedLocForPlayer( Player(0), GetRectCenter(gg_rct_Region_006), 1.00 )
call TransmissionFromUnitWithNameBJ( GetPlayersAll(), gg_unit_h00B_0043, "TRIGSTR_126", gg_snd_Commander8_JesseCox, "TRIGSTR_127", bj_TIMETYPE_ADD, 0, true )
call IssuePointOrderLocBJ( gg_unit_u002_0060, "move", GetRectCenter(gg_rct_Region_010) )
call DisableTrigger( GetTriggeringTrigger() )
endfunction
//===========================================================================
function InitTrig_Cinematic_Trigger_002 takes nothing returns nothing
set gg_trg_Cinematic_Trigger_002 = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Cinematic_Trigger_002, gg_rct_Region_008 )
call TriggerAddCondition( gg_trg_Cinematic_Trigger_002, Condition( function Trig_Cinematic_Trigger_002_Conditions ) )
call TriggerAddAction( gg_trg_Cinematic_Trigger_002, function Trig_Cinematic_Trigger_002_Actions )
endfunction
Now, look for the line: call TriggerSleepAction( 1.00 ) (I colored it red). Right under that, I want a unit to cast this spell:
constant function RequiemId takes nothing returns integer
return 'A000'
endfunction
function RequiemId_Conditions takes nothing returns boolean
return GetSpellAbilityId() == RequiemId()
endfunction
function Requiem_Actions takes nothing returns nothing
local unit caster=GetTriggerUnit()
local unit first
local unit impacter
local location target=GetSpellTargetLoc()
local location temp
local trigger end=CreateTrigger()
local timer t=CreateTimer()
local integer a=0
local integer n=0
local group impact=CreateGroup()
call TriggerRegisterUnitEvent( end,caster,EVENT_UNIT_SPELL_ENDCAST)
call TimerStart(t,4.5,false,null)
loop
exitwhen TimerGetRemaining(t) <= 0 or GetTriggerEvalCount(end) > 0
set a=0
loop
exitwhen a > 4
set temp=PolarProjectionBJ(target, 450.00, (90.00*a + 8*n))
call DestroyEffect(AddSpecialEffectLocBJ(temp, "Abilities\\Spells\\Undead\\RaiseSkeletonWarrior\\RaiseSkeleton.mdl" ))
call RemoveLocation(temp)
set a=a+1
endloop
set n=n+1
call TriggerSleepAction(0)
endloop
set n=0
if GetTriggerEvalCount(end) == 0 then
loop
exitwhen n > 32
set a=0
loop
exitwhen a > 6
set temp = PolarProjectionBJ(target,(500.00 - 30.00*n),(60.00*a + 10.00*n))
call DestroyEffect(AddSpecialEffectLocBJ(temp, "Abilities\\Spells\\Undead\\Impale\\ImpaleHitTarget.mdl" ))
set impact=GetUnitsInRangeOfLocAll(60.00,temp)
loop
set first=FirstOfGroup(impact)
exitwhen first == null
if IsUnitType(first, UNIT_TYPE_FLYING) == false and IsUnitEnemy(first, GetOwningPlayer(caster)) == true then
set impacter = CreateUnitAtLoc(GetOwningPlayer(caster),'h004',GetUnitLoc(first),0)
call IssuePointOrderLocBJ(impacter, "impale", GetUnitLoc(first))
call UnitApplyTimedLifeBJ(1.5,'BTLF',impacter)
set impacter = null
endif
call GroupRemoveUnit(impact,first)
endloop
call RemoveLocation(temp)
call DestroyGroup(impact)
set a=a+1
endloop
set n=n+1
call TriggerSleepAction(0)
endloop
endif
set caster=null
set impact=null
call DestroyTimer(t)
set t=null
call RemoveLocation(target)
set target=null
set temp=null
call DestroyTrigger(end)
set end=null
endfunction
function InitTrig_Requiem takes nothing returns nothing
set gg_trg_Requiem = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ(gg_trg_Requiem,EVENT_PLAYER_UNIT_SPELL_CHANNEL)
call TriggerAddCondition(gg_trg_Requiem, Condition(function RequiemId_Conditions))
call TriggerAddAction(gg_trg_Requiem, function Requiem_Actions)
endfunction
Note: I know that this spell is Requiem, which was made by TwistedFortune, edited by Viki, and don't worry, I have given credit to them.
Does anyone know how to get that in there? What should I type before and after the spell to make it work?
Thx for taking the time for reading this and thanks a lot more if you can answer it.