Killing actors with buttons/pickups/actors

NspeelNspeel Member Posts: 17

I cant seems to find a way to do the following:

Actor A rule
When (Touch) is pressed
Do (Destroy) actor B

Now it's simple to destroy the actor at which I'm in but i think it should be just as simple to destroy other actors just as simply.

So right now in my game you buy towers. When a tower is bought u can drag and drop it wherever you want.
-When touch is released I have it saving self coordinates X & Y into a table
-When touch is released it also spawns an invisible actor directly behind it to act as the attack radius of the tower.

The code sequence I'm trying to achieve with actor "tower" is as follows:
-when touch is pressed destroy
-when touch is released spawn

Reason I want to destroy everytime its pressed is because if the player/user moves the say 3 times, It has spawned 3 BUT there is only 1 tower and 3 invisible attack radiuses. 2 of the are useless and taking up resources.


Sign In or Register to comment.