Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: Noah492 on July 07, 2015, 04:50:13 PM

Title: Communication between 2 objects.
Post by: Noah492 on July 07, 2015, 04:50:13 PM
I want to make it so when I look at a ball for a few seconds, a cube is destroyed. How do I destroy the cube. When the ball has been looked at. I have the ball look already.
Title: Re: Communication between 2 objects.
Post by: terri on July 07, 2015, 05:05:09 PM
You mean what action? Destroy Object
Title: Re: Communication between 2 objects.
Post by: sebaslive on July 07, 2015, 05:19:47 PM
What are you using for the ball look? If its a Raycast then you can grab the cube and tell it to destroy object.
Title: Re: Communication between 2 objects.
Post by: Noah492 on July 07, 2015, 06:57:25 PM
I am using MOUSE OVER to look at the ball and WAIT is used. When you look at the ball for 3 seconds I want to destroy a different gameobject.
Title: Re: Communication between 2 objects.
Post by: djaydino on July 08, 2015, 05:11:38 AM
Hi,
you can use the "destroy object" action and point it to that object .
if the object to destroy is a prefab you can use "find gameobject" and find it with tag.
Save it in a variable and use that variable in "destroy object"