ID:139777
 
Code:
atom
MouseEntered(atom/o)
if(usr.spellchosen)
spawn() usr.RevealBlueSpellmaking(usr.spellreadied,src)
MouseExited(atom/o)
usr.spellmaking = 0


And the RevealBlueSpellmaking:
RevealBlueSpellmaking(spell,atom/oo)
var/list/argss = list()
switch(spell)
if("Flashy Bolt Thinger")
argss = list(list(0,0,0),list(1,0,0),list(-1,0,0),list(0,1,0),list(0,-1,0))
if("Armageddon")
argss = list(list(3,0,0),list(3,-1,0),list(3,1,0),list(-3,0,0),list(-3,-1,0),list(-3,1,0),list(0,0,0),list(-1,1,0),list(1,1,0),list(-1,-1,0),list(1,-1,0),list(-2,2,0),list(-2,-2,0),list(2,-2,0),list(2,2,0))
var/list/blued = list()
var/list/blues = list()
var/vv
for(var/turf/T in world)
for(var/I=1, I <= length(argss), I++)
if(T.x == oo.x + argss[I][1] && T.y == oo.y + argss[I][2] && T.z == oo.z&&!(T in blued))
blued += T
vv = image('BattleBlocks.dmi', locate(T.x,T.y,T.z), "blue", MOB_LAYER-1)
blues += vv
if(T!=null)
src << vv
src.spellmaking = 1
while(src.spellmaking == 1)
sleep(1)
for(var/v in blues)
del(v)
src.spellmaking = 0


Problem description:
Okay, so, the blue APPEARS where it should. The problem BEING is, dragging it off that specific tile doesn't delete it, but rather, it just creates more blue in the tile you dragged it onto. What's the issue here?
Asellia wrote:
Code:
> atom
> MouseEntered(atom/o)
> if(usr.spellchosen)
> spawn() usr.RevealBlueSpellmaking(usr.spellreadied,src)
> MouseExited(atom/o)
> usr.spellmaking = 0
>

And the RevealBlueSpellmaking:
> RevealBlueSpellmaking(spell,atom/oo)
> var/list/argss = list()
> switch(spell)
> if("Flashy Bolt Thinger")
> argss = list(list(0,0,0),list(1,0,0),list(-1,0,0),list(0,1,0),list(0,-1,0))
> if("Armageddon")
> argss = list(list(3,0,0),list(3,-1,0),list(3,1,0),list(-3,0,0),list(-3,-1,0),list(-3,1,0),list(0,0,0),list(-1,1,0),list(1,1,0),list(-1,-1,0),list(1,-1,0),list(-2,2,0),list(-2,-2,0),list(2,-2,0),list(2,2,0))
> var/list/blued = list()
> var/list/blues = list()
> var/vv
> for(var/turf/T in world)
> for(var/I=1, I <= length(argss), I++)
> if(T.x == oo.x + argss[I][1] && T.y == oo.y + argss[I][2] && T.z == oo.z&&!(T in blued))
> blued += T
> vv = image('BattleBlocks.dmi', locate(T.x,T.y,T.z), "blue", MOB_LAYER-1)
> blues += vv
> if(T!=null)
> src << vv
> src.spellmaking = 1
> while(src.spellmaking == 1)
> sleep(1)
> for(var/v in blues)
> del(v)
> src.spellmaking = 0
>

Problem description:
Okay, so, the blue APPEARS where it should. The problem BEING is, dragging it off that specific tile doesn't delete it, but rather, it just creates more blue in the tile you dragged it onto. What's the issue here?

I figured it out! Basically, It was ending the Proc that it deleted them in when it changed location.