Issues deleting objects
Posted: Sun May 15, 2016 9:19 pm
I am having issues with deleting my enemy graphics objects when they reach the end of the level. The program freezes, and I need to close and remove from memory to start it again. Here is the code for the delete function, it is located on the card.
And here is the object that calls it.
I don't know what the issue is, from what I can tell it shouldn't have anything running when I am trying to delete it.
Code: Select all
function deletePls toDelete
delete graphic toDelete
end deletePls
Code: Select all
on checkBounds
global EKilled
global raiders
local myID
if(loc of me is 1000,280) then
put raiders + 1 into raiders
add 1 to EKilled
put "Raiders: " & raiders into field "Label Current Raiders"
put long id of me into myID
send "deletePls myID" to this card in 10 milliseconds
else
send checkBounds to me in 1 second
end if
end checkBounds