BRUTAL
I'm working
- Reaction score
- 118
all the red parts?
yea sure lol (well red when you look in newgen)
yea sure lol (well red when you look in newgen)
You should look into changing all those BJ's into their natives also.
I could probably help you with some of that, if you want.
Alright, could you post your current code ?all the red parts?
yea sure lol (well red when you look in newgen)
Lmao !Holy crap!! They are all BJ's... i didnt even notice. You should certaintly fix that.
Yes.
Hold control and move your mouse over the BJ, click it.
It will have the equivalent functions made up to make the BJ.
call UnitAddAbilityBJ( 039;A002039;, GetLastCreatedUnit() )
function UnitAddAbilityBJ takes integer abilityId, unit whichUnit returns boolean
return UnitAddAbility(whichUnit, abilityId)
endfunction
scope IceTrap initializer Init
// ________________________________________
// || ||
// || Modify below ||
// ||________________________________________||
globals
private constant integer Spellid = 039;A001039; // Raw code of Ice Trap ability
private constant integer Dummyid = 039;h007039; // Raw code of Ice Trap ability
private constant real MaxUnits = 360 // Number of units made to complete the circle, 1 unit = 10
private constant real AOE = 290 //Base AOE of spell, each level AOE gets bigger
endglobals
// ________________________________________
// || ||
// || Do not modify ||
// ||________________________________________||
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == Spellid
endfunction
function Actions takes nothing returns nothing
local unit ITCaster = GetSpellAbilityUnit()
local real ITDuration = (6 + (3 * I2R(GetUnitAbilityLevelSwapped(039;A001039;, ITCaster))))
local location ITTargetPoint = GetSpellTargetLoc()
local real ITTimer = 0
local real ITAngle = ( GetUnitFacing(ITCaster) + 140.00 )
local location ITTargetPos = PolarProjectionBJ(ITTargetPoint, ( AOE + ( I2R(GetUnitAbilityLevelSwapped(039;A001039;, ITCaster)) * 20.00 ) ), ITAngle)
local rect ITCreateRect = RectFromCenterSizeBJ(ITTargetPoint, 100.00, 100.00)
call SetUnitFacingToFaceLocTimed( ITCaster, ITTargetPoint, 0 )
call AddWeatherEffectSaveLast( ITCreateRect, 039;SNls039; )
call EnableWeatherEffect( GetLastCreatedWeatherEffect(), true )
call RemoveRect ( ITCreateRect )
loop
exitwhen ITTimer == MaxUnits
set ITTimer = (ITTimer + 10)
set ITTargetPos = PolarProjectionBJ(ITTargetPoint, ( AOE + ( I2R(GetUnitAbilityLevelSwapped(039;A001039;, ITCaster)) * 20.00 ) ), (ITAngle + ITTimer ))
call CreateNUnitsAtLocFacingLocBJ( 1, Dummyid, GetOwningPlayer(ITCaster), ITTargetPos, ITTargetPoint )
call UnitAddAbilityBJ( 039;A002039;, GetLastCreatedUnit() )
call SetUnitAbilityLevelSwapped( 039;A002039;, GetLastCreatedUnit(), GetUnitAbilityLevelSwapped(039;A001039;, ITCaster) )
call IssueImmediateOrderBJ( GetLastCreatedUnit(), "immolation" )
call UnitApplyTimedLifeBJ( ( ITDuration), 039;BTLF039;, GetLastCreatedUnit() )
call SetTerrainPathableBJ( ITTargetPos, PATHING_TYPE_WALKABILITY, false )
call RemoveLocation (ITTargetPos)
call TriggerSleepAction(0.01)
endloop
call RemoveLocation (ITTargetPoint)
set ITCaster = null
endfunction
//===========================================================================
private function Init takes nothing returns nothing
local trigger t = CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t, EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t, Condition(function Conditions))
call TriggerAddAction(t, function Actions)
endfunction
endscope
function UnitAddAbilityBJ takes integer abilityId, unit whichUnit returns boolean
return UnitAddAbility(whichUnit, abilityId)
endfunction
scope IceTrap initializer Init
// ________________________________________
// || ||
// || Modify below ||
// ||________________________________________||
globals
private constant integer Spellid = 039;A001039; // Raw code of Ice Trap ability
private constant integer Dummyid = 039;h007039; // Raw code of Ice Trap ability
private constant real MaxUnits = 360 // Number of units made to complete the circle, 1 unit = 10
private constant real AOE = 290 //Base AOE of spell, each level AOE gets bigger
endglobals
// ________________________________________
// || ||
// || Do not modify ||
// ||________________________________________||
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == Spellid
endfunction
function Actions takes nothing returns nothing
local unit ITCaster = GetSpellAbilityUnit()
//local real ITDuration = (6 + (3 * I2R(GetUnitAbilityLevelSwapped('A001', ITCaster))))
local real ITDuration = (6 + (3 * I2R(GetUnitAbilityLevel(ITCaster, Spellid))))
local location ITTargetPoint = GetSpellTargetLoc()
local real ITTimer = 0
local real ITAngle = ( GetUnitFacing(ITCaster) + 140.00 )
//local location ITTargetPos = PolarProjectionBJ(ITTargetPoint, ( AOE + ( I2R(GetUnitAbilityLevelSwapped('A001', ITCaster)) * 20.00 ) ), ITAngle)
local location ITTargetPos = PolarProjectionBJ(ITTargetPoint, (AOE + (I2R(GetUnitAbilityLevel(ITCaster, Spellid)) * 20.00)), ITAngle)
local rect ITCreateRect = RectFromCenterSizeBJ(ITTargetPoint, 100.00, 100.00)
// I don't know how to fix Rect BJ's, sorry.
call SetUnitFacingToFaceLocTimed( ITCaster, ITTargetPoint, 0 )
// Don't know how to fix above one either, sorry :| .
call AddWeatherEffectSaveLast( ITCreateRect, 039;SNls039; )
// This one either, god I suck...
//call EnableWeatherEffect( GetLastCreatedWeatherEffect(), true )
call EnableWeatherEffect(bj_lastCreatedWeatherEffect, true)
call RemoveRect ( ITCreateRect )
loop
exitwhen ITTimer == MaxUnits
set ITTimer = (ITTimer + 10)
//set ITTargetPos = PolarProjectionBJ(ITTargetPoint, ( AOE + ( I2R(GetUnitAbilityLevelSwapped('A001', ITCaster)) * 20.00 ) ), (ITAngle + ITTimer ))
set ITTargetPos = PolarProjectionBJ(ITTargetPoint, (AOE + (I2R(GetUnitAbilityLevel(ITCaster, Spellid)) * 20.00)), (ITAngle + ITTimer))
call CreateNUnitsAtLocFacingLocBJ( 1, Dummyid, GetOwningPlayer(ITCaster), ITTargetPos, ITTargetPoint )
// Can't remember how to fix Create units...
//call UnitAddAbilityBJ( 'A002', GetLastCreatedUnit() )
call UnitAddAbility(bj_lastCreatedUnit, 039;A002039;)
//call SetUnitAbilityLevelSwapped( 'A002', GetLastCreatedUnit(), GetUnitAbilityLevelSwapped('A001', ITCaster) )
call SetUnitAbilityLevel(bj_lastCreatedUnit, 039;A002039;, GetUnitAbilityLevel(ITCaster, Spellid))
//call IssueImmediateOrderBJ( GetLastCreatedUnit(), "immolation" )
call IssueImmediateOrder(bj_lastCreatedUnit, "immolation")
//call UnitApplyTimedLifeBJ( ( ITDuration), 'BTLF', GetLastCreatedUnit() )
call UnitApplyTimedLife(bj_lastCreatedUnit, 039;BTLF039;, ITDuration)
call SetTerrainPathableBJ( ITTargetPos, PATHING_TYPE_WALKABILITY, false )
// Can't fix terrain pathable either, sorry.
call RemoveLocation (ITTargetPos)
call TriggerSleepAction(0.01)
endloop
call RemoveLocation (ITTargetPoint)
set ITCaster = null
endfunction
//===========================================================================
private function Init takes nothing returns nothing
local trigger t = CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t, EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t, Condition(function Conditions))
call TriggerAddAction(t, function Actions)
endfunction
endscope
local real x = GetLocationX(ITTargetPoint)
local real y = GetLocationY(ITTargetPoint)
//call CreateNUnitsAtLocFacingLocBJ( 1, Dummyid, GetOwningPlayer(ITCaster), ITTargetPos, ITTargetPoint )
call CreateUnit(GetOwningPlayer(ITCaster), Dummyid, x, y, GetUnitFacing(ITCaster))
The ones that look like...
bj_someWierdName
are pre-defined constants, in more simple terms..
they are pre-defined variables.
BJ Functions are generally bad, not constants.
so predefined constants are good? XD
yea like x/y points are better then locations right