#### Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

# Need help!

Member Posts: 34
I've been stuck on this problem for 2 days.

On my game I have 3 robots standing next to each other. Each robot had a small button on there chest. Now my goal is to touch each button on the robots triggering each of them to make a sound then fade away until there gone.

The trouble I'm having is when they are gone if I touch on the same location they will keep coming back.

• Member, Sous Chef, PRO Posts: 2,849
If you are making them invisible by changing their alpha - they are still there! (They are just invisible.)

After a robot goes invisible, use the destroy actor behavior to really get rid of it.
• Member Posts: 34
yeah I just want to be able to hit the button on there chest to make a sound then destroy the actor by making her fade away.

I just dont know how to connect the button on there chest to the robot. I made a "hitbox" on the robot chest. I set the hitbox to invisible and place it over top of the button on the robot chest. So when I hit the button the invisible "hitbox" should be destroy, and trigger the robot to make a sound then fade away until it's destroy. I don't know how to connect both together.

Maybe it's a better way to do this?
• Member, Sous Chef, PRO Posts: 2,849
edited October 2013
Make a game level attribute call it 'destroyRobot1' make it a boolean attribute.

On the hitbox, have a rule:
```When touch is pressed Change Attribute: destroyRobot1 To: true```

In the Robot1 actor, have a rule:
```When attribute: destroyRobot1 is true Interpolate self.Alpha to 0, Duration = 1 second Timer (after 1 second) Destroy Actor```
• Member Posts: 1,113
Create a game attribute(Boolean) name it fade or something you can remember. That's how you link the actors. In your hitbox you would add a rule touch is pressed

Change attribute

In the robot add a rule

Interpolate or whatever you use

He who knows nothing is closer to the truth than he whose mind is filled with falsehoods and errors.

• Member Posts: 34
Yeah we're on the right page... now this might sound dumb, but with the new update the change attribute is different. I think at one time i could type inside the set: box but now a small menus pops up, and inside the menu and at the bottom I see the actor i made "hitbox" When I click on that, a few more another option show up. position, size, rotation, preload art, name, time, color, image, tags, graphics, motion, phsysics.

How can i type in destroyrobot1 ?
• Member Posts: 34
edited October 2013
Wait I think I have it now... I'm go try it out.
• Member Posts: 34
I just remember how to make a Boolean.
• Member Posts: 1,113
edited October 2013
Your not going to type in destroyrobot1. Your making a boolean game attribute to turn to true when your hitbox is pressed, which will in turn make your robot be destroyed as long as you add a destroy actor in your rules.

He who knows nothing is closer to the truth than he whose mind is filled with falsehoods and errors.

• Member Posts: 34
yeah I got it thanks guys, it's work!!!
• I am here.Member, Sous Chef, PRO Posts: 6,577