TOUR
PRICING
HELP
Stencylpedia
Blocks Guide
Sample Games
Developer Center
FORUMS
CHAT
#MADEINSTENCYL
EDUCATION
SIGN IN
×
Welcome back!
Username or E-mail
Password
(
Forgot?
)
C
OMMUNITY
Home
Issue Tracker
Inbox [0]
New Posts
New Replies
Search
Stencyl Community
→
Stencyl
→
Ask a Question
→
How to destroy an actor by clicking a different actor?
Pages:
1
How to destroy an actor by clicking a different actor?
DaredFTW
Posts: 7
August 29, 2014, 07:27:43 pm
I have an actor (lets call him tim). When I click that actor (tim) it creates another actor (lets call him bob). How do I make it so that when I click on bob it will kill tim? In my case I have an actor in the scene and when it is clicked a different actor is created in that same scene. The actor that was just created can then be clicked and it will kill the first actor. I am unable to achieve this because I don't know how to kill the first actor by clicking the second actor. Any help is much appreciated!
« Last Edit: August 29, 2014, 07:45:42 pm by DaredFTW »
Kazetoon
Posts: 556
August 29, 2014, 09:02:58 pm
You have to create an attribute X in bob that has the value tim so that you can use an event when clicked on self, kill actor X. The image "part 1" should go in a click on actor event for Tim's behavior, and the image "part 2" should be in a click event in bob's behavior with an attribute MyActor or whatever you want to call it.
« Last Edit: August 29, 2014, 09:08:57 pm by Kazetoon »
Little Drop - Try it out!
iphone/ipad
•
Android
Newgrounds
•
Stencyl Arcade
•
Kongregate
Developer Website
DaredFTW
Posts: 7
August 29, 2014, 09:37:26 pm
It worked perfectly, thank you so much!
Pages:
1