Вы находитесь на сайте модмейкеров.
Четверг, 21.11.2024, 20:10
Участники · Правила форума · ПОИСК!
  • Страница 1 из 2
  • 1
  • 2
  • »
[Статья]Создание снайперки
GlaberДата: Понедельник, 11.10.2010, 17:47 | Сообщение # 1



Сообщений: 1057

Включение/Выключение прицела
Code
function Trig_Rotate_on_off_Conditions takes nothing returns boolean
     if ( not ( GetSpellAbilityId() == 'A001' ) ) then
         return false
     endif
     return true
endfunction

function Trig_Rotate_on_off_Func003C takes nothing returns boolean
     if ( not ( udg_Rotate[GetConvertedPlayerId(udg_TempPlayer)] == true ) ) then
         return false
     endif
     return true
endfunction

function Trig_Rotate_on_off_Actions takes nothing returns nothing
     set udg_TempUnit = GetSpellAbilityUnit()
     set udg_TempPlayer = GetOwningPlayer(udg_TempUnit)
     if ( Trig_Rotate_on_off_Func003C() ) then
         set udg_Rotate[GetConvertedPlayerId(udg_TempPlayer)] = false
         call DisplayTextToForce( GetForceOfPlayer(udg_TempPlayer), "TRIGSTR_1065" )
         call ResetToGameCameraForPlayer( udg_TempPlayer, 0 )
     else
         set udg_Rotate[GetConvertedPlayerId(udg_TempPlayer)] = true
         call DisplayTextToForce( GetForceOfPlayer(udg_TempPlayer), "TRIGSTR_1064" )
     endif
     set udg_TempUnit = null
     set udg_TempPlayer = null
endfunction

//===========================================================================
function InitTrig_Rotate_on_off takes nothing returns nothing
     set gg_trg_Rotate_on_off = CreateTrigger(  )
     call TriggerRegisterAnyUnitEventBJ( gg_trg_Rotate_on_off, EVENT_PLAYER_UNIT_SPELL_CAST )
     call TriggerAddCondition( gg_trg_Rotate_on_off, Condition( function Trig_Rotate_on_off_Conditions ) )
     call TriggerAddAction( gg_trg_Rotate_on_off, function Trig_Rotate_on_off_Actions )
endfunction


Прицел
Code
function Trig_Sniper_Scope_Conditions takes nothing returns boolean
     if ( not ( GetSpellAbilityId() == 'A002' ) ) then
         return false
     endif
     return true
endfunction

function Trig_Sniper_Scope_Func004C takes nothing returns boolean
     if ( not ( udg_ScopeOn[GetConvertedPlayerId(udg_TempPlayer)] == false ) ) then
         return false
     endif
     return true
endfunction

function Trig_Sniper_Scope_Actions takes nothing returns nothing
     set udg_TempUnit = GetSpellAbilityUnit()
     set udg_TempPlayer = GetOwningPlayer(udg_TempUnit)
     if ( Trig_Sniper_Scope_Func004C() ) then
         set udg_Rotation[GetConvertedPlayerId(udg_TempPlayer)] = GetUnitFacing(udg_TempUnit)
         call CinematicFilterGenericForPlayer(udg_TempPlayer, 2.0, BLEND_MODE_BLEND, "ReplaceableTextures\\CameraMasks\\Sniper Rifle Scope",  100.0, 100.0, 100.0, 0.0, 100.0, 100.0, 100.0, 0.0 )
         set udg_ScopeOn[GetConvertedPlayerId(udg_TempPlayer)] = true
         call Disable_Movement(udg_Sniper[ GetConvertedPlayerId(udg_TempPlayer) ])
         call SetUnitAbilityLevelSwapped( 'A003', udg_TempUnit, 1 )
     else
         call CinematicFilterGenericForPlayer(udg_TempPlayer, 2.0, BLEND_MODE_BLEND, "ReplaceableTextures\\CameraMasks\\White_mask.blp",  100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0 )
         set udg_ScopeOn[GetConvertedPlayerId(udg_TempPlayer)] = false
         call ResetToGameCameraForPlayer( udg_TempPlayer, 0 )
         call Enable_Movement(udg_Sniper[ GetConvertedPlayerId(udg_TempPlayer) ])
         call SetUnitAbilityLevelSwapped( 'A003', udg_TempUnit, 1 )
     endif
     set udg_TempUnit = null
     set udg_TempPlayer = null
endfunction

//===========================================================================
function InitTrig_Sniper_Scope takes nothing returns nothing
     set gg_trg_Sniper_Scope = CreateTrigger(  )
     call TriggerRegisterAnyUnitEventBJ( gg_trg_Sniper_Scope, EVENT_PLAYER_UNIT_SPELL_CAST )
     call TriggerAddCondition( gg_trg_Sniper_Scope, Condition( function Trig_Sniper_Scope_Conditions ) )
     call TriggerAddAction( gg_trg_Sniper_Scope, function Trig_Sniper_Scope_Actions )
endfunction

Камера
Code
function Trig_Sniper_Scope_Cam_Func002Func003Func005C takes nothing returns boolean
     if ( not ( udg_Rotate[GetConvertedPlayerId(ConvertedPlayer(GetForLoopIndexA()))] == true ) ) then
         return false
     endif
     return true
endfunction

function Trig_Sniper_Scope_Cam_Func002Func003C takes nothing returns boolean
     if ( not ( udg_ScopeOn[GetForLoopIndexA()] == true ) ) then
         return false
     endif
     return true
endfunction

