Entities destroy crash the editor
Posted: Tue Nov 20, 2012 10:31 pm
I have some problems.
I have on the same square twelve entities :
door_floor_1
dungeon_floor_drainage_1
teleporter_door_1
pressure_plate_door_1
blockage_door_1
timer_open_door_1
timer_close_door_1
timer_damage_party_door_1
timer_destroy_blockage_door_1
timer_blockage_door_1
timer_teleporter_door_1
timer_verify_monster_door_1
if I use this function
It return the same list with sometimes a number.
Why a number, I don't know.
And if I use this function
The editor closed, with no message.
Any idea for why the destroy() method crash the editor ?
I have on the same square twelve entities :
door_floor_1
dungeon_floor_drainage_1
teleporter_door_1
pressure_plate_door_1
blockage_door_1
timer_open_door_1
timer_close_door_1
timer_damage_party_door_1
timer_destroy_blockage_door_1
timer_blockage_door_1
timer_teleporter_door_1
timer_verify_monster_door_1
if I use this function
Code: Select all
function DamageDoor()
door_number = 1
door_break = findEntity("door_floor_"..door_number)
for i in entitiesAt(door_break.level,door_break.x,door_break.y) do
entity_destroy = findEntity(i.id)
print(entity_destroy.id)
end
endWhy a number, I don't know.
And if I use this function
Code: Select all
function DamageDoor()
door_number = 1
door_break = findEntity("door_floor_"..door_number)
for i in entitiesAt(door_break.level,door_break.x,door_break.y) do
entity_destroy = findEntity(i.id)
entity_destroy:destroy()
end
endAny idea for why the destroy() method crash the editor ?