//===========================================================================
//
// Master Spark
//
// Warcraft III map script
// Generated by the Warcraft III World Editor
// Date: Thu Nov 03 22:05:49 2005
// Map Author: Blargel
//
//===========================================================================
//***************************************************************************
//*
//* Global Variables
//*
//***************************************************************************
globals
// User-defined
unit udg_Unit = null
unit array udg_UnitNo
integer udg_Count = 0
group udg_Group = null
real udg_size = 0
unit udg_magiccircle = null
real udg_magiccircletransparency = 0
// Generated
camerasetup gg_cam_Camera_001 = null
sound gg_snd_adsf = null
sound gg_snd_spellcard = null
sound gg_snd_laser = null
trigger gg_trg_blah = null
trigger gg_trg_Master_Spark_1 = null
trigger gg_trg_Master_Spark_2 = null
trigger gg_trg_Master_Spark_3 = null
trigger gg_trg_Magic_Circle = null
trigger gg_trg_Magic_Circle_disappear = null
trigger gg_trg_camera_is_target = null
unit gg_unit_hsor_0000 = null
endglobals
function InitGlobals takes nothing returns nothing
local integer i = 0
set udg_Count = 1
set udg_Group = CreateGroup()
set udg_size = 100.00
set udg_magiccircletransparency = 0
endfunction
//***************************************************************************
//*
//* Sounds
//*
//***************************************************************************
function InitSounds takes nothing returns nothing
set gg_snd_adsf = CreateSound( "war3mapImported\\adsf.wav", false, false, false, 10, 10, "" )
call SetSoundDuration( gg_snd_adsf, 5684 )
call SetSoundChannel( gg_snd_adsf, 0 )
call SetSoundVolume( gg_snd_adsf, 127 )
call SetSoundPitch( gg_snd_adsf, 1.0 )
set gg_snd_spellcard = CreateSound( "war3mapImported\\spellcard.wav", false, false, false, 10, 10, "" )
call SetSoundDuration( gg_snd_spellcard, 2417 )
call SetSoundChannel( gg_snd_spellcard, 0 )
call SetSoundVolume( gg_snd_spellcard, 127 )
call SetSoundPitch( gg_snd_spellcard, 1.0 )
set gg_snd_laser = CreateSound( "war3mapImported\\laser.wav", false, false, false, 10, 10, "" )
call SetSoundDuration( gg_snd_laser, 1700 )
call SetSoundChannel( gg_snd_laser, 0 )
call SetSoundVolume( gg_snd_laser, 127 )
call SetSoundPitch( gg_snd_laser, 1.0 )
endfunction
//***************************************************************************
//*
//* Unit Creation
//*
//***************************************************************************
//===========================================================================
function CreateUnitsForPlayer0 takes nothing returns nothing
local player p = Player(0)
local unit u
local integer unitID
local trigger t
local real life
set gg_unit_hsor_0000 = CreateUnit( p, 'hsor', -632.1, 40.5, 0.000 )
endfunction
//===========================================================================
function CreatePlayerBuildings takes nothing returns nothing
endfunction
//===========================================================================
function CreatePlayerUnits takes nothing returns nothing
call CreateUnitsForPlayer0( )
endfunction
//===========================================================================
function CreateAllUnits takes nothing returns nothing
call CreatePlayerBuildings( )
call CreatePlayerUnits( )
endfunction
//***************************************************************************
//*
//* Cameras
//*
//***************************************************************************
function CreateCameras takes nothing returns nothing
set gg_cam_Camera_001 = CreateCameraSetup( )
call CameraSetupSetField( gg_cam_Camera_001, CAMERA_FIELD_ZOFFSET, 100.0, 0.0 )
call CameraSetupSetField( gg_cam_Camera_001, CAMERA_FIELD_ROTATION, 90.0, 0.0 )
call CameraSetupSetField( gg_cam_Camera_001, CAMERA_FIELD_ANGLE_OF_ATTACK, 360.0, 0.0 )
call CameraSetupSetField( gg_cam_Camera_001, CAMERA_FIELD_TARGET_DISTANCE, 100.0, 0.0 )
call CameraSetupSetField( gg_cam_Camera_001, CAMERA_FIELD_ROLL, 0.0, 0.0 )
call CameraSetupSetField( gg_cam_Camera_001, CAMERA_FIELD_FIELD_OF_VIEW, 70.0, 0.0 )
call CameraSetupSetField( gg_cam_Camera_001, CAMERA_FIELD_FARZ, 5000.0, 0.0 )
call CameraSetupSetDestPosition( gg_cam_Camera_001, -633.5, 54.5, 0.0 )
endfunction
//***************************************************************************
//*
//* Triggers
//*
//***************************************************************************
//===========================================================================
// Trigger: blah
//===========================================================================
function Trig_blah_Actions takes nothing returns nothing
call CreateFogModifierRectBJ( true, Player(0), FOG_OF_WAR_VISIBLE, GetPlayableMapRect() )
endfunction
//===========================================================================
function InitTrig_blah takes nothing returns nothing
set gg_trg_blah = CreateTrigger( )
call TriggerAddAction( gg_trg_blah, function Trig_blah_Actions )
endfunction
//===========================================================================
// Trigger: Master Spark 1
//===========================================================================
function Trig_Master_Spark_1_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A001' ) ) then
return false
endif
return true
endfunction
function Trig_Master_Spark_1_Func031A takes nothing returns nothing
call SetUnitTimeScalePercent( GetEnumUnit(), 15.00 )
call KillUnit( GetEnumUnit() )
endfunction
function Trig_Master_Spark_1_Actions takes nothing returns nothing
set udg_Count = 1
set udg_Group = GetUnitsInRectOfPlayer(GetPlayableMapRect(), Player(4))
set udg_Unit = null
set udg_size = 1.00
set udg_magiccircletransparency = 100.00
call TriggerSleepAction( 0.10 )
call CreateNUnitsAtLoc( 1, 'h001', Player(0), PolarProjectionBJ(GetUnitLoc(gg_unit_hsor_0000), 6000.00, 0), GetUnitFacing(gg_unit_hsor_0000) )
call SetUnitTimeScalePercent( GetLastCreatedUnit(), 0.00 )
set udg_magiccircle = GetLastCreatedUnit()
call EnableTrigger( gg_trg_Magic_Circle )
call TriggerSleepAction( 0.01 )
call TriggerSleepAction( 1.50 )
call SetUnitAnimation( gg_unit_hsor_0000, "spell" )
call TriggerSleepAction( 0.66 )
call PauseUnitBJ( true, gg_unit_hsor_0000 )
call SetUnitTimeScalePercent( gg_unit_hsor_0000, 0.00 )
call CreateNUnitsAtLoc( 1, 'h000', Player(0), PolarProjectionBJ(GetUnitLoc(gg_unit_hsor_0000), 100.00, GetUnitFacing(gg_unit_hsor_0000)), GetUnitFacing(gg_unit_hsor_0000) )
call SetUnitTimeScalePercent( GetLastCreatedUnit(), 0.00 )
call SetUnitPathing( GetLastCreatedUnit(), false )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_Group )
set udg_Unit = GetLastCreatedUnit()
call EnableTrigger( gg_trg_Master_Spark_2 )
call TriggerSleepAction( 0.66 )
call TriggerSleepAction( 0.33 )
call DisableTrigger( gg_trg_Master_Spark_2 )
call CameraSetEQNoiseForPlayer( Player(0), 15.00 )
call EnableTrigger( gg_trg_Master_Spark_3 )
call TriggerSleepAction( 5.00 )
call EnableTrigger( gg_trg_Magic_Circle_disappear )
call ForGroupBJ( udg_Group, function Trig_Master_Spark_1_Func031A )
call TriggerSleepAction( 1.00 )
call PauseUnitBJ( false, gg_unit_hsor_0000 )
call SetUnitTimeScalePercent( gg_unit_hsor_0000, 100 )
call TriggerSleepAction( 0.75 )
call CameraClearNoiseForPlayer( Player(0) )
endfunction
//===========================================================================
function InitTrig_Master_Spark_1 takes nothing returns nothing
set gg_trg_Master_Spark_1 = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_Master_Spark_1, gg_unit_hsor_0000, EVENT_UNIT_SPELL_CAST )
call TriggerAddCondition( gg_trg_Master_Spark_1, Condition( function Trig_Master_Spark_1_Conditions ) )
call TriggerAddAction( gg_trg_Master_Spark_1, function Trig_Master_Spark_1_Actions )
endfunction
//===========================================================================
// Trigger: Master Spark 2
//===========================================================================
function Trig_Master_Spark_2_Actions takes nothing returns nothing
call CreateNUnitsAtLoc( 1, 'h000', Player(0), PolarProjectionBJ(GetUnitLoc(udg_Unit), 40.00, GetUnitFacing(udg_Unit)), GetUnitFacing(udg_Unit) )
call SetUnitTimeScalePercent( GetLastCreatedUnit(), 0.00 )
call SetUnitPathing( GetLastCreatedUnit(), false )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_Group )
set udg_Unit = GetLastCreatedUnit()
set udg_UnitNo[udg_Count] = GetLastCreatedUnit()
set udg_Count = ( udg_Count + 1 )
endfunction
//===========================================================================
function InitTrig_Master_Spark_2 takes nothing returns nothing
set gg_trg_Master_Spark_2 = CreateTrigger( )
call DisableTrigger( gg_trg_Master_Spark_2 )
call TriggerRegisterTimerEventPeriodic( gg_trg_Master_Spark_2, 0.01 )
call TriggerAddAction( gg_trg_Master_Spark_2, function Trig_Master_Spark_2_Actions )
endfunction
//===========================================================================
// Trigger: Master Spark 3
//===========================================================================
function Trig_Master_Spark_3_Func001001 takes nothing returns boolean
return ( udg_size >= 100.00 )
endfunction
function Trig_Master_Spark_3_Actions takes nothing returns nothing
if ( Trig_Master_Spark_3_Func001001() ) then
call DisableTrigger( GetTriggeringTrigger() )
else
call DoNothing( )
endif
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 100
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call SetUnitScalePercent( udg_UnitNo[GetForLoopIndexA()], ( 400.00 + ( ( 1300.00 * SquareRoot(I2R(GetForLoopIndexA())) ) * ( udg_size / 100.00 ) ) ), 100, 100 )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
set udg_size = ( udg_size + 1 )
endfunction
//===========================================================================
function InitTrig_Master_Spark_3 takes nothing returns nothing
set gg_trg_Master_Spark_3 = CreateTrigger( )
call DisableTrigger( gg_trg_Master_Spark_3 )
call TriggerRegisterTimerEventPeriodic( gg_trg_Master_Spark_3, 0.01 )
call TriggerAddAction( gg_trg_Master_Spark_3, function Trig_Master_Spark_3_Actions )
endfunction
//===========================================================================
// Trigger: Magic Circle
//===========================================================================
function Trig_Magic_Circle_Func005001 takes nothing returns boolean
return ( udg_magiccircletransparency < 0.00 )
endfunction
function Trig_Magic_Circle_Actions takes nothing returns nothing
call SetUnitPositionLoc( udg_magiccircle, GetUnitLoc(gg_unit_hsor_0000) )
call SetUnitVertexColorBJ( udg_magiccircle, 100, 100, 100, udg_magiccircletransparency )
call SetUnitFacingTimed( udg_magiccircle, ( GetUnitFacing(udg_magiccircle) + 3.00 ), 0 )
set udg_magiccircletransparency = ( udg_magiccircletransparency - 0.30 )
if ( Trig_Magic_Circle_Func005001() ) then
set udg_magiccircletransparency = 0.00
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_Magic_Circle takes nothing returns nothing
set gg_trg_Magic_Circle = CreateTrigger( )
call DisableTrigger( gg_trg_Magic_Circle )
call TriggerRegisterTimerEventPeriodic( gg_trg_Magic_Circle, 0.01 )
call TriggerAddAction( gg_trg_Magic_Circle, function Trig_Magic_Circle_Actions )
endfunction
//===========================================================================
// Trigger: Magic Circle disappear
//===========================================================================
function Trig_Magic_Circle_disappear_Func003001 takes nothing returns boolean
return ( udg_magiccircletransparency > 100.00 )
endfunction
function Trig_Magic_Circle_disappear_Func004001 takes nothing returns boolean
return ( udg_magiccircletransparency > 100.00 )
endfunction
function Trig_Magic_Circle_disappear_Func005001 takes nothing returns boolean
return ( udg_magiccircletransparency > 100.00 )
endfunction
function Trig_Magic_Circle_disappear_Actions takes nothing returns nothing
call SetUnitVertexColorBJ( udg_magiccircle, 100, 100, 100, udg_magiccircletransparency )
set udg_magiccircletransparency = ( udg_magiccircletransparency + 0.60 )
if ( Trig_Magic_Circle_disappear_Func003001() ) then
call DisableTrigger( gg_trg_Magic_Circle )
else
call DoNothing( )
endif
if ( Trig_Magic_Circle_disappear_Func004001() ) then
call RemoveUnit( udg_magiccircle )
else
call DoNothing( )
endif
if ( Trig_Magic_Circle_disappear_Func005001() ) then
call DisableTrigger( GetTriggeringTrigger() )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_Magic_Circle_disappear takes nothing returns nothing
set gg_trg_Magic_Circle_disappear = CreateTrigger( )
call DisableTrigger( gg_trg_Magic_Circle_disappear )
call TriggerRegisterTimerEventPeriodic( gg_trg_Magic_Circle_disappear, 0.01 )
call TriggerAddAction( gg_trg_Magic_Circle_disappear, function Trig_Magic_Circle_disappear_Actions )
endfunction
//===========================================================================
// Trigger: camera is target
//===========================================================================
function Trig_camera_is_target_Actions takes nothing returns nothing
call TriggerExecute( gg_trg_Master_Spark_1 )
call CameraSetupApplyForPlayer( true, gg_cam_Camera_001, Player(0), 0 )
call SetCameraFieldForPlayer( Player(0), CAMERA_FIELD_ROTATION, ( GetUnitFacing(gg_unit_hsor_0000) + 180.00 ), 0 )
call PanCameraToTimedLocForPlayer( Player(0), PolarProjectionBJ(GetUnitLoc(gg_unit_hsor_0000), 1500.00, GetUnitFacing(gg_unit_hsor_0000)), 0 )
endfunction
//===========================================================================
function InitTrig_camera_is_target takes nothing returns nothing
set gg_trg_camera_is_target = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_camera_is_target, Player(0), "target", true )
call TriggerAddAction( gg_trg_camera_is_target, function Trig_camera_is_target_Actions )
endfunction
//===========================================================================
function InitCustomTriggers takes nothing returns nothing
call InitTrig_blah( )
call InitTrig_Master_Spark_1( )
call InitTrig_Master_Spark_2( )
call InitTrig_Master_Spark_3( )
call InitTrig_Magic_Circle( )
call InitTrig_Magic_Circle_disappear( )
call InitTrig_camera_is_target( )
endfunction
//===========================================================================
function RunInitializationTriggers takes nothing returns nothing
call ConditionalTriggerExecute( gg_trg_blah )
endfunction
//***************************************************************************
//*
//* Players
//*
//***************************************************************************
function InitCustomPlayerSlots takes nothing returns nothing
// Player 0
call SetPlayerStartLocation( Player(0), 0 )
call SetPlayerColor( Player(0), ConvertPlayerColor(0) )
call SetPlayerRacePreference( Player(0), RACE_PREF_HUMAN )
call SetPlayerRaceSelectable( Player(0), true )
call SetPlayerController( Player(0), MAP_CONTROL_USER )
endfunction
function InitCustomTeams takes nothing returns nothing
// Force: TRIGSTR_002
call SetPlayerTeam( Player(0), 0 )
endfunction
//***************************************************************************
//*
//* Main Initialization
//*
//***************************************************************************
//===========================================================================
function main takes nothing returns nothing
call SetCameraBounds( -7424.0 + GetCameraMargin(CAMERA_MARGIN_LEFT), -7680.0 + GetCameraMargin(CAMERA_MARGIN_BOTTOM), 7424.0 - GetCameraMargin(CAMERA_MARGIN_RIGHT), 7168.0 - GetCameraMargin(CAMERA_MARGIN_TOP), -7424.0 + GetCameraMargin(CAMERA_MARGIN_LEFT), 7168.0 - GetCameraMargin(CAMERA_MARGIN_TOP), 7424.0 - GetCameraMargin(CAMERA_MARGIN_RIGHT), -7680.0 + GetCameraMargin(CAMERA_MARGIN_BOTTOM) )
call SetDayNightModels( "Environment\\DNC\\DNCLordaeron\\DNCLordaeronTerrain\\DNCLordaeronTerrain.mdl", "Environment\\DNC\\DNCLordaeron\\DNCLordaeronUnit\\DNCLordaeronUnit.mdl" )
call NewSoundEnvironment( "Default" )
call SetAmbientDaySound( "LordaeronSummerDay" )
call SetAmbientNightSound( "LordaeronSummerNight" )
call SetMapMusic( "Music", true, 0 )
call InitSounds( )
call CreateCameras( )
call CreateAllUnits( )
call InitBlizzard( )
call InitGlobals( )
call InitCustomTriggers( )
call RunInitializationTriggers( )
endfunction
//***************************************************************************
//*
//* Map Configuration
//*
//***************************************************************************
function config takes nothing returns nothing
call SetMapName( "TRIGSTR_014" )
call SetMapDescription( "TRIGSTR_016" )
call SetPlayers( 1 )
call SetTeams( 1 )
call SetGamePlacement( MAP_PLACEMENT_USE_MAP_SETTINGS )
call DefineStartLocation( 0, -640.0, 0.0 )
// Player setup
call InitCustomPlayerSlots( )
call SetPlayerSlotAvailable( Player(0), MAP_CONTROL_USER )
call InitGenericPlayerSlots( )
endfunction
I have aldready copied its ability in my map but it wont work. Where do I insert this commands, in Jass script or in the World editor trigger? I have tired inserting this commands in triggers gut it gives me errors in certain lines.
How can I insert this jass/trigger spell in my map?
Moderator: Cheaters
-
- Member
- Posts: 59
- Joined: September 9th, 2008, 8:27 am
-
- Forum Staff
- Posts: 2618
- Joined: June 2nd, 2007, 6:53 pm
- Title: I Just Lost the Game
Re: How can I insert this jass/trigger spell in my map?
That's because some of those functions already exist. Paste everything in except function main and function config. Copy all the stuff under each of them, and paste them under the functions that are already in the map. If there's duplicates (ie. two SetMapName), then delete the one that was already in the map. That should work.
Oh, and after you insert everything, run the syntax checker. That should help, to tell if it screwed up somewhere.
Oh, and after you insert everything, run the syntax checker. That should help, to tell if it screwed up somewhere.
My Warcraft III Tool Collection
If you want to chat/game with me:
Blizzard: Senethior459#1962
Discord: Kyle#7409
Steam: Spacekidkyle
If you want to chat/game with me:
Blizzard: Senethior459#1962
Discord: Kyle#7409
Steam: Spacekidkyle
-
- Newcomer
- Posts: 18
- Joined: October 10th, 2008, 10:22 pm
Re: How can I insert this jass/trigger spell in my map?
This is GUI trigger help. theres a section for JASS trigger help. please bump
I take any requests If any map is errored its not my fault just report it to me. (I will only hack a map! I.E. no dp, no single player)! Just PM me.
Please PM me if you'll tell me how to extract a MPQ in a VB 2008 App
VB 2008 Programmer
Please PM me if you'll tell me how to extract a MPQ in a VB 2008 App
VB 2008 Programmer