function Trig_Sniper_Scope_Cam_Actions takes nothing returns nothing
     set bj_forLoopAIndex = 1
     set bj_forLoopAIndexEnd = 12
     loop
         exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
         set udg_TempPoint = GetUnitLoc(udg_Sniper[GetForLoopIndexA()])
         set udg_TempPoint2 = PolarProjectionBJ(udg_TempPoint, 75.00, udg_Rotation[GetForLoopIndexA()])
         if ( Trig_Sniper_Scope_Cam_Func002Func003C() ) then
             call SetCameraTargetControllerNoZForPlayer( ConvertedPlayer(GetForLoopIndexA()), udg_Sniper[GetForLoopIndexA()], 0.00, 0.00, true )
             call PanCameraToTimedLocForPlayer( ConvertedPlayer(GetForLoopIndexA()), udg_TempPoint2, 0.00 )
             call SetCameraFieldForPlayer( ConvertedPlayer(GetForLoopIndexA()), CAMERA_FIELD_TARGET_DISTANCE, 0.00, 0 )
             call SetCameraFieldForPlayer( ConvertedPlayer(GetForLoopIndexA()), CAMERA_FIELD_FIELD_OF_VIEW, ( 70.00 - ( I2R(GetUnitAbilityLevelSwapped('A003', udg_Sniper[GetForLoopIndexA()])) * 12.50 ) ), 0.20 )
             call SetCameraFieldForPlayer( ConvertedPlayer(GetForLoopIndexA()), CAMERA_FIELD_ROTATION, udg_Rotation[GetForLoopIndexA()], 0.04 )
             call SetCameraFieldForPlayer( ConvertedPlayer(GetForLoopIndexA()), CAMERA_FIELD_ZOFFSET, 50.00, 0 )
             call SetCameraFieldForPlayer( ConvertedPlayer(GetForLoopIndexA()), CAMERA_FIELD_ANGLE_OF_ATTACK, udg_AOA[GetForLoopIndexA()], 0.00 )
             call SetCameraFieldForPlayer( ConvertedPlayer(GetForLoopIndexA()), CAMERA_FIELD_FARZ, 1000000000.00, 0 )
             call SelectUnitForPlayerSingle( udg_Sniper[GetForLoopIndexA()], ConvertedPlayer(GetForLoopIndexA()) )
         else
             call SetCameraTargetControllerNoZForPlayer( ConvertedPlayer(GetForLoopIndexA()), udg_Sniper[GetForLoopIndexA()], 0.00, 0.00, true )
             call PanCameraToTimedLocForPlayer( ConvertedPlayer(GetForLoopIndexA()), udg_TempPoint, 0.00 )
             call SetCameraFieldForPlayer( ConvertedPlayer(GetForLoopIndexA()), CAMERA_FIELD_TARGET_DISTANCE, 1500.00, 0 )
             call SetCameraFieldForPlayer( ConvertedPlayer(GetForLoopIndexA()), CAMERA_FIELD_FIELD_OF_VIEW, bj_CAMERA_DEFAULT_FOV, 0.00 )
             if ( Trig_Sniper_Scope_Cam_Func002Func003Func005C() ) then
                 call SetCameraFieldForPlayer( ConvertedPlayer(GetForLoopIndexA()), CAMERA_FIELD_ROTATION, GetUnitFacing(udg_Sniper[GetForLoopIndexA()]), 0.75 )
             else
             endif
             call SetCameraFieldForPlayer( ConvertedPlayer(GetForLoopIndexA()), CAMERA_FIELD_ZOFFSET, 0.00, 0 )
             call SetCameraFieldForPlayer( ConvertedPlayer(GetForLoopIndexA()), CAMERA_FIELD_ANGLE_OF_ATTACK, 345.00, 0 )
             call SetCameraFieldForPlayer( ConvertedPlayer(GetForLoopIndexA()), CAMERA_FIELD_FARZ, 1000000000.00, 0 )
             call SelectUnitForPlayerSingle( udg_Sniper[GetForLoopIndexA()], ConvertedPlayer(GetForLoopIndexA()) )
         endif
         call RemoveLocation(udg_TempPoint)
         call RemoveLocation(udg_TempPoint2)
         set bj_forLoopAIndex = bj_forLoopAIndex + 1
     endloop
endfunction

//===========================================================================
function InitTrig_Sniper_Scope_Cam takes nothing returns nothing
     set gg_trg_Sniper_Scope_Cam = CreateTrigger(  )
     call TriggerRegisterTimerEventPeriodic( gg_trg_Sniper_Scope_Cam, 0.03 )
     call TriggerAddAction( gg_trg_Sniper_Scope_Cam, function Trig_Sniper_Scope_Cam_Actions )
endfunction

+/- прицел
Code
function Trig_Zoom_Conditions takes nothing returns boolean
     if ( not ( GetSpellAbilityId() == 'A003' ) ) then
         return false
     endif
     if ( not ( udg_ScopeOn[GetConvertedPlayerId(GetOwningPlayer(GetSpellAbilityUnit()))] == true ) ) then
         return false
     endif
     return true
endfunction

function Trig_Zoom_Func002C takes nothing returns boolean
     if ( not ( GetUnitAbilityLevelSwapped('A003', udg_TempUnit) == 4 ) ) then
         return false
     endif
     return true
endfunction

function Trig_Zoom_Actions takes nothing returns nothing
     set udg_TempUnit = GetSpellAbilityUnit()
     if ( Trig_Zoom_Func002C() ) then
         call SetUnitAbilityLevelSwapped( 'A003', udg_TempUnit, 1 )
     else
         call SetUnitAbilityLevelSwapped( 'A003', udg_TempUnit, ( GetUnitAbilityLevelSwapped('A003', udg_TempUnit) + 1 ) )
     endif
endfunction

//===========================================================================
function InitTrig_Zoom takes nothing returns nothing
     set gg_trg_Zoom = CreateTrigger(  )
     call TriggerRegisterAnyUnitEventBJ( gg_trg_Zoom, EVENT_PLAYER_UNIT_SPELL_CAST )
     call TriggerAddCondition( gg_trg_Zoom, Condition( function Trig_Zoom_Conditions ) )
     call TriggerAddAction( gg_trg_Zoom, function Trig_Zoom_Actions )
endfunction


Влево
Code
function Trig_RotationLeftOn_Actions takes nothing returns nothing
     set udg_TempPlayer = GetTriggerPlayer()
     set udg_RotationLeftOn[GetConvertedPlayerId(udg_TempPlayer)] = true
     set udg_TempPlayer = null
endfunction

//===========================================================================
function InitTrig_RotationLeftOn takes nothing returns nothing
     set gg_trg_RotationLeftOn = CreateTrigger(  )
     call TriggerRegisterPlayerKeyEventBJ( gg_trg_RotationLeftOn, Player(0), bj_KEYEVENTTYPE_DEPRESS, bj_KEYEVENTKEY_LEFT )
     call TriggerRegisterPlayerKeyEventBJ( gg_trg_RotationLeftOn, Player(1), bj_KEYEVENTTYPE_DEPRESS, bj_KEYEVENTKEY_LEFT )
     call TriggerRegisterPlayerKeyEventBJ( gg_trg_RotationLeftOn, Player(2), bj_KEYEVENTTYPE_DEPRESS, bj_KEYEVENTKEY_LEFT )
     call TriggerRegisterPlayerKeyEventBJ( gg_trg_RotationLeftOn, Player(3), bj_KEYEVENTTYPE_DEPRESS, bj_KEYEVENTKEY_LEFT )
     call TriggerRegisterPlayerKeyEventBJ( gg_trg_RotationLeftOn, Player(4), bj_KEYEVENTTYPE_DEPRESS, bj_KEYEVENTKEY_LEFT )
     call TriggerRegisterPlayerKeyEventBJ( gg_trg_RotationLeftOn, Player(5), bj_KEYEVENTTYPE_DEPRESS, bj_KEYEVENTKEY_LEFT )
     call TriggerRegisterPlayerKeyEventBJ( gg_trg_RotationLeftOn, Player(6), bj_KEYEVENTTYPE_DEPRESS, bj_KEYEVENTKEY_LEFT )
     call TriggerRegisterPlayerKeyEventBJ( gg_trg_RotationLeftOn, Player(7), bj_KEYEVENTTYPE_DEPRESS, bj_KEYEVENTKEY_LEFT )
     call TriggerRegisterPlayerKeyEventBJ( gg_trg_RotationLeftOn, Player(8), bj_KEYEVENTTYPE_DEPRESS, bj_KEYEVENTKEY_LEFT )
     call TriggerRegisterPlayerKeyEventBJ( gg_trg_RotationLeftOn, Player(9), bj_KEYEVENTTYPE_DEPRESS, bj_KEYEVENTKEY_LEFT )
     call TriggerRegisterPlayerKeyEventBJ( gg_trg_RotationLeftOn, Player(10), bj_KEYEVENTTYPE_DEPRESS, bj_KEYEVENTKEY_LEFT )
     call TriggerRegisterPlayerKeyEventBJ( gg_trg_RotationLeftOn, Player(11), bj_KEYEVENTTYPE_DEPRESS, bj_KEYEVENTKEY_LEFT )
     call TriggerAddAction( gg_trg_RotationLeftOn, function Trig_RotationLeftOn_Actions )
