ReVolver
Mega Super Ultra Cool Member
- Reaction score
- 609
Me and Rhieas have been working on an AoS project and we have completed the ideas and concept of the map but we are in need of a decent terrainer. Here is a spell that we are going to use in our map but we wanted to show you how we made it and how creative it is.
Description:
(R) - Raise Elements
Code:
Enjoy and we will be putting more spells soon and maybe some spell packs

Description:

Uses the powers of the druids to create element golems from nature itself. Depending on the section of terrain you cast your spell on, you will get a different golem.
Code:
Trigger:
- Summon Golems
- Events
- Unit - A unit Starts the effect of an ability
- Conditions
- (Ability being cast) Equal to Raise Elements
- Actions
- -------- Is this GUI? --------
- Custom script: local unit golem
- Custom script: local unit caster = GetTriggerUnit()
- Custom script: local location e = GetSpellTargetLoc()
- -------- Earth Golem --------
- Custom script: if GetTerrainTypeBJ(e) == 'Ldrt' and IsTerrainPathable(GetLocationX(e),GetLocationY(e),PATHING_TYPE_WALKABILITY) == false then
- Custom script: set golem = CreateUnitAtLoc(GetOwningPlayer(caster),'n000',e,0)
- Custom script: call SetUnitAnimation( golem, "birth" )
- Custom script: call DestroyEffect(AddSpecialEffectLoc("Objects\\Spawnmodels\\Undead\\ImpaleTargetDust\\ImpaleTargetDust.mdl",e))
- Custom script: call UnitApplyTimedLife(golem, 'BTLF', 30)
- Custom script: endif
- -------- Dark Golem --------
- Custom script: if IsPointBlighted(GetLocationX(e),GetLocationY(e)) == true and IsTerrainPathable(GetLocationX(e),GetLocationY(e),PATHING_TYPE_WALKABILITY) == false then
- Custom script: set golem = CreateUnitAtLoc(GetOwningPlayer(caster),'n001',e,0)
- Custom script: call SetUnitAnimation( golem, "birth" )
- Custom script: call DestroyEffect(AddSpecialEffectLoc("Abilities\\Spells\\Undead\\RaiseSkeletonWarrior\\RaiseSkeleton.mdl",e))
- Custom script: call UnitApplyTimedLife(golem, 'BTLF', 30)
- Custom script: endif
- -------- Grass Golem --------
- Custom script: if GetTerrainTypeBJ(e) == 'Lgrd' and IsTerrainPathable(GetLocationX(e),GetLocationY(e),PATHING_TYPE_WALKABILITY) == false then
- Custom script: set golem = CreateUnitAtLoc(GetOwningPlayer(caster),'n002',e,0)
- Custom script: call SetUnitAnimation( golem, "birth" )
- Custom script: call DestroyEffect(AddSpecialEffectLoc("Abilities\\Spells\\NightElf\\EntanglingRoots\\EntanglingRootsTarget.mdl",e))
- Custom script: call UnitApplyTimedLife(golem, 'BTLF', 30)
- Custom script: endif
- -------- Water Golem --------
- Custom script: if IsTerrainPathable(GetLocationX(e),GetLocationY(e),PATHING_TYPE_WALKABILITY) and not(IsTerrainPathable(GetLocationX(e),GetLocationY(e),PATHING_TYPE_AMPHIBIOUSPATHING)) == true then
- Custom script: set golem = CreateUnitAtLoc(GetOwningPlayer(caster),'n003',e,0)
- Custom script: call SetUnitAnimation( golem, "birth" )
- Custom script: call DestroyEffect(AddSpecialEffectLoc("Objects\\Spawnmodels\\Naga\\NagaDeath\\NagaDeath.mdl",e))
- Custom script: call UnitApplyTimedLife(golem, 'BTLF', 30)
- Custom script: endif
- -------- Rock Golem --------
- Custom script: if GetTerrainTypeBJ(e) == 'Lrok' and IsTerrainPathable(GetLocationX(e),GetLocationY(e),PATHING_TYPE_WALKABILITY) == false then
- Custom script: set golem = CreateUnitAtLoc(GetOwningPlayer(caster),'n004',e,0)
- Custom script: call SetUnitAnimation( golem, "birth" )
- Custom script: call DestroyEffect(AddSpecialEffectLoc("Objects\\Spawnmodels\\Undead\\ImpaleTargetDust\\ImpaleTargetDust.mdl",e))
- Custom script: call UnitApplyTimedLife(golem, 'BTLF', 30)
- Custom script: endif
- -------- Finish Up --------
- Custom script: call RemoveLocation(e)
- Custom script: set e = null
- Custom script: set golem = null
- Custom script: set caster = null
- Events
Enjoy and we will be putting more spells soon and maybe some spell packs
Attachments
-
25 KB Views: 480