smaller target area ... collision question

design219design219 Member Posts: 2,273
edited November -1 in Working with GS (Mac)
This answer may exist already somewhere, but I'm not finding it.

In something like the "basic shooter", if I wanted to have to hit a smaller area on the enemy actor instead of the entire area of that actor, how would I do that?

Comments

  • design219design219 Member Posts: 2,273
    Sounds good, but how do you connect the two actors if the visible actor is in motion? and how do you make the collision with the smaller invisible actor affect the large visible actor?

    Thanks for the help by the way.
  • PPenguinPPenguin Member, PRO Posts: 110
    http://gamesalad.com/wiki/how_tos:gsc_follow_another_actor

    Make 2 actors.. One of them has nothing but the artwork, and it follows the other actor around.

    Make the other actor invisible, and whatever size you want the collision box to be, and give it collision rules, controls, spawning rules, etc.

    Good luck!
  • design219design219 Member Posts: 2,273
    Thanks people for all the help.

    tshirtbooth... I've noticed you go above and beyond to help people in this forum. Don't think it isn't appreciated! You da man!

    I don't want you to take away your game creating time... I think you guys have pointed me in the right direction to work it out.
  • design219design219 Member Posts: 2,273
    Okay, found the tutorial on how to make one actor follow another:
    http://gamesalad.com/wiki/how_tos:gsc_follow_another_actor
    And I have my invisible actor and visible actor moving together. Now I'm stuck on how to make the invisible actor communicate with the visible one... I want to visible to animate briefly and destroy itself after the invisible actor is hit.

    I'm sure this is obvious, but again, I'm not seeing how.
  • CodeMonkeyCodeMonkey Head Chef, Member, PRO Posts: 1,803
    Use game attributes. Say when the invisible actor gets hit, it does a Change Attribute on game.IAmHit to make it 'true'.(How to make an attribute in the basic how to's)

    The visible sees the game.IAmHit is true and does its blinking. (There's a how to for that)
  • design219design219 Member Posts: 2,273
    Thanks CodeMonkey... I actually just figured that out and got it working!

    Now I can't get the fade out to work. :-( I've followed the tutorial exactly and it's not working. Grrrrr.

    Still, having a lot of fun working with Gamesalad!
  • paranoid_androidparanoid_android Member Posts: 22
    That only works with 1:1, what if you are spawning the actor multiple times. (I am afraid of the answer)
  • CatOnAKeyboardCatOnAKeyboard Member Posts: 39
    I personally don't think what you want to do is actually possible if you are using spawned actors for both the projectile and the actor being hit... but hopefully someone on here can prove me wrong!
  • paranoid_androidparanoid_android Member Posts: 22
    I wonder if you can create a active area based on actor xy and touch inside actor xy? Difficult if the actor is animated, or has odd shape, or is being scaled. But here I go.With all said challenges.

    @paranoid_android
Sign In or Register to comment.