endfunction

Влево

Code
function Trig_RotationLeft_Func001Func001C takes nothing returns boolean
     if ( not ( udg_RotationLeftOn[GetForLoopIndexA()] == true ) ) then
         return false
     endif
     return true
endfunction

function Trig_RotationLeft_Actions takes nothing returns nothing
     set bj_forLoopAIndex = 1
     set bj_forLoopAIndexEnd = 12
     loop
         exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
         if ( Trig_RotationLeft_Func001Func001C() ) then
             set udg_Rotation[GetForLoopIndexA()] = ( udg_Rotation[GetForLoopIndexA()] + ( 0.09 / I2R(GetUnitAbilityLevelSwapped('A003', udg_Sniper[GetForLoopIndexA()])) ) )
             call SetUnitFacingTimed( udg_Sniper[GetForLoopIndexA()], udg_Rotation[GetForLoopIndexA()], 0 )
         else
         endif
         set bj_forLoopAIndex = bj_forLoopAIndex + 1
     endloop
endfunction

//===========================================================================
function InitTrig_RotationLeft takes nothing returns nothing
     set gg_trg_RotationLeft = CreateTrigger(  )
     call TriggerRegisterTimerEventPeriodic( gg_trg_RotationLeft, 0.01 )
     call TriggerAddAction( gg_trg_RotationLeft, function Trig_RotationLeft_Actions )
endfunction

Влево

[code]function Trig_RotationLeftOff_Actions takes nothing returns nothing
set udg_TempPlayer = GetTriggerPlayer()
set udg_RotationLeftOn[GetConvertedPlayerId(udg_TempPlayer)] = false
set udg_TempPlayer = null
endfunction

//===========================================================================
function InitTrig_RotationLeftOff takes nothing returns nothing
set gg_trg_RotationLeftOff = CreateTrigger( )
call TriggerRegisterPlayerKeyEventBJ( gg_trg_RotationLeftOff, Player(0), bj_KEYEVENTTYPE_RELEASE, bj_KEYEVENTKEY_LEFT )
call TriggerRegisterPlayerKeyEventBJ( gg_trg_RotationLeftOff, Player(1), bj_KEYEVENTTYPE_RELEASE, bj_KEYEVENTKEY_LEFT )
call TriggerRegisterPlayerKeyEventBJ( gg_trg_RotationLeftOff, Player(2), bj_KEYEVENTTYPE_RELEASE, bj_KEYEVENTKEY_LEFT )
call TriggerRegisterPlayerKeyEventBJ( gg_trg_RotationLeftOff, Player(3), bj_KEYEVENTTYPE_RELEASE, bj_KEYEVENTKEY_LEFT )
call TriggerRegisterPlayerKeyEventBJ( gg_trg_RotationLeftOff, Player(4), bj_KEYEVENTTYPE_RELEASE, bj_KEYEVENTKEY_LEFT )
call TriggerRegisterPlayerKeyEventBJ( gg_trg_RotationLeftOff, Player(5), bj_KEYEVENTTYPE_RELEASE, bj_KEYEVENTKEY_LEFT )
call TriggerRegisterPlayerKeyEventBJ( gg_trg_RotationLeftOff, Player(6), bj_KEYEVENTTYPE_RELEASE, bj_KEYEVENTKEY_LEFT )
call TriggerRegisterPlayerKeyEventBJ( gg_trg_RotationLeftOff, Player(7), bj_KEYEVENTTYPE_RELEASE, bj_KEYEVENTKEY_LEFT )
call TriggerRegisterPlayerKeyEventBJ( gg_trg_RotationLeftOff, Player(8), bj_KEYEVENTTYPE_RELEASE, bj_KEYEVENTKEY_LEFT )
call TriggerRegisterPlayerKeyEventBJ( gg_trg_RotationLeftOff, Player(9), bj_KEYEVENTTYPE_RELEASE, bj_KEYEVENTKEY_LEFT )
call TriggerRegisterPlayerKeyEventBJ( gg_trg_RotationLeftOff, Player(10), bj_KEYEVENTTYPE_RELEASE, bj_KEYEVENTKEY_LEFT )
call TriggerRegisterPlayerKeyEventBJ( gg_trg_RotationLeftOff, Player(11), bj_KEYEVENTTYPE_RELEASE, bj_KEYEVENTKEY_LEFT )
call TriggerAddAction( gg_trg_RotationLeftOff, function Trig_RotationLeftOff_Actions )
endfunction

Добавлено (11.10.2010, 17:46)
---------------------------------------------
[/code]
Вправо

Code
function Trig_RotationRightOn_Actions takes nothing returns nothing
     set udg_TempPlayer = GetTriggerPlayer()
     set udg_RotationRightOn[GetConvertedPlayerId(udg_TempPlayer)] = true
     set udg_TempPlayer = null
endfunction

//===========================================================================
function InitTrig_RotationRightOn takes nothing returns nothing
     set gg_trg_RotationRightOn = CreateTrigger(  )
     call TriggerRegisterPlayerKeyEventBJ( gg_trg_RotationRightOn, Player(0), bj_KEYEVENTTYPE_DEPRESS, bj_KEYEVENTKEY_RIGHT )
     call TriggerRegisterPlayerKeyEventBJ( gg_trg_RotationRightOn, Player(1), bj_KEYEVENTTYPE_DEPRESS, bj_KEYEVENTKEY_RIGHT )
     call TriggerRegisterPlayerKeyEventBJ( gg_trg_RotationRightOn, Player(2), bj_KEYEVENTTYPE_DEPRESS, bj_KEYEVENTKEY_RIGHT )
     call TriggerRegisterPlayerKeyEventBJ( gg_trg_RotationRightOn, Player(3), bj_KEYEVENTTYPE_DEPRESS, bj_KEYEVENTKEY_RIGHT )
     call TriggerRegisterPlayerKeyEventBJ( gg_trg_RotationRightOn, Player(4), bj_KEYEVENTTYPE_DEPRESS, bj_KEYEVENTKEY_RIGHT )
     call TriggerRegisterPlayerKeyEventBJ( gg_trg_RotationRightOn, Player(5), bj_KEYEVENTTYPE_DEPRESS, bj_KEYEVENTKEY_RIGHT )
     call TriggerRegisterPlayerKeyEventBJ( gg_trg_RotationRightOn, Player(6), bj_KEYEVENTTYPE_DEPRESS, bj_KEYEVENTKEY_RIGHT )
     call TriggerRegisterPlayerKeyEventBJ( gg_trg_RotationRightOn, Player(7), bj_KEYEVENTTYPE_DEPRESS, bj_KEYEVENTKEY_RIGHT )
     call TriggerRegisterPlayerKeyEventBJ( gg_trg_RotationRightOn, Player(8), bj_KEYEVENTTYPE_DEPRESS, bj_KEYEVENTKEY_RIGHT )
     call TriggerRegisterPlayerKeyEventBJ( gg_trg_RotationRightOn, Player(9), bj_KEYEVENTTYPE_DEPRESS, bj_KEYEVENTKEY_RIGHT )
     call TriggerRegisterPlayerKeyEventBJ( gg_trg_RotationRightOn, Player(10), bj_KEYEVENTTYPE_DEPRESS, bj_KEYEVENTKEY_RIGHT )
     call TriggerRegisterPlayerKeyEventBJ( gg_trg_RotationRightOn, Player(11), bj_KEYEVENTTYPE_DEPRESS, bj_KEYEVENTKEY_RIGHT )
     call TriggerAddAction( gg_trg_RotationRightOn, function Trig_RotationRightOn_Actions )
