elseif(All==2){ findByClass("npc_*") findSortByDistance(E:pos()) Target = find() if (Target:isAlive()){A = 1} if (!Target:isAlive()){A = A + 1 Target = findResult(A)} E:setColor(randint(0,255),randint(0,255),randint(0,255),255)}
if (Target:isAlive()){A = 1} if (!Target:isAlive()){A = A + 1 Target = findResult(A)}
Could you post the entire code, please?Your issue is right here:Code: [Select] if (Target:isAlive()){A = 1} if (!Target:isAlive()){A = A + 1 Target = findResult(A)}You're not thinking correctly in terms of how an E2 is run. You're saying that, when this target dies, add 1 to A, then switch the target. But then, you change A back to 1, this I don't understand. What is A?
Entities=E:getConstraints()Entities[1,entity]:setMass(0.00001)Entities[2,entity]:setMass(0.00001)Entities[3,entity]:setMass(0.00001)Entities[4,entity]:setMass(0.00001)Entities[5,entity]:setMass(0.00001)