Moderator
M
Moderator
|
SRB Configuration

Events


Map initialization

Conditions

Actions


-------- STRICTLY DONT TOUCH BELOW --------


-------- Creating Hashtable --------


Hashtable - Create a hashtable


-------- Tracking It --------


Set SRB_Hashtable = (Last created hashtable)


-------- --------


-------- ======================CONFIGURATION====================== --------


-------- Table of Contents: --------


-------- Object Editor --------


-------- Configurable Values --------


-------- Preloading --------


-------- --------


-------- OBJECT EDITOR: --------


-------- The SRB_Ability: This is the ability that the caster will use if he cast. Must configure this in good way avoiding some mistakes in importing. --------


Set SRB_Ability = Splitting Rock Boulders


-------- The SRB_RockDummyType: This is the unit or the dummy that will be use as a rocks in the spell. Must import the dummy.mdl by Vexorian to your map and this is must configure --------


Set SRB_RockDummyType = Splitting Rock Boulders ( Dummy )


-------- --------


-------- CONFIGURABLE VALUES --------


-------- The SRB_RockAmount: This is the amount of rocks that will used in the spell. --------


-------- WARNING: Setting this to greater value will cause some unexpected lags. Recommended lower than 20. --------


Set SRB_RockAmount[1] = 10


Set SRB_RockAmount[2] = 14


Set SRB_RockAmount[3] = 18


-------- --------


-------- The SRB_RockHeight: This is the height of the rocks when the cast is occurs --------


Set SRB_RockHeight[1] = 50.00


Set SRB_RockHeight[2] = 50.00


Set SRB_RockHeight[3] = 50.00


-------- --------


-------- The SRB_RockSize: This is the size of the rocks when the cast is occurs --------


Set SRB_RockSize[1] = 135.00


Set SRB_RockSize[2] = 135.00


Set SRB_RockSize[3] = 135.00


-------- --------


-------- The SRB_RockColor: This is the color of the rocks when the cast is occurs, the [ 1 ] is the color red, the [ 2 ] is color green and the [ 3 ] is blue. --------


Set SRB_RockColor[1] = 100.00


Set SRB_RockColor[2] = 100.00


Set SRB_RockColor[3] = 100.00


-------- --------


-------- The SRB_RockTransparency: This is the invisiblity or the transparency of the rocks when the cast is occurs, 100 is completely fade. --------


Set SRB_RockTransparency[1] = 0.00


Set SRB_RockTransparency[2] = 0.00


Set SRB_RockTransparency[3] = 0.00


-------- --------


-------- The SRB_RockCollision: This is the collision of the rocks when the cast is occurs, Collision is just like a radius of the rock. --------


Set SRB_RockCollision[1] = 75.00


Set SRB_RockCollision[2] = 75.00


Set SRB_RockCollision[3] = 75.00


-------- --------


-------- The SRB_RockDamage: This is the damage of the rocks when the rock is hitted a unit. --------


Set SRB_RockDamage[1] = 50.00


Set SRB_RockDamage[2] = 75.00


Set SRB_RockDamage[3] = 100.00


-------- --------


-------- The SRB_RockSpeed: The speed of the rocks going away off from the caster, it is distance per second --------


Set SRB_RockSpeed[1] = 300.00


Set SRB_RockSpeed[2] = 375.00


Set SRB_RockSpeed[3] = 450.00


-------- --------


-------- The SRB_RockMaxDistance: When the rock reach this distance, it will explode. --------


Set SRB_RockMaxDistance[1] = 400.00


Set SRB_RockMaxDistance[2] = 500.00


Set SRB_RockMaxDistance[3] = 600.00


-------- --------


-------- The SRB_RockSpawnRange: This is the spawn range of the rocks to the caster --------


Set SRB_RockSpawnRange[1] = 35.00


Set SRB_RockSpawnRange[2] = 35.00


Set SRB_RockSpawnRange[3] = 35.00


-------- --------


-------- The SRB_RockModel: This is the model of the rock --------


Set SRB_RockModel = Abilities\Weapons\AncientProtectorMissile\AncientProtectorMissile.mdl


-------- --------


-------- The SRB_ExplodeDamage: This is the damage of the rocks when the explosion happens --------


Set SRB_ExplodeDamage[1] = 100.00


Set SRB_ExplodeDamage[2] = 200.00


