SetScriptVar not woking? pls help

Started by mike1011031, July 19, 2014, 01:41:13 PM

Previous topic - Next topic

mike1011031

so i am making a map with a player controlled laser, and I am trying to incorporate a unit that, when creeper touches it, weakens/deactivates the laser. However, SetScriptVar does not seem to be working.

laser controller base

# ControlLaser.crpl
# Created on: 7/15/2014 10:05:56 AM
# ------------------------------------------


once
GetUnitAt(1 98) ->laserID
<-laserID getunittype
trace
showtracelog
endonce


if(GetCreeper(currentcoords) 0 eq)
2 celltopixel(currentcoords) 0 1 1 1 div(30) 1 CreateEffectClipped
<-laserID "laser" "controller1" 2 SetScriptVar
else
<-laserID "laser" "controller1" 1 SetScriptVar
endif


there is another copy of this that uses controller2 instead of controller1



actual laser

# laser.crpl
# Created on: 7/14/2014 7:48:04 AM
# ------------------------------------------

once
1 ->moving
1 ->controller1
1 ->controller2
endonce

if(getKeyDown("LeftShift"))
if(<-moving eq(0))
1 ->moving
else
0 ->moving
endif
endif

AbortMove
if(<-moving eq(0))
ClearQueuedMoves
GetMouseCell 2 QueueMove
endif

if(<-controller1 <-controller2 add neq(2))
1000000 <-controller1 mul <-controller2 mul ->power
else
0 ->power
endif

if(<-power neq(0))
2 celltopixel(currentcoords) 0 1 1 1 div(30) 1 createeffectclipped
endif
damageCreeper(CurrentCoords 5 25 <-power false)

<-controller1 "
" concat <-controller2 concat setpopuptext


Any help would be appreciated.
Is this Loss?

knucracker

The name of the script argument needs to be the complete file name.  So "laser.crpl" rather than just "laser".

mike1011031

Thanks. I can be a derp sometimes. :P
Is this Loss?