What am I doing wrong?
Download model, dif, particles, material: http://nightfall.eddo.cz/files/healing_ ... _green.zip




Code: Select all
function shootProjectileWithId(projName,level,x,y,dir,speed,gravity,velocityUp,offsetX,offsetY,offsetZ,attackPower, ignoreEntity,fragile,championOrdinal)
local pIds = {}
for i in entitiesAt(level, x, y) do
if i.class == "Item" and string.find(i.id, "^%d+$") then
pIds[i.id] = i.name
end
end
shootProjectile(projName,level,x,y,dir,speed,gravity,velocityUp,offsetX,offsetY,offsetZ,attackPower, ignoreEntity,fragile,championOrdinal)
for i in entitiesAt(level, x, y) do
if i.class == "Item" and string.find(i.id, "^%d+$") and not(pIds[i.id]) then
return i.id
end
end
endCode: Select all
local crystalId = shootProjectileWithId(projName,level,x,y,dir,speed,gravity,velocityUp,offsetX,offsetY,offsetZ,attackPower, ignoreEntity,fragile,championOrdinal)
Code: Select all
findEntity(crystalId):destroy()