Set SRB_ExplodeDamage[3] = 300.00


-------- --------


-------- The SRB_ExplodeRadius: This is the radius of the explosion of the rocks --------


Set SRB_ExplodeRadius[1] = 100.00


Set SRB_ExplodeRadius[2] = 125.00


Set SRB_ExplodeRadius[3] = 150.00


-------- --------


-------- The SRB_ExplodeEffect: This is the special effects explosion of the rocks --------


Set SRB_ExplodeEffect = Abilities\Spells\Orc\WarStomp\WarStompCaster.mdl


-------- --------


-------- The SRB_HitUnitEffect: This is the special effects of the hitted units by the rock. --------


Set SRB_HitUnitEffect = Abilities\Weapons\AncientProtectorMissile\AncientProtectorMissile.mdl


-------- --------


-------- The attachment of the sfx aboved. --------


Set SRB_HitUnitEffectAttach = chest


-------- --------


-------- The special effect of the caster when the rock released. --------


Set SRB_RockReleaseEffect = Abilities\Spells\Orc\WarStomp\WarStompCaster.mdl


-------- --------


-------- There's option in damage --------


Set SRB_RockAttackType = Siege


Set SRB_RockDamageType = Demolition


-------- --------


-------- There's option in damage --------


Set SRB_ExplosionAttackType = Siege


Set SRB_ExplosionDamageType = Demolition


-------- --------


-------- The knockback speed when the rocks touch enemies --------


Set SRB_KB_Speed[1] = 10.00


Set SRB_KB_Speed[2] = 13.00


Set SRB_KB_Speed[3] = 15.00


-------- --------


-------- On the web lightning --------


-------- The duration of the lightning --------


Set LH_DurationSet = 2.25


-------- --------


-------- The model of the lightning --------


Set LH_LightningNameSet = LEAS


-------- --------


-------- --------


-------- PRELOADING --------


-------- --------


-------- You can touch this if you change the special effects of the spell --------


-------- So How?? --------


-------- Add a apostrophy " " between string effects and doubled the \ to \\ --------


Custom script: call Preload ( "Abilities\\Weapons\\AncientProtectorMissile\\AncientProtectorMissile.mdl" )


Custom script: call Preload ( "Abilities\\Spells\\Orc\\WarStomp\\WarStompCaster.mdl" )


-------- --------
SRB Execution

Events


Unit - A unit Starts the effect of an ability

Conditions


(Ability being cast) Equal to SRB_Ability

Actions


-------- --------


Custom script: local real SRB_CasterX


Custom script: local real SRB_CasterY


Custom script: local real SRB_RockSpawnX


Custom script: local real SRB_RockSpawnY


-------- --------


If (All Conditions are True) then do (Then Actions) else do (Else Actions)



If - Conditions




SRB_Instances Equal to 0



Then - Actions




Trigger - Turn on SRB Loop <gen>



Else - Actions


-------- --------


Set SRB_Caster = (Triggering unit)


Set SRB_Level = (Level of SRB_Ability for SRB_Caster)


Custom script: set udg_SRB_Player = GetTriggerPlayer ( )


Custom script: set SRB_CasterX = GetUnitX ( udg_SRB_Caster )


Custom script: set SRB_CasterY = GetUnitY ( udg_SRB_Caster )


-------- --------


Custom script: call DestroyEffect ( AddSpecialEffect ( udg_SRB_RockReleaseEffect, SRB_CasterX, SRB_CasterY ) )


-------- --------


For each (Integer SRB_RockInt) from 1 to SRB_RockAmount[SRB_Level], do (Actions)



Loop - Actions




Set SRB_RockSpawnAngle = (SRB_RockSpawnAngle + (360.00 / (Real(SRB_RockAmount[SRB_Level]))))




-------- --------




Custom script: set SRB_RockSpawnX = SRB_CasterX + udg_SRB_RockSpawnRange [ udg_SRB_Level ] * Cos ( udg_SRB_RockSpawnAngle * 0.01747 )




Custom script: set SRB_RockSpawnY = SRB_CasterY + udg_SRB_RockSpawnRange [ udg_SRB_Level ] * Sin ( udg_SRB_RockSpawnAngle * 0.01747 )




-------- --------




Custom script: set udg_SRB_RockDummy = CreateUnit ( udg_SRB_Player, udg_SRB_RockDummyType, SRB_RockSpawnX, SRB_RockSpawnY, 0 )




