• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

How do i put slide in my map? ;)

Status
Not open for further replies.
Level 5
Joined
Jul 14, 2008
Messages
81
can you go a bit further into details? :S




Have this ... can anyone tell me whats wrong?
JASS:
function Trig_Gjeit_Conditions takes nothing returns boolean
    if ( GetBooleanOr(  GetIssuedOrderIdBJ() == String2OrderIdBJ("smart") , GetIssuedOrderIdBJ() == String2OrderIdBJ("move") ) ) then
        return true
    endif
    return false
endfunction

function Trig_Gjeit_Actions takes nothing returns nothing
    local location p
    local location p2
    set p = GetUnitLoc(GetOrderedUnit())
    if ( GetTerrainTypeBJ(p) == 'Nice' ) then
        set p2 = GetOrderPointLoc()
        call SetUnitPositionLocFacingBJ( GetTriggerUnit(), PolarProjectionBJ(p, 1.00, DistanceBetweenPoints(p, p2)), AngleBetweenPoints(p, p2) )
        call RemoveLocation( p2 )
    endif
    call RemoveLocation( p )
endfunction

function InitTrig_Gjeit takes nothing returns nothing
    set gg_trg_Gjeit = CreateTrigger(  )
    call TriggerRegisterAnyUnitEventBJ( gg_trg_Gjeit, EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER )
    call TriggerAddCondition( gg_trg_Gjeit, Condition( function Trig_Gjeit_Conditions ) )
    call TriggerAddAction( gg_trg_Gjeit, function Trig_Gjeit_Actions )
endfunction
 
Status
Not open for further replies.
Top