endfunction

Вправо
Code

function Trig_RotationRight_Func001Func001C takes nothing returns boolean
     if ( not ( udg_RotationRightOn[GetForLoopIndexA()] == true ) ) then
         return false
     endif
     return true
endfunction

function Trig_RotationRight_Actions takes nothing returns nothing
     set bj_forLoopAIndex = 1
     set bj_forLoopAIndexEnd = 12
     loop
         exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
         if ( Trig_RotationRight_Func001Func001C() ) then
             set udg_Rotation[GetForLoopIndexA()] = ( udg_Rotation[GetForLoopIndexA()] - ( 0.09 / I2R(GetUnitAbilityLevelSwapped('A003', udg_Sniper[GetForLoopIndexA()])) ) )
             call SetUnitFacingTimed( udg_Sniper[GetForLoopIndexA()], udg_Rotation[GetForLoopIndexA()], 0 )
         else
         endif
         set bj_forLoopAIndex = bj_forLoopAIndex + 1
     endloop
endfunction

//===========================================================================
function InitTrig_RotationRight takes nothing returns nothing
     set gg_trg_RotationRight = CreateTrigger(  )
     call TriggerRegisterTimerEventPeriodic( gg_trg_RotationRight, 0.01 )
     call TriggerAddAction( gg_trg_RotationRight, function Trig_RotationRight_Actions )
endfunction

Вверх
Code

function Trig_RotationUp_On_Actions takes nothing returns nothing
     set udg_TempPlayer = GetTriggerPlayer()
     set udg_AOASettingsUpOn[GetConvertedPlayerId(udg_TempPlayer)] = true
     set udg_TempPlayer = null
endfunction

//===========================================================================
function InitTrig_RotationUp_On takes nothing returns nothing
     set gg_trg_RotationUp_On = CreateTrigger(  )
     call TriggerRegisterPlayerKeyEventBJ( gg_trg_RotationUp_On, Player(0), bj_KEYEVENTTYPE_DEPRESS, bj_KEYEVENTKEY_UP )
     call TriggerRegisterPlayerKeyEventBJ( gg_trg_RotationUp_On, Player(1), bj_KEYEVENTTYPE_DEPRESS, bj_KEYEVENTKEY_UP )
     call TriggerRegisterPlayerKeyEventBJ( gg_trg_RotationUp_On, Player(2), bj_KEYEVENTTYPE_DEPRESS, bj_KEYEVENTKEY_UP )
     call TriggerRegisterPlayerKeyEventBJ( gg_trg_RotationUp_On, Player(3), bj_KEYEVENTTYPE_DEPRESS, bj_KEYEVENTKEY_UP )
     call TriggerRegisterPlayerKeyEventBJ( gg_trg_RotationUp_On, Player(4), bj_KEYEVENTTYPE_DEPRESS, bj_KEYEVENTKEY_UP )
     call TriggerRegisterPlayerKeyEventBJ( gg_trg_RotationUp_On, Player(5), bj_KEYEVENTTYPE_DEPRESS, bj_KEYEVENTKEY_UP )
     call TriggerRegisterPlayerKeyEventBJ( gg_trg_RotationUp_On, Player(6), bj_KEYEVENTTYPE_DEPRESS, bj_KEYEVENTKEY_UP )
     call TriggerRegisterPlayerKeyEventBJ( gg_trg_RotationUp_On, Player(7), bj_KEYEVENTTYPE_DEPRESS, bj_KEYEVENTKEY_UP )
     call TriggerRegisterPlayerKeyEventBJ( gg_trg_RotationUp_On, Player(8), bj_KEYEVENTTYPE_DEPRESS, bj_KEYEVENTKEY_UP )
     call TriggerRegisterPlayerKeyEventBJ( gg_trg_RotationUp_On, Player(9), bj_KEYEVENTTYPE_DEPRESS, bj_KEYEVENTKEY_UP )
     call TriggerRegisterPlayerKeyEventBJ( gg_trg_RotationUp_On, Player(10), bj_KEYEVENTTYPE_DEPRESS, bj_KEYEVENTKEY_UP )
     call TriggerRegisterPlayerKeyEventBJ( gg_trg_RotationUp_On, Player(11), bj_KEYEVENTTYPE_DEPRESS, bj_KEYEVENTKEY_UP )
     call TriggerAddAction( gg_trg_RotationUp_On, function Trig_RotationUp_On_Actions )
endfunction


Вверх
Code
function Trig_RotationUp_Func001Func001C takes nothing returns boolean
     if ( not ( udg_AOASettingsUpOn[GetForLoopIndexA()] == true ) ) then
         return false
     endif
     if ( not ( udg_AOA[GetForLoopIndexA()] <= 365.00 ) ) then
         return false
     endif
     return true
endfunction

function Trig_RotationUp_Actions takes nothing returns nothing
     set bj_forLoopAIndex = 1
     set bj_forLoopAIndexEnd = 12
     loop
         exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
         if ( Trig_RotationUp_Func001Func001C() ) then
             set udg_AOA[GetForLoopIndexA()] = ( udg_AOA[GetForLoopIndexA()] + ( 0.05 / I2R(GetUnitAbilityLevelSwapped('A003', udg_Sniper[GetForLoopIndexA()])) ) )
             set udg_BulletHeightModifier[GetForLoopIndexA()] = ( SinBJ(udg_AOA[GetForLoopIndexA()]) * 200.00 )
         else
         endif
         set bj_forLoopAIndex = bj_forLoopAIndex + 1
     endloop
endfunction

//===========================================================================
function InitTrig_RotationUp takes nothing returns nothing
     set gg_trg_RotationUp = CreateTrigger(  )
     call TriggerRegisterTimerEventPeriodic( gg_trg_RotationUp, 0.01 )
     call TriggerAddAction( gg_trg_RotationUp, function Trig_RotationUp_Actions )
endfunction

Вверх конец
Code

function Trig_RotationUp_Off_Actions takes nothing returns nothing
     set udg_TempPlayer = GetTriggerPlayer()
     set udg_AOASettingsUpOn[GetConvertedPlayerId(udg_TempPlayer)] = false
     set udg_TempPlayer = null
endfunction