Custom script: set udg_SRB_RockID = GetHandleId ( udg_SRB_RockDummy )




Custom script: set udg_SRB_RockModelHandler = AddSpecialEffectTarget ( udg_SRB_RockModel, udg_SRB_RockDummy, "origin" )




Animation - Change SRB_RockDummy flying height to SRB_RockHeight[SRB_Level] at 0.00




Animation - Change SRB_RockDummy's size to (SRB_RockSize[SRB_Level]%, 0.00%, 0.00%) of its original size




Animation - Change SRB_RockDummy's vertex coloring to (SRB_RockColor[1]%, SRB_RockColor[2]%, SRB_RockColor[3]%) with SRB_RockTransparency[SRB_Level]% transparency




-------- --------




Custom script: set udg_SRB_GroupContainer = CreateGroup ( )




-------- --------




Set LH_UnitSourceSet = SRB_Caster




Set LH_UnitTargetSet = SRB_RockDummy




Trigger - Run LH Unit2Unit <gen> (ignoring conditions)




-------- --------




Set SRB_RockSpeedCounter = 0.00




Set SRB_RockSpeedCalculation = (SRB_RockSpeed[SRB_Level] x 0.03)




-------- --------




Hashtable - Save Handle OfSRB_Caster as 1 of SRB_RockID in SRB_Hashtable




Hashtable - Save SRB_Level as 2 of SRB_RockID in SRB_Hashtable




Hashtable - Save SRB_RockSpawnAngle as 3 of SRB_RockID in SRB_Hashtable




Hashtable - Save SRB_RockSpeedCounter as 4 of SRB_RockID in SRB_Hashtable




Hashtable - Save Handle OfSRB_RockModelHandler as 5 of SRB_RockID in SRB_Hashtable




Hashtable - Save Handle OfSRB_GroupContainer as 6 of SRB_RockID in SRB_Hashtable




Hashtable - Save SRB_RockSpeedCalculation as 7 of SRB_RockID in SRB_Hashtable




-------- --------




Set SRB_Instances = (SRB_Instances + 1)




Unit Group - Add SRB_RockDummy to SRB_RockGroup




-------- --------


Custom script: set udg_SRB_Player = null


-------- --------
SRB Loop

Events


Time - Every 0.03 seconds of game time

Conditions

Actions


Unit Group - Pick every unit in SRB_RockGroup and do (Actions)



Loop - Actions




-------- --------




Set SRB_RockDummy = (Picked unit)




Custom script: set udg_SRB_RockID = GetHandleId ( udg_SRB_RockDummy )




-------- --------




Set SRB_Caster = (Load 1 of SRB_RockID in SRB_Hashtable)




Set SRB_Level = (Load 2 of SRB_RockID from SRB_Hashtable)




Set SRB_RockSpawnAngle = ((Load 3 of SRB_RockID from SRB_Hashtable) + 2.00)




Hashtable - Save SRB_RockSpawnAngle as 3 of SRB_RockID in SRB_Hashtable




-------- --------




Custom script: set udg_SRB_RockX = GetUnitX ( udg_SRB_RockDummy )




Custom script: set udg_SRB_RockY = GetUnitY ( udg_SRB_RockDummy )




-------- --------




Set SRB_RockSpeedCalculation = (Load 7 of SRB_RockID from SRB_Hashtable)




-------- --------




Custom script: set udg_SRB_RockMX = udg_SRB_RockX + udg_SRB_RockSpeedCalculation * Cos ( udg_SRB_RockSpawnAngle * 0.01747 )




Custom script: set udg_SRB_RockMY = udg_SRB_RockY + udg_SRB_RockSpeedCalculation * Sin ( udg_SRB_RockSpawnAngle * 0.01747 )




-------- --------




Custom script: call SetUnitX ( udg_SRB_RockDummy, udg_SRB_RockMX )




Custom script: call SetUnitY ( udg_SRB_RockDummy, udg_SRB_RockMY )




-------- --------




Set SRB_RockPosition = (Point(SRB_RockX, SRB_RockY))




Custom script: set bj_wantDestroyGroup = true




-------- --------




Unit Group - Pick every unit in (Units within SRB_RockCollision[SRB_Level] of SRB_RockPosition) and do (Actions)





