"Invalid escape character sequence" is ?

darkbeer

Beer is Good!
Reaction score
84
JASS:
function Trig_Untitled_Trigger_006_Actions takes nothing returns nothing
local string e = "Abilities\\Spells\\NightElf\\Taunt\\TauntCaster.mdl"
local integer i = ('Hpal')
local location l = (GetRectCenter(GetPlayableMapRect()))
local unit u = (CreateUnitAtLoc(Player(0),i,l,bj_UNIT_FACING))
if GetLocalPlayer() == Player(0) then 
call PanCameraTo((GetLocationX(l)),(GetLocationY(l)))
endif
call RemoveLocation (l)
call TriggerSleepAction(5.)
set l = GetUnitLoc(u)
call DestroyEffect(AddSpecialEffectLoc(e,l))
call RemoveLocation (l)
set l = null
set i = 0
set u = null
endfunction
//===========================================================================
function InitTrig_UntitledTrigger006 takes nothing returns nothing
    set gg_trg_UntitledTrigger006 = CreateTrigger()
    call TriggerRegisterTimerEventSingle(gg_trg_UntitledTrigger006, 1.0)
    call TriggerAddAction( gg_trg_UntitledTrigger006, function Trig_Untitled_Trigger_006_Actions )
endfunction


take a look at the BJ in Tesh and see what it does ......
 

darkbeer

Beer is Good!
Reaction score
84
well best is to use xy coordinates since they dont need to be cleaned and are more efficient.

well and use the natives so you save a function call^^:
GetPlayableMapRect() = bj_mapInitialPlayableArea



alternatively set x and y to locals^^ and use them instead.

Note: freehanded
 

Komaqtion

You can change this now in User CP.
Reaction score
469
Shouldn't I be able to do this then ?



Oh i fixed it XD

But now is this the correct to get effects in a circle(just 4 points but still ;))??

Fixed again !!! ;P;P thanks to every1 !!!! works now

JASS:
function Spell_Check takes nothing returns boolean
    return (GetSpellAbilityId() == '0000')
endfunction

function Spell takes nothing returns nothing
    local location l = GetUnitLoc(GetTriggerUnit())
    local string s = "Abilities\\Spells\\Human\\Flare\\FlareCaster.mdl"
    call DestroyEffect(AddSpecialEffectLoc(s,l))
    call RemoveLocation(l)
    set l = null
endfunction

function Effects takes nothing returns nothing
local integer i = 1
local string e = "Abilities\\Spells\\Human\\Flare\\FlareCaster.mdl"
local location loc = GetUnitLoc(GetTriggerUnit())
local unit u = GetTriggerUnit()
local real xu = GetUnitX(u)
local real yu = GetUnitY(u)
local real x
local real y
loop
exitwhen i==4
set x = xu+200*Cos((i*90)*bj_DEGTORAD)
set y = yu+200*Sin((i*90)*bj_DEGTORAD)
call DestroyEffect(AddSpecialEffect(e,x,y))
call RemoveLocation(loc)
set x = 0
set y = 0
set i = i+1
endloop
set i = 0
endfunction

//===========================================================================
function InitTrig_Untitled_Trigger_006 takes nothing returns nothing
    set gg_trg_Untitled_Trigger_006 = CreateTrigger()
    call TriggerAddCondition(gg_trg_Untitled_Trigger_006,Condition(function Spell_Check))
    call TriggerRegisterAnyUnitEventBJ(gg_trg_Untitled_Trigger_006,EVENT_PLAYER_UNIT_SPELL_EFFECT)
    call TriggerAddAction(gg_trg_Untitled_Trigger_006,function Spell)
    call TriggerAddAction(gg_trg_Untitled_Trigger_006,function Effects)
endfunction


This just gives me 1 flare at the caster XD
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      • Ghan
        Administrator - Servers are fun

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top