- Joined
- Jul 25, 2019
- Messages
- 110
damn this goes crazy
function SetTexture takes unit u, integer texture_id returns nothing
set bj_lastCreatedDestructable = CreateDestructable(texture_id, GetUnitX(u) + (10. * Cos(GetUnitFacing(u) * bj_DEGTORAD)), GetUnitY(u) + (10. * Sin(GetUnitFacing(u) * bj_DEGTORAD)), 0., 1., 0)
call UnitAddAbility(u, 'Agra')
call IssueTargetOrderById(u, 852511, bj_lastCreatedDestructable)
call UnitRemoveAbility(u, 'Agra')
call RemoveDestructable(bj_lastCreatedDestructable)
call SetUnitAnimation(u, "stand")
endfunction