//===========================================================================
function InitTrig_RotationUp_Off takes nothing returns nothing
     set gg_trg_RotationUp_Off = CreateTrigger(  )
     call TriggerRegisterPlayerKeyEventBJ( gg_trg_RotationUp_Off, Player(0), bj_KEYEVENTTYPE_RELEASE, bj_KEYEVENTKEY_UP )
     call TriggerRegisterPlayerKeyEventBJ( gg_trg_RotationUp_Off, Player(1), bj_KEYEVENTTYPE_RELEASE, bj_KEYEVENTKEY_UP )
     call TriggerRegisterPlayerKeyEventBJ( gg_trg_RotationUp_Off, Player(2), bj_KEYEVENTTYPE_RELEASE, bj_KEYEVENTKEY_UP )
     call TriggerRegisterPlayerKeyEventBJ( gg_trg_RotationUp_Off, Player(3), bj_KEYEVENTTYPE_RELEASE, bj_KEYEVENTKEY_UP )
     call TriggerRegisterPlayerKeyEventBJ( gg_trg_RotationUp_Off, Player(4), bj_KEYEVENTTYPE_RELEASE, bj_KEYEVENTKEY_UP )
     call TriggerRegisterPlayerKeyEventBJ( gg_trg_RotationUp_Off, Player(5), bj_KEYEVENTTYPE_RELEASE, bj_KEYEVENTKEY_UP )
     call TriggerRegisterPlayerKeyEventBJ( gg_trg_RotationUp_Off, Player(6), bj_KEYEVENTTYPE_RELEASE, bj_KEYEVENTKEY_UP )
     call TriggerRegisterPlayerKeyEventBJ( gg_trg_RotationUp_Off, Player(7), bj_KEYEVENTTYPE_RELEASE, bj_KEYEVENTKEY_UP )
     call TriggerRegisterPlayerKeyEventBJ( gg_trg_RotationUp_Off, Player(8), bj_KEYEVENTTYPE_RELEASE, bj_KEYEVENTKEY_UP )
     call TriggerRegisterPlayerKeyEventBJ( gg_trg_RotationUp_Off, Player(9), bj_KEYEVENTTYPE_RELEASE, bj_KEYEVENTKEY_UP )
     call TriggerRegisterPlayerKeyEventBJ( gg_trg_RotationUp_Off, Player(10), bj_KEYEVENTTYPE_RELEASE, bj_KEYEVENTKEY_UP )
     call TriggerRegisterPlayerKeyEventBJ( gg_trg_RotationUp_Off, Player(11), bj_KEYEVENTTYPE_RELEASE, bj_KEYEVENTKEY_UP )
     call TriggerAddAction( gg_trg_RotationUp_Off, function Trig_RotationUp_Off_Actions )
endfunction


Вниз
Code
function Trig_RotationDown_On_Actions takes nothing returns nothing
     set udg_TempPlayer = GetTriggerPlayer()
     set udg_AOASettingsDownOn[GetConvertedPlayerId(udg_TempPlayer)] = true
     set udg_TempPlayer = null
endfunction

//===========================================================================
function InitTrig_RotationDown_On takes nothing returns nothing
     set gg_trg_RotationDown_On = CreateTrigger(  )
     call TriggerRegisterPlayerKeyEventBJ( gg_trg_RotationDown_On, Player(0), bj_KEYEVENTTYPE_DEPRESS, bj_KEYEVENTKEY_DOWN )
     call TriggerRegisterPlayerKeyEventBJ( gg_trg_RotationDown_On, Player(1), bj_KEYEVENTTYPE_DEPRESS, bj_KEYEVENTKEY_DOWN )
     call TriggerRegisterPlayerKeyEventBJ( gg_trg_RotationDown_On, Player(2), bj_KEYEVENTTYPE_DEPRESS, bj_KEYEVENTKEY_DOWN )
     call TriggerRegisterPlayerKeyEventBJ( gg_trg_RotationDown_On, Player(3), bj_KEYEVENTTYPE_DEPRESS, bj_KEYEVENTKEY_DOWN )
     call TriggerRegisterPlayerKeyEventBJ( gg_trg_RotationDown_On, Player(4), bj_KEYEVENTTYPE_DEPRESS, bj_KEYEVENTKEY_DOWN )
     call TriggerRegisterPlayerKeyEventBJ( gg_trg_RotationDown_On, Player(5), bj_KEYEVENTTYPE_DEPRESS, bj_KEYEVENTKEY_DOWN )
     call TriggerRegisterPlayerKeyEventBJ( gg_trg_RotationDown_On, Player(6), bj_KEYEVENTTYPE_DEPRESS, bj_KEYEVENTKEY_DOWN )
     call TriggerRegisterPlayerKeyEventBJ( gg_trg_RotationDown_On, Player(7), bj_KEYEVENTTYPE_DEPRESS, bj_KEYEVENTKEY_DOWN )
     call TriggerRegisterPlayerKeyEventBJ( gg_trg_RotationDown_On, Player(8), bj_KEYEVENTTYPE_DEPRESS, bj_KEYEVENTKEY_DOWN )
     call TriggerRegisterPlayerKeyEventBJ( gg_trg_RotationDown_On, Player(9), bj_KEYEVENTTYPE_DEPRESS, bj_KEYEVENTKEY_DOWN )
     call TriggerRegisterPlayerKeyEventBJ( gg_trg_RotationDown_On, Player(10), bj_KEYEVENTTYPE_DEPRESS, bj_KEYEVENTKEY_DOWN )
     call TriggerRegisterPlayerKeyEventBJ( gg_trg_RotationDown_On, Player(11), bj_KEYEVENTTYPE_DEPRESS, bj_KEYEVENTKEY_DOWN )
     call TriggerAddAction( gg_trg_RotationDown_On, function Trig_RotationDown_On_Actions )
endfunction


Вниз
Code
function Trig_RotationDown_Func001Func001C takes nothing returns boolean
     if ( not ( udg_AOASettingsDownOn[GetForLoopIndexA()] == true ) ) then
         return false
     endif
     if ( not ( udg_AOA[GetForLoopIndexA()] >= 350.00 ) ) then
         return false
     endif
     return true
endfunction

function Trig_RotationDown_Actions takes nothing returns nothing
     set bj_forLoopAIndex = 1
     set bj_forLoopAIndexEnd = 12
     loop
         exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
         if ( Trig_RotationDown_Func001Func001C() ) then
             set udg_AOA[GetForLoopIndexA()] = ( udg_AOA[GetForLoopIndexA()] - ( 0.05 / I2R(GetUnitAbilityLevelSwapped('A003', udg_Sniper[GetForLoopIndexA()])) ) )
             set udg_BulletHeightModifier[GetForLoopIndexA()] = ( SinBJ(udg_AOA[GetForLoopIndexA()]) * 200.00 )
         else
         endif
         set bj_forLoopAIndex = bj_forLoopAIndex + 1
     endloop
endfunction

//===========================================================================
function InitTrig_RotationDown takes nothing returns nothing
     set gg_trg_RotationDown = CreateTrigger(  )
     call TriggerRegisterTimerEventPeriodic( gg_trg_RotationDown, 0.01 )
     call TriggerAddAction( gg_trg_RotationDown, function Trig_RotationDown_Actions )
