Need help with gamesalad for (Windows)

jobeijobei Member Posts: 39
edited June 2012 in Working with GS (PC)
Hey guys, I'm stuck on this code, I hope someone that use the window gamesalad can help me out.

I have two actors, actor A and actor B, I set them across from each other. actor A is on the right side of the screen and actor B is on the left side. Now I dont want to move either actor, I just want to be able to touch actor A , and by touching actor A it will destroy actor B. That's what I've been trying to do for 2 days now lol. Can anyone help?

Now I already set the actor up were I want them, I just want to touch one actor, making the other actor be destroy.

Best Answers

  • jamie_cjamie_c ImagineLabs.rocks Posts: 5,772
    edited June 2012 Accepted Answer
    Hi Jobei,

    Try this:

    1. Set up a boolean game attribute called destroyActorB - this should be false to start with.

    2. Put a rule in actor B that says if destroyActorB is true destroy me.

    3. Put a rule on actor A that says if I'm touched change destroyActorB to true.

    That should do it.

    Jamie
  • jamie_cjamie_c ImagineLabs.rocks Posts: 5,772
    Accepted Answer
    I made a quick demo here you can download.

    http://www.jamie-cross.net/tutorial-downloads/gamesalad/destroyme.zip

    Jamie
  • lanmindlanmind Posts: 29
    Accepted Answer
    Put another rule in actor A that says:

    If I'm touched AND destroyActorB is true spawn Actor B

Answers

  • jobeijobei Member Posts: 39
    I got it!!! it work now! Thanks jamie_c you just save my project lol. I was about to give up on it .
  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772
    You're welcome jobei, never give up! :)
  • jobeijobei Member Posts: 39
    You're welcome jobei, never give up! :)
    Hey jamie I got it to work but now im wondering how do I make actor B come back? I guess it like if I touch actor A one time it will make actor B disappear, then if I touch actor A again for a 2nd time it will make actor B pop back up on the screen.

Sign In or Register to comment.