Announcement

Collapse
No announcement yet.

Crowd System and Death Events

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Crowd System and Death Events

    Hi, I've been trying to learn how to build a simple game with Kismet and specifically, I've been trying to reconstruct the Jazz Jackrabbit iOS game from scratch. I've learnt that while it has its limitations, it is still a powerful tool, excellent for quick iterations.

    I have run into a problem with the crowd system and I'm wondering if anyone has any ideas to work around the problem.
    (I'm working with the June2011 version, and tried this with the October2011 version as well.)

    Counting Deaths:
    In the Jazz Jackrabbit example, each crowd agent that gets spawned is immediately attached to an anim notify event. That is to say, once the crowd agent dies, it runs the death animation named in its CrowdAgentArchetype properties. In the anim sequence of the death anim, an anim notify is fired off when the animation is played. This in turn tells the Kismet sequence to add one to the kill count.

    This works great, except when the crowd agent reaches its destination point( aka you ), it activates the Behavior stated in the destination point( attack animation ). During this time, when the crowd agent is killed, it gets bumped off immediately and no death animation is played as a result. The crowd agent is kicked out in the middle of its attack animation. Thus, no signal to Kismet, no score count. And did I mention no death animation?

    I know the system has its limitations and there's definitely a better way to do it thru script, but I'm just asking if anyone knows of a way to get a callback for the crowd agent's death event so I could work around this problem? Or maybe force the crowd agent to interrupt the attack animation and play its death animation when it dies? Any comments would be appreciated!

    #2
    I have this problem too~but no one answered...

    Comment


      #3
      I've been using crowd for a while now and agree it is a great way to set up simple AI but the more I'm trying to tweak stuff and getting down to the nitty gritty the more I'm coming across these issues. Anim notifies do seem quite inconsistent...sometimes they work and sometimes not, and indeed I have been recently trying to get death animations to work with no luck. Im no programmer and I often take a stab in the dark, but I wonder if it has something to do with the object list that gets created when enemies spawn as the events are all linked to a single spawn object from the mobile crowd spawner. In any case its great to see more discussion on mobile crowd and I hope that brings answers to quite a few problems with using mobile crowd as an alternative to using 'real' AI.

      Comment


        #4
        I am also having a problem with the Anim Notify and Play Agent Anim. The Agent will get to the destination and the Attach to event will light up and the count will go off but the Anim notify will never get fired on so the play agent Animation is never fired. Click image for larger version

Name:	Play Anim-j.jpg
Views:	1
Size:	59.8 KB
ID:	3249091

        Comment


          #5
          The crowd system - in my humble opinion - does not work in it's current state. The game would have to generate an instance of the "destination reached" for every agent spawned to receive all the event/anim notifcations. Instead it holds a single instance and the Agent Outlet is constantly overwritten by the MobileCrowdAgent that triggers "agent reached" last and all the event/anim notifications from every other MobileCrowdAgent are lost. This makes this entire system very unpredictable, broken and useless if you have more than one enemy.

          I had to port my mobile game from Kismet to UnrealScript, after I spent weeks trying to resolve these issues but ultimately failed. I released my UnrealScript source code here, feel free to use it:
          http://forums.epicgames.com/threads/...1#post30454964

          Comment


            #6
            Where in your source code can should I look to resolve this particular issue ? Everyone lays out their code differently and I'm a little new to Uscript

            Comment


              #7
              To get around the "move towards something and when you're close enough, do that" limitation I had to make my enemies fully fledged "bot" enemies (IMSShootingEnemy etc.), complete with their own AIController (IMSShootingEnemyController, essentially does the "move towards the player and then shoot" thing - but also evasion tactics etc.), Inventory and Pawn class. The are spawned in intervals of 5 seconds if the enemy limit is not met (IMSShootingEnemySpawner etc.).

              That is immensely more powerful and flexible than the MobileCrowdAgent approach, as you can customize their behaviour, looks, inventory etc. any way you want without running into class or Kismet limitations, however it was quite an undertaking learning UnrealScript and porting all the game mechanics from Kismet over.

              Comment


                #8
                Any more info / updates on this problem. This is our final major issue before release. Not being able to count kills is real problem.

                SO ! Simply using a Kismet Pawn Death Event instead of the anim notify to count kills works fine. There is still the problem where events like death FX and sound that are set up in the death anim don't work, but that's not the goal here.

                Comment

                Working...
                X