endfunction

Конец верх
Code

function Trig_RotationDown_Off_Actions takes nothing returns nothing
     set udg_TempPlayer = GetTriggerPlayer()
     set udg_AOASettingsDownOn[GetConvertedPlayerId(udg_TempPlayer)] = false
     set udg_TempPlayer = null
endfunction

//===========================================================================
function InitTrig_RotationDown_Off takes nothing returns nothing
     set gg_trg_RotationDown_Off = CreateTrigger(  )
     call TriggerRegisterPlayerKeyEventBJ( gg_trg_RotationDown_Off, Player(0), bj_KEYEVENTTYPE_RELEASE, bj_KEYEVENTKEY_DOWN )
     call TriggerRegisterPlayerKeyEventBJ( gg_trg_RotationDown_Off, Player(1), bj_KEYEVENTTYPE_RELEASE, bj_KEYEVENTKEY_DOWN )
     call TriggerRegisterPlayerKeyEventBJ( gg_trg_RotationDown_Off, Player(2), bj_KEYEVENTTYPE_RELEASE, bj_KEYEVENTKEY_DOWN )
     call TriggerRegisterPlayerKeyEventBJ( gg_trg_RotationDown_Off, Player(3), bj_KEYEVENTTYPE_RELEASE, bj_KEYEVENTKEY_DOWN )
     call TriggerRegisterPlayerKeyEventBJ( gg_trg_RotationDown_Off, Player(4), bj_KEYEVENTTYPE_RELEASE, bj_KEYEVENTKEY_DOWN )
     call TriggerRegisterPlayerKeyEventBJ( gg_trg_RotationDown_Off, Player(5), bj_KEYEVENTTYPE_RELEASE, bj_KEYEVENTKEY_DOWN )
     call TriggerRegisterPlayerKeyEventBJ( gg_trg_RotationDown_Off, Player(6), bj_KEYEVENTTYPE_RELEASE, bj_KEYEVENTKEY_DOWN )
     call TriggerRegisterPlayerKeyEventBJ( gg_trg_RotationDown_Off, Player(7), bj_KEYEVENTTYPE_RELEASE, bj_KEYEVENTKEY_DOWN )
     call TriggerRegisterPlayerKeyEventBJ( gg_trg_RotationDown_Off, Player(8), bj_KEYEVENTTYPE_RELEASE, bj_KEYEVENTKEY_DOWN )
     call TriggerRegisterPlayerKeyEventBJ( gg_trg_RotationDown_Off, Player(9), bj_KEYEVENTTYPE_RELEASE, bj_KEYEVENTKEY_DOWN )
     call TriggerRegisterPlayerKeyEventBJ( gg_trg_RotationDown_Off, Player(10), bj_KEYEVENTTYPE_RELEASE, bj_KEYEVENTKEY_DOWN )
     call TriggerRegisterPlayerKeyEventBJ( gg_trg_RotationDown_Off, Player(11), bj_KEYEVENTTYPE_RELEASE, bj_KEYEVENTKEY_DOWN )
     call TriggerAddAction( gg_trg_RotationDown_Off, function Trig_RotationDown_Off_Actions )
endfunction

Добавлено (11.10.2010, 17:47)
---------------------------------------------
Стрельба

Code
function Trig_Shoot_Conditions takes nothing returns boolean
     if ( not ( GetSpellAbilityId() == 'A000' ) ) then
         return false
     endif
     if ( not ( udg_ScopeOn[GetConvertedPlayerId(GetOwningPlayer(GetSpellAbilityUnit()))] == true ) ) then
         return false
     endif
     return true
endfunction

function Trig_Shoot_Actions takes nothing returns nothing
     set udg_TempUnit = GetSpellAbilityUnit()
     set udg_TempPlayer = GetOwningPlayer(udg_TempUnit)
     set udg_TempPoint = GetUnitLoc(udg_TempUnit)
     set udg_TempPoint2 = PolarProjectionBJ(udg_TempPoint, 80.00, udg_Rotation[GetConvertedPlayerId(udg_TempPlayer)])
     call CreateNUnitsAtLoc( 1, 'n000', udg_TempPlayer, udg_TempPoint2, udg_Rotation[GetConvertedPlayerId(udg_TempPlayer)] )
     set udg_Bullet = GetLastCreatedUnit()
     set udg_N = ( udg_N + 1 )
     set udg_BulletHeightModifier[udg_N] = udg_BulletHeightModifier[GetConvertedPlayerId(udg_TempPlayer)]
     call SetUnitUserData( udg_Bullet, udg_N )
     call UnitAddAbilityBJ( 'Amrf', udg_Bullet )
     call UnitRemoveAbilityBJ( 'Amrf', udg_Bullet )
     call SetUnitFlyHeightBJ( udg_Bullet, 50.00, 0.00 )
     call SetUnitPathing( udg_Bullet, false )
     call SetUnitPositionLoc( udg_Bullet, udg_TempPoint )
     set udg_TempUnit = null
     set udg_TempPlayer = null
     set udg_Bullet = null
     call RemoveLocation(udg_TempPoint)
     call RemoveLocation(udg_TempPoint2)
endfunction

//===========================================================================
function InitTrig_Shoot takes nothing returns nothing
     set gg_trg_Shoot = CreateTrigger(  )
     call TriggerRegisterAnyUnitEventBJ( gg_trg_Shoot, EVENT_PLAYER_UNIT_SPELL_CAST )
     call TriggerAddCondition( gg_trg_Shoot, Condition( function Trig_Shoot_Conditions ) )
     call TriggerAddAction( gg_trg_Shoot, function Trig_Shoot_Actions )
endfunction

движение пули[code]
function Trig_Bullet_Move_Func002Func009C takes nothing returns boolean
if ( not ( GetUnitFlyHeight(udg_TempUnit) <= 2.00 ) ) then
return false
endif
return true
endfunction

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

function Trig_Bullet_Move_Func002Func011002003002001 takes nothing returns boolean
return ( GetUnitFlyHeight(udg_TempUnit) >= GetUnitFlyHeight(GetFilterUnit()) )
endfunction

function Trig_Bullet_Move_Func002Func011002003002002001 takes nothing returns boolean
return ( GetUnitFlyHeight(udg_TempUnit) <= ( I2R(GetUnitPointValue(GetFilterUnit())) + GetUnitFlyHeight(GetFilterUnit()) ) )
endfunction

function Trig_Bullet_Move_Func002Func011002003002002002 takes nothing returns boolean
return ( IsUnitEnemy(GetFilterUnit(), udg_TempPlayer) == true )
endfunction

function Trig_Bullet_Move_Func002Func011002003002002 takes nothing returns boolean
return GetBooleanAnd( Trig_Bullet_Move_Func002Func011002003002002001(), Trig_Bullet_Move_Func002Func011002003002002002() )
endfunction

function Trig_Bullet_Move_Func002Func011002003002 takes nothing returns boolean
return GetBooleanAnd( Trig_Bullet_Move_Func002Func011002003002001(), Trig_Bullet_Move_Func002Func011002003002002() )
endfunction

