Hi,
Please don’t say “it doesn’t work”. Explain the expected result, and explain the actual result.
In this case, you are creating a target object and you are deleting it at the same time. Obviously, you won’t see it.
I’m trying to destroy zombies on the screen with a click if the cursor is over them and if the cursor is not over a zombie when clicked then a target is put down which the player starts walking towards.
The solution, I think, has something to do with the cursor not being over every instance of a zombie. Because the desired effect works when there is only one zombie left.
I’ve tried swapping the touch and cursor over inverted events. And I’ve tried putting them in the and logic and as suggested elsewhere in the forums in the Not logic:
You have explained the expected result, you haven’t explained the actual result.
I tried your link, it seems to work fine.
If I click near zombies, they are deleted. If there are no zombies, a target appears and I walk towards it.
Thanks @Gruk
Sorry.
I’m trying to not put the target down when I click a zombie. I want the player to be able to keep walking towards the target even when you are clicking on zombies to kill them.
Thanks.
I’d prefer the event to trigger from a mouse click rather than a mouse released event.
I’ve tried a number of different orders but nothing seems to work.
Here’s the link to the zip file. I’ve just been working on this one simple scene.
I’d still like the individual Zombie object to be destroyed on key/touch down rather than release, but this workaround works for now.
If anyone can suggest a way to add logic so that the touch on Zombie destroys it but if the touch is off Zombie then it puts a target down, then that’d be great.
Ah. I did it again. I think I put the same one up.
What I did this time was add key/touch down to add target part of the logic and key release to delete zombie.