GameSalad

Howdy, Stranger!

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

Need help!

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.

Comments

  • RThurmanRThurman Posts: 2,824Member, Sous Chef, PRO
    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.
  • 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?
  • RThurmanRThurman Posts: 2,824Member, Sous Chef, PRO
    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
  • mounted88mounted88 Posts: 1,113Member
    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
    Game.fade to true

    In the robot add a rule
    Game.fade is true

    Interpolate or whatever you use

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

  • 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 ?
  • therobinsonbros@gmail.com[email protected] Posts: 34Member
    edited October 2013
    Wait I think I have it now... I'm go try it out.
  • I just remember how to make a Boolean.
  • mounted88mounted88 Posts: 1,113Member
    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.

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

    @[email protected].com Glad the other guys sorted your problem for you.

    Any future threads you start, please make the titles more descriptive. "Need help" is meaningless as most people need help; it's what they need help with that's the point...

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

Sign In or Register to comment.