function Trig_Bullet_Move_Func002Func011002003 takes nothing returns boolean
return GetBooleanAnd( Trig_Bullet_Move_Func002Func011002003001(), Trig_Bullet_Move_Func002Func011002003002() )
endfunction

function Trig_Bullet_Move_Func002Func013Func002Func012C takes nothing returns boolean
if ( not ( GetUnitStateSwap(UNIT_STATE_LIFE, udg_TempUnit2) <= 0.00 ) ) then
return false
endif
return true
endfunction

function Trig_Bullet_Move_Func002Func013Func002Func036001 takes nothing returns boolean
return ( GetUnitFlyHeight(udg_TempUnit) >= I2R(( GetUnitPointValue(udg_TempUnit2) - 45 )) )
endfunction

function Trig_Bullet_Move_Func002Func013Func002Func036002 takes nothing returns boolean
return ( GetUnitFlyHeight(udg_TempUnit) <= I2R(GetUnitPointValue(udg_TempUnit2)) )
endfunction

function Trig_Bullet_Move_Func002Func013Func002C takes nothing returns boolean
if ( not GetBooleanAnd( Trig_Bullet_Move_Func002Func013Func002Func036001(), Trig_Bullet_Move_Func002Func013Func002Func036002() ) ) then
return false
endif
return true
endfunction

function Trig_Bullet_Move_Func002Func013A takes nothing returns nothing
set udg_TempUnit2 = GetEnumUnit()
if ( Trig_Bullet_Move_Func002Func013Func002C() ) then
set udg_TempPlayer2 = GetOwningPlayer(udg_TempUnit2)
set udg_TempString[1] = GetPlayerName(udg_TempPlayer)
set udg_TempString[2] = GetPlayerName(udg_TempPlayer2)
call DisplayTextToForce( GetPlayersAll(), ( udg_TempString[1] + ( " has headshoted " + udg_TempString[2] ) ) )
call Headshot()
call ExplodeUnitBJ( udg_TempUnit2 )
call RemoveUnit( udg_TempUnit )
call RemoveUnitTimed(udg_TempUnit2, 1.0)
set udg_TempPlayer2 = null
set udg_TempString[1] = null
set udg_TempString[2] = null
set udg_TempUnit = null
set udg_TempUnit2 = null
set udg_TempPlayer = null
call RemoveLocation(udg_TempPoint)
call RemoveLocation(udg_TempPoint2)
call DestroyGroup(udg_TempGroup)
return
else
set udg_TempPlayer2 = GetOwningPlayer(udg_TempUnit2)
set udg_TempString[1] = GetPlayerName(udg_TempPlayer)
set udg_TempString[2] = GetPlayerName(udg_TempPlayer2)
call DestroyEffect( AddSpecialEffectTarget("Abilities\\Spells\\Other\\Stampede\\StampedeMissileDeath.mdl", udg_TempUnit2, "chest" ) )
call UnitDamageTargetBJ( udg_TempUnit, udg_TempUnit2, 100.00, ATTACK_TYPE_CHAOS, DAMAGE_TYPE_NORMAL )
call RemoveUnit( udg_TempUnit )
if ( Trig_Bullet_Move_Func002Func013Func002Func012C() ) then
call DisplayTextToForce( GetPlayersAll(), ( udg_TempString[1] + ( " has killed " + udg_TempString[2] ) ) )
else
endif
set udg_TempPlayer2 = null
set udg_TempString[1] = null
set udg_TempString[2] = null
set udg_TempUnit = null
set udg_TempUnit2 = null
set udg_TempPlayer = null
call RemoveLocation(udg_TempPoint)
call RemoveLocation(udg_TempPoint2)
call DestroyGroup(udg_TempGroup)
return
endif
set udg_TempUnit2 = null
endfunction

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

function Trig_Bullet_Move_Func002Func017002003002001 takes nothing returns boolean
return ( GetUnitFlyHeight(udg_TempUnit) >= GetUnitFlyHeight(GetFilterUnit()) )
endfunction

function Trig_Bullet_Move_Func002Func017002003002002001 takes nothing returns boolean
return ( GetUnitFlyHeight(udg_TempUnit) <= ( I2R(GetUnitPointValue(GetFilterUnit())) + GetUnitFlyHeight(GetFilterUnit()) ) )
endfunction

function Trig_Bullet_Move_Func002Func017002003002002002 takes nothing returns boolean
return ( IsUnitEnemy(GetFilterUnit(), udg_TempPlayer) == true )
endfunction

function Trig_Bullet_Move_Func002Func017002003002002 takes nothing returns boolean
return GetBooleanAnd( Trig_Bullet_Move_Func002Func017002003002002001(), Trig_Bullet_Move_Func002Func017002003002002002() )
endfunction

function Trig_Bullet_Move_Func002Func017002003002 takes nothing returns boolean
return GetBooleanAnd( Trig_Bullet_Move_Func002Func017002003002001(), Trig_Bullet_Move_Func002Func017002003002002() )
endfunction

function Trig_Bullet_Move_Func002Func017002003 takes nothing returns boolean
return GetBooleanAnd( Trig_Bullet_Move_Func002Func017002003001(), Trig_Bullet_Move_Func002Func017002003002() )
endfunction

function Trig_Bullet_Move_Func002Func019Func002Func012C takes nothing returns boolean
if ( not ( GetUnitStateSwap(UNIT_STATE_LIFE, udg_TempUnit2) <= 0.00 ) ) then
return false
endif
return true
endfunction

function Trig_Bullet_Move_Func002Func019Func002Func038001 takes nothing returns boolean
return ( GetUnitFlyHeight(udg_TempUnit) >= I2R(( GetUnitPointValue(udg_TempUnit2) - 45 )) )
endfunction

function Trig_Bullet_Move_Func002Func019Func002Func038002 takes nothing returns boolean
return ( GetUnitFlyHeight(udg_TempUnit) <= I2R(GetUnitPointValue(udg_TempUnit2)) )
endfunction

function Trig_Bullet_Move_Func002Func019Func002C takes nothing returns boolean
if ( not GetBooleanAnd( Trig_Bullet_Move_Func002Func019Func002Func038001(), Trig_Bullet_Move_Func002Func019Func002Func038002() ) ) then
return false
endif
return true
endfunction