Loop - Actions






Set SRB_HitUnit = (Picked unit)






-------- --------






If (All Conditions are True) then do (Then Actions) else do (Else Actions)







If - Conditions








(SRB_HitUnit is alive) Equal to True








(SRB_HitUnit belongs to an enemy of (Owner of SRB_Caster)) Equal to True








(SRB_HitUnit is A structure) Not equal to True








(SRB_HitUnit is Magic Immune) Not equal to True








(SRB_HitUnit is A flying unit) Not equal to True







Then - Actions








-------- --------








Custom script: call DestroyEffect ( AddSpecialEffectTarget ( udg_SRB_HitUnitEffect, udg_SRB_HitUnit, udg_SRB_HitUnitEffectAttach ) )








-------- --------








Custom script: set udg_SRB_HitUnitX = GetUnitX ( udg_SRB_HitUnit )








Custom script: set udg_SRB_HitUnitY = GetUnitY ( udg_SRB_HitUnit )








-------- --------








Custom script: set udg_SRB_KB_Angle = Atan2 ( udg_SRB_HitUnitY - udg_SRB_RockY, udg_SRB_HitUnitX - udg_SRB_RockX )








-------- --------








Custom script: set udg_SRB_KB_MX = udg_SRB_HitUnitX + udg_SRB_KB_Speed [ udg_SRB_Level ] * Cos ( udg_SRB_KB_Angle )








Custom script: set udg_SRB_KB_MY = udg_SRB_HitUnitY + udg_SRB_KB_Speed [ udg_SRB_Level ] * Sin ( udg_SRB_KB_Angle )








-------- --------








Set CP_Point = (Point(SRB_KB_MX, SRB_KB_MY))








Trigger - Run Check Walkability <gen> (ignoring conditions)








If (All Conditions are True) then do (Then Actions) else do (Else Actions)









If - Conditions










CP_PointIsWalkable Equal to True









Then - Actions










Custom script: call SetUnitX ( udg_SRB_HitUnit, udg_SRB_KB_MX )










Custom script: call SetUnitY ( udg_SRB_HitUnit, udg_SRB_KB_MY )









Else - Actions








-------- --------








Custom script: call RemoveLocation ( udg_CP_Point )








-------- --------








Set SRB_GroupContainer = (Load 6 of SRB_RockID in SRB_Hashtable)








If (All Conditions are True) then do (Then Actions) else do (Else Actions)









If - Conditions










(SRB_HitUnit is in SRB_GroupContainer) Not equal to True









Then - Actions










Unit - Cause SRB_Caster to damage SRB_HitUnit, dealing SRB_RockDamage[SRB_Level] damage of attack type SRB_RockAttackType and damage type SRB_RockDamageType










Unit Group - Add SRB_HitUnit to SRB_GroupContainer









Else - Actions








-------- --------







Else - Actions






-------- --------




-------- --------




Set SRB_RockSpeedCounter = ((Load 4 of SRB_RockID from SRB_Hashtable) + SRB_RockSpeedCalculation)




Hashtable - Save SRB_RockSpeedCounter as 4 of SRB_RockID in SRB_Hashtable




-------- --------




If (All Conditions are True) then do (Then Actions) else do (Else Actions)





If - Conditions






SRB_RockSpeedCounter Greater than or equal to SRB_RockMaxDistance[SRB_Level]





Then - Actions






-------- --------






Set SRB_ScaleRatio = (SRB_ExplodeRadius[SRB_Level] x 0.53)






Custom script: set udg_SRB_ExplodeDummy = CreateUnit ( GetOwningPlayer ( udg_SRB_Caster ), udg_SRB_RockDummyType, udg_SRB_RockX, udg_SRB_RockY, 0 )






Animation - Change SRB_ExplodeDummy's size to (SRB_ScaleRatio%, 0.00%, 0.00%) of its original size






Custom script: call DestroyEffect ( AddSpecialEffectTarget ( udg_SRB_ExplodeEffect, udg_SRB_ExplodeDummy, "origin" ) )






-------- --------






Custom script: set bj_wantDestroyGroup = true






-------- --------






Unit Group - Pick every unit in (Units within SRB_ExplodeRadius[SRB_Level] of SRB_RockPosition) and do (Actions)







Loop - Actions








-------- --------








Set SRB_AffectedUnit = (Picked unit)








-------- --------








