Help Me (Enemy Logic)

davincijundavincijun Member Posts: 26
edited December 2011 in Working with GS (Mac)
image

How can I make moving enemy?

The enemy has 3 hit points and after got hit

the part of body get saperated from the body

I watched all youtube movies so I know basics



please upload link, example templete or comment

thank you very much!

Comments

  • ultimaultima Member, PRO Posts: 1,207
    if it was me, i'll constrain 3 invisible actors at each critical point and when bullets or whatever contact those points, an animation would play for each gore splash... but everyone has different way of doing it.
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    edited December 2011
    Again, please dont make multiple threads on the same thing. You were already told that, you could have just bumped your other thread.

    http://forums.gamesalad.com/discussion/36833/please-help-making-moving-zombie-or-enemy-with-physics-effect#Item_1

    Like ultima said youll have to constrain actors to do this exactly how you want, but you wont be able to do it with a ton of enemies at the same time and have it run good.
  • davincijundavincijun Member Posts: 26
    edited December 2011
    Ultima -> hmm... I also tried this way, but how can I make the Zombie in 'stupid zombie'?

    This way is showing 'dying animation (the thing in Metal Slug)

    The thing I wanna do is
    The damage with physics effect applied
    rather than showing dying animation


    the stronger bullet shot is, the farther head flies (Most zombies in current apps market)


    JOHN -> OK, how can I delete previous thread?
    there was no comment and the thread was disappeared
    sorry about it
  • ultimaultima Member, PRO Posts: 1,207
    haven't played stupid zombies, but you associate physical attribute for each type of bullet.. i'd have to be working on it to know exactly what numbers they are but off top of my head, just having the zombies body part contain each other and show animation. when they fly off.. and depending on the attribute of actor that hits it, the physics attribute should take care of how far they fly off.
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    You cant delete your threads and it didnt disappear, it just wasnt on the first page.

    For your question you can try turning off the constrains on the part thats hit on impact and have it collide with the bullet, that will have the pieces move farther depending on force, the problem might be when the constrains turn off though it might get buggy. And like i said above you wont be able to do this to a bunch of enemies at the same time without it killing performance.
  • davincijundavincijun Member Posts: 26
    hmmm.... ok
    so conclusion is

    the best way for enemy is just showing animation, right?
    (walking, dead, bleeding)
  • ultimaultima Member, PRO Posts: 1,207
    no that'll be the easiest way =) there is no best way.
  • davincijundavincijun Member Posts: 26
    hmm...do you know some sample templete for enemy behavior?

    actually the thing I wanna do is physics applied enemy.

    it's kinda challenging for me :b
  • scitunesscitunes Member, Sous Chef Posts: 4,047
    in your bad guy could you check the bullet y position in relation to the y position of the enemy?

    So in the enemy - if collides with bullet and
    ----if game.bulletY (you'd need to create this and constrain it to the bullet's Y) is greater than self.positionY + (self.height/4) change self.health to self.health - 10 (this would be your headshot)
    Otherwise if game.bulletY is greater than self.positionY change self.health to self.health -5 (body shot)
    -----------otherwise if game.bulletY is less than self.positionY change self.health to self.health -2 (leg shot)

    You could also put a different animation in each section of these rules.

    Hope this helps.
Sign In or Register to comment.