function Trig_Bullet_Move_Func002Func019A takes nothing returns nothing
set udg_TempUnit2 = GetEnumUnit()
if ( Trig_Bullet_Move_Func002Func019Func002C() ) then
set udg_TempPlayer2 = GetOwningPlayer(udg_TempUnit2)
set udg_TempString[1] = GetPlayerName(udg_TempPlayer)
set udg_TempString[2] = GetPlayerName(udg_TempPlayer2)
call DisplayTextToForce( GetPlayersAll(), ( udg_TempString[1] + ( " has headshoted " + udg_TempString[2] ) ) )
call Headshot()
call ExplodeUnitBJ( udg_TempUnit2 )
call RemoveUnit( udg_TempUnit )
call RemoveUnitTimed(udg_TempUnit2, 1.0)
set udg_TempPlayer2 = null
set udg_TempString[1] = null
set udg_TempString[2] = null
set udg_TempUnit = null
set udg_TempUnit2 = null
set udg_TempPlayer = null
call RemoveLocation(udg_TempPoint)
call RemoveLocation(udg_TempPoint2)
call RemoveLocation(udg_TempPoint3)
call DestroyGroup(udg_TempGroup)
return
else
set udg_TempPlayer2 = GetOwningPlayer(udg_TempUnit2)
set udg_TempString[1] = GetPlayerName(udg_TempPlayer)
set udg_TempString[2] = GetPlayerName(udg_TempPlayer2)
call DestroyEffect( AddSpecialEffectTarget("Abilities\\Spells\\Other\\Stampede\\StampedeMissileDeath.mdl", udg_TempUnit2, "chest" ) )
call UnitDamageTargetBJ( udg_TempUnit, udg_TempUnit2, 100.00, ATTACK_TYPE_CHAOS, DAMAGE_TYPE_NORMAL )
call RemoveUnit( udg_TempUnit )
if ( Trig_Bullet_Move_Func002Func019Func002Func012C() ) then
call DisplayTextToForce( GetPlayersAll(), ( udg_TempString[1] + ( " has killed " + udg_TempString[2] ) ) )
else
endif
set udg_TempPlayer2 = null
set udg_TempString[1] = null
set udg_TempString[2] = null
set udg_TempUnit = null
set udg_TempUnit2 = null
set udg_TempPlayer = null
call RemoveLocation(udg_TempPoint)
call RemoveLocation(udg_TempPoint2)
call RemoveLocation(udg_TempPoint3)
call DestroyGroup(udg_TempGroup)
return
endif
set udg_TempUnit2 = null
endfunction

function Trig_Bullet_Move_Func002Func023A takes nothing returns nothing
call CreateNUnitsAtLoc( 1, 'n001', udg_TempPlayer, udg_TempPoint2, udg_Rotation[GetConvertedPlayerId(udg_TempPlayer)] )
set udg_DummyEffect = GetLastCreatedUnit()
call SetUnitPathing( udg_DummyEffect, false )
call UnitAddAbilityBJ( 'Amrf', udg_DummyEffect )
call UnitRemoveAbilityBJ( 'Amrf', udg_DummyEffect )
call SetUnitFlyHeightBJ( udg_DummyEffect, GetUnitFlyHeight(udg_TempUnit), 0.00 )
call SetUnitPositionLoc( udg_DummyEffect, udg_TempPoint2 )
call SetUnitVertexColorBJ( udg_DummyEffect, 100, 100, 100, 100.00 )
call SetUnitTimeScalePercent( udg_DummyEffect, 0.00 )
call DestroyEffect( AddSpecialEffectTarget("Abilities\\Weapons\\Rifle\\RifleImpact.mdl", udg_DummyEffect, "origin") )
call RemoveUnitTimed(udg_DummyEffect, 0.5)
call RemoveUnit( udg_TempUnit )
set udg_DummyEffect = null
endfunction

function Trig_Bullet_Move_Func002Func024A takes nothing returns nothing
call CreateNUnitsAtLoc( 1, 'n001', udg_TempPlayer, udg_TempPoint2, udg_Rotation[GetConvertedPlayerId(udg_TempPlayer)] )
set udg_DummyEffect = GetLastCreatedUnit()
call SetUnitPathing( udg_DummyEffect, false )
call UnitAddAbilityBJ( 'Amrf', udg_DummyEffect )
call UnitRemoveAbilityBJ( 'Amrf', udg_DummyEffect )
call SetUnitFlyHeightBJ( udg_DummyEffect, GetUnitFlyHeight(udg_TempUnit), 0.00 )
call SetUnitPositionLoc( udg_DummyEffect, udg_TempPoint2 )
call SetUnitVertexColorBJ( udg_DummyEffect, 100, 100, 100, 100.00 )
call SetUnitTimeScalePercent( udg_DummyEffect, 0.00 )
call DestroyEffect( AddSpecialEffectTarget("Abilities\\Weapons\\Rifle\\RifleImpact.mdl", udg_DummyEffect, "origin") )
call RemoveUnitTimed(udg_DummyEffect, 0.5)
call RemoveUnit( udg_TempUnit )
set udg_DummyEffect = null
endfunction

Добавлено (11.10.2010, 17:47)
---------------------------------------------
Стрельба

Code
function Trig_Shoot_Conditions takes nothing returns boolean
     if ( not ( GetSpellAbilityId() == 'A000' ) ) then
         return false
     endif
     if ( not ( udg_ScopeOn[GetConvertedPlayerId(GetOwningPlayer(GetSpellAbilityUnit()))] == true ) ) then
         return false
     endif
     return true
endfunction

function Trig_Shoot_Actions takes nothing returns nothing
     set udg_TempUnit = GetSpellAbilityUnit()
     set udg_TempPlayer = GetOwningPlayer(udg_TempUnit)
     set udg_TempPoint = GetUnitLoc(udg_TempUnit)
     set udg_TempPoint2 = PolarProjectionBJ(udg_TempPoint, 80.00, udg_Rotation[GetConvertedPlayerId(udg_TempPlayer)])
     call CreateNUnitsAtLoc( 1, 'n000', udg_TempPlayer, udg_TempPoint2, udg_Rotation[GetConvertedPlayerId(udg_TempPlayer)] )
     set udg_Bullet = GetLastCreatedUnit()
     set udg_N = ( udg_N + 1 )
     set udg_BulletHeigh

--
АхилДата: Понедельник, 11.10.2010, 18:22 | Сообщение # 2



Сообщений: 315

Браво! ok
--
GlaberДата: Понедельник, 11.10.2010, 18:25 | Сообщение # 3



Сообщений: 1057

Quote (Ахил)
Браво!

уфф)) ты понял о чом вообше тут?)_))


--
АхилДата: Понедельник, 11.10.2010, 19:26 | Сообщение # 4



Сообщений: 315

F@lk, Да))) (ну немного)=)
--
GlaberДата: Понедельник, 11.10.2010, 19:29 | Сообщение # 5



Сообщений: 1057

Ты уже джасс выучил?

--
АхилДата: Понедельник, 11.10.2010, 20:06 | Сообщение # 6



Сообщений: 315

Я спец tongue
--
UZzipДата: Понедельник, 11.10.2010, 20:51 | Сообщение # 7
Noize mc



Сообщений: 6078

Карту пример в студию!

--
GlaberДата: Понедельник, 11.10.2010, 21:05 | Сообщение # 8



Сообщений: 1057

Quote (UZzip)
Карту пример в студию!

Зачем она вам?))


--
UZzipДата: Понедельник, 11.10.2010, 21:14 | Сообщение # 9
Noize mc



Сообщений: 6078

Quote (F@lk)
Зачем она вам?))

Глупый вопрос.

Добавлено (11.10.2010, 21:14)
---------------------------------------------
Карту пример в студию!


--
EvgexaДата: Вторник, 12.10.2010, 06:22 | Сообщение # 10



Сообщений: 1204

от статьи нет толку, если нет карты примера!

--
  • Страница 1 из 2
  • 1
  • 2
  • »
Поиск:

W3 - Всё для картостроения. 2024-2010 |