If (All Conditions are True) then do (Then Actions) else do (Else Actions)









If - Conditions










(SRB_AffectedUnit is alive) Equal to True










(SRB_AffectedUnit belongs to an enemy of (Owner of SRB_Caster)) Equal to True










(SRB_AffectedUnit is Magic Immune) Not equal to True










(SRB_AffectedUnit is A flying unit) Not equal to True









Then - Actions










Unit - Cause SRB_Caster to damage SRB_AffectedUnit, dealing SRB_ExplodeDamage[SRB_Level] damage of attack type SRB_RockAttackType and damage type SRB_RockDamageType









Else - Actions








-------- --------






-------- --------






Set SRB_RockModelHandler = (Load 5 of SRB_RockID in SRB_Hashtable)






Special Effect - Destroy SRB_RockModelHandler






Unit - Kill SRB_RockDummy






Unit Group - Remove all units from SRB_GroupContainer






-------- --------






Custom script: call DestroyGroup ( udg_SRB_GroupContainer )






-------- --------






Hashtable - Clear all child hashtables of child SRB_RockID in SRB_Hashtable






Unit Group - Remove SRB_RockDummy from SRB_RockGroup






-------- --------






Set SRB_Instances = (SRB_Instances - 1)






-------- --------






If (All Conditions are True) then do (Then Actions) else do (Else Actions)







If - Conditions








SRB_Instances Equal to 0







Then - Actions








Trigger - Turn off (This trigger)







Else - Actions






-------- --------





Else - Actions




-------- --------




Custom script: call RemoveLocation ( udg_SRB_RockPosition )




-------- --------
*Spell Name: Splitting Rock Boulders [ GUI MUI ] v1.0 = Initial Upload to Hive.
*Spell Author/Creator: by jakeZinc.
*Spell Version: v1.0 = * Initial Released
*Spell Purpose: Im bored and Ive seen my spells are now very very very simple and I forgot the power of eye candy xD.
So I found a spell idea about eye candy. Also I use lightning handling system that it is cool!
But Im lazy so I didnt add more cool stuffs..
Ok On-Topic, The caster will release a boulders that will push the armies backward and damaging
them.
*Spell Idea: Mind
*Spell Requested: None
*Spell Features v1.0 = * Multi- Unit Instanceabilty ( MUI Spell )
* Lagless
* Documented
* Leakless
* Configurable
How to Import/Install:
=Preparing for import=
Go to:
File
Preferences
General
Check the box labelled ''Automatically create unknown variables while pasting trigger data''
=Speeding up import of object data-
Go to:
Window
make sure the 'brush list' is unchecked.
You can swap between my map and your map.
=Main importing=
Difficuly in Importing:
"Easy" = 1 to 3 Copy - Paste Required
"Medium" = 4 to 6 Copy - Paste Required
"Hard" = 7 above, Copy - Paste Required
Spell Importing Difficulty: 'Medium'
In order of importing: Copy --> Paste to your Map.
Object Data (OE) - Spell - Splitting Rock Boulders
Object Data (OE) - Unit - Splitting Rock Boulders ( Dummy ).
Trigger Data (TE) - Folder - Splitting Rock Boulders [ GUI MUI ] v1.0.
Including this Triggers: LH Setup, LH Unit2Unit, LH Loop, Check Walkability Setup, Check Walkability.
Import Manager ( F12 ): Dummy.mdx ( Dummy by Vexorian )
* Notes:
Note #1: Make sure to Configure the " SRB Configuration " trigger in the SRB_Ability, SRB_RockDummyType,
Note #2: If the spell give you error about " X, Y, MX and MY thing " pls copy the " SRB Files " trigger.
Note #3: Report to the Author If you found a bug or tell the author if the spell is not working.
Note #4: The spell will work if you follow the notes and the Main Importing Instructions.
Note #5: ~~Enjoy!!!
=Modification=
All Modifications should be done in the Configuration Trigger, each configuration is explained and elaborated.
//==========================================================================================================================================
Pls Give credits if you use this spell in your map.
Credits: emjl3r ( For the Spell Map Template )
Credits: Vexorian ( For the Dummy Model [ dummy.mdx ] )
Credits: PurgeandFire ( For the Check Walkability System/Snippet )
Credits: DefSkull ( For Lightning Handling System )
Sincerely,
jakeZinc