Ive heard that BJ's arent good to use. I use allot of those for events is that what they are talking about, if so how could i go about doing the same thing without using BJ
JASS:
function SmokeGrenadeConditions takes nothing returns boolean
local integer i = GetSpellAbilityId()
return i==039;A01B039;
endfunction
function SmokeGrenade takes nothing returns nothing
local unit marine = GetTriggerUnit()
local unit u
local unit missile
local location l = GetSpellTargetLoc()
local real x = GetLocationX(l)
local real y = GetLocationY(l)
local player p = GetOwningPlayer(marine)
call FieldChat(marine,5.0, udg_Pcolors[GetConvertedPlayerId(p)] + GetPlayerName(p) + "|r : Smoke!" )
call PolledWait(0.1)
set missile = CreateUnit(Player(11),039;h00H039;,GetUnitX(marine),GetUnitY(marine),0.0)
call IssuePointOrderLoc(missile,"attackground",l)
call PolledWait(2.5)
set u = CreateUnit(Player(11),039;h00I039;,x,y,0.0)
call UnitApplyTimedLife(u,039;Bhwd039;,40.0)
call PolledWait(4.5)
set bj_meleeNearestMineDist = GetUnitX(u)
set bj_lastTransmissionDuration = GetUnitY(u)
call RemoveLocation(l)
call RemoveUnit(missile)
set missile = null
set marine = null
set u = null
set l = null
endfunction
//===========================================================================
function InitTrig_Smoke_Grenade takes nothing returns nothing
set gg_trg_Smoke_Grenade = CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Smoke_Grenade,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition( gg_trg_Smoke_Grenade, Condition( function SmokeGrenadeConditions ) )
call TriggerAddAction( gg_trg_Smoke_Grenade, function SmokeGrenade )
endfunction