Creating attacking characters

UberSpecUberSpec Member Posts: 3
edited November -1 in Working with GS (Mac)
I am vigorously looking on information on how to make a character "ACTOR" that attacks you when you are a certain amount of space between you and them also I only want them to be able to hurt you when they attack for example I want the character to be able to Kick, Punch, and do a super move it should randomly be able to choose the attack it uses, and I want the character to randomly spawn around the level so I could set how many of the characters could spawn per level but it would be random, I also want to be able to give each character different strengths and supers within a level, I am trying to go for something like "Streets of Rage" if anyone remembers that game heh can anyone point me on the right direction I dont know if this is even possible in GS I have a friend that will make the sprites for me but I dont want to waste his time if its not possible

Comments

  • old_kipperold_kipper Member Posts: 1,420
    Not sure if you have seen this site-

    http://aigamedev.com

    There is a lot of guidance on basic stuff as well as more advanced things.

    You can check the distance between objects and therefore trigger behaviours based on proximity and with additional random selection for different attacks if you wish to. I think your major problem is not the ia but arranging animations that work together within collision boundaries. It is down to how advanced the fighting has to look and how much work you put into it.

    good luck and I hope this helps

    kipper
  • UberSpecUberSpec Member Posts: 3
    Well I want to aim for something like Stick-Fu if anyone here has played that before just basic stick figure
  • fzeedfzeed Member Posts: 247
    I bought a template from Utopian Games -The platformer- one. He has an enemy that only comes after you if you are close -using the magnitude function. Just from that alone, i created several instances where the enemy only "sees" you when your close. Then chases you. In one of my shooters, when your close the enemy ship changes course and chases you, when he gets even closer, then he starts firing. You gotta check out the magnitude and vectortoangle functions. When the enemy gets close, then randomize what attack he uses. But like kipper says, your going to have some difficulty with the square/circle collision boundaries.
  • fzeedfzeed Member Posts: 247
    I bought a template from Utopian Games -The platformer- one. He has an enemy that only comes after you if you are close -using the magnitude function. Just from that alone, i created several instances where the enemy only "sees" you when your close. Then chases you. In one of my shooters, when your close the enemy ship changes course and chases you, when he gets even closer, then he starts firing. You gotta check out the magnitude and vectortoangle functions. When the enemy gets close, then randomize what attack he uses. But like kipper says, your going to have some difficulty with the square/circle collision boundaries.
  • ClaymotionGamesClaymotionGames Member Posts: 5
    Yeah the whole distance thing is a magnitude calculation. Also if you need punching and kicking characters you will need to constrain boxes to the hand or foot of the character that is attacking when the arm or leg is fully extended. This box should do all damage calculation and either destroy or place itself off of the screen at the end of the attack, with the latter being the more processor friendly option.
Sign In or Register to comment.