Code: Select all
function specialPatrolRemove()
special_skeleton_warrior_1:destroy()
special_skeleton_warrior_2:destroy()
special_skeleton_warrior_2:destroy()
special_skeleton_warrior_4:destroy()
end
Code: Select all
function specialPatrolRemove()
special_skeleton_warrior_1:destroy()
special_skeleton_warrior_2:destroy()
special_skeleton_warrior_2:destroy()
special_skeleton_warrior_4:destroy()
end
Code: Select all
function killThem()
for i in allEntities(1) do
if i.name == "special_skeleton_warrior" then
i:destroy()
end
end
end
Yes, I have that; sorry. Was typing in here too fast. It still won't work, because the game doesn't recognize a patrol as a single entity, so there's no way that I can tell to refer to it in a script. Had I known that prior to starting this map, I would have made the focus something else.Komag wrote:don't forget the () in the function nameCode: Select all
function specialPatrolRemove() special_skeleton_warrior_1:destroy() special_skeleton_warrior_2:destroy() special_skeleton_warrior_2:destroy() special_skeleton_warrior_4:destroy() end
Hmm...lemme give that a try. If anything should work, that's it.Komag wrote:if they are the only ones of that type on the entire level, you could do something like: (for level in example)
Code: Select all
function killThem() for i in allEntities(1) do if i.name == "special_skeleton_warrior" then i:destroy() end end end
Yeah, especially when there is no reason for the error. It absolutely will not let me use addItem to any skelly patrol now. I've called it properly, I've spawned other things in the same room using it, I've copied and pasted it from another map I've did...nothing works. Weird, but I've accepted and moved on.Komag wrote:hunting down and solving issues is always a big challenge, especially with programming stuff that is so non-physical
I was going to say it worked perfectly before the switch-off between patrols started to work, but now that I think about it, it may have been a warrior that was holding the key.Komag wrote:you are trying to addItem to the patrol? I think you would have to do addItem to each skeleton separately, or is that what you are already trying to do and it's not working?