No announcement yet.

crowd agent help! kismet screen attached

  • Filter
  • Time
  • Show
Clear All
new posts

    crowd agent help! kismet screen attached

    so Im having crowd agents go from on destination point to another. works just fine but then when i try and get it to shoot a projectile it wont move to the next destination point.
    here's my kismet. any ideas? i'm using the same set up as the jazz game. except my agents go to a destination point instead of the player.Click image for larger version

Name:	kismet.jpg
Views:	1
Size:	30.8 KB
ID:	3253405

    Tutorial - Spawning Mobile Crowd and AnimNotify when it reaches the Destination

    Hi chadling

    First of all you need to make sure you have some settings set up right. I also had this problem in the past and i moved passed it. So let's by:

    - You follow the naming Below correctly and step by step either it won't work. UDK is very sensible about everything so please follow carefully.
    - First of all you need to make sure that the MobileCrowdSpawner has a "GameCrowdDestination" set as a spawn point.
    - In the "GameCrowdDestination" that you placed on the map, set the the point you want to reach in "Next Destinations" a (and be careful here) "DynamicGameCrowdDestination". I hade the first time a GameCrowdDestination and it didn't worked.
    - Next in the Content Browser, in you package , create a Game Crowd Behavior. If you don't know how to do that, get one from the Jazz example and modify it. It works just fine.
    - In AnimTree add a new animation node. i have used bIsPanicked to control my animations. You can add as many nodes as you want. Set the name of the animation you would like to play. In the attached pictures, mine is named: ATTACK
    - Open Game Crowd Behavior and set the name of the animation you would like to play. In my case it, as above: ATTACK.
    -I'm just copy - pasting the values here, but you can figure out what they are in the Game Crowd Behavior and set them the same under Game Agent Crowd Behavior

    Object.GameCrowdAgentBehavior.DurationOfBehavior 0.000000
    Object.GameCrowdAgentBehavior.bIdleBehavior True
    Object.GameCrowdAgentBehavior.MaxPlayerDistance 10000.000000
    Object.GameCrowdAgentBehavior.bFaceActionTargetFirst False
    Object.GameCrowdAgentBehavior.bIsViralBehavior False
    Object.GameCrowdAgentBehavior.ViralBehaviorEvent CBE_None
    Object.GameCrowdAgentBehavior.ViralRadius 512.000000
    Object.GameCrowdAgentBehavior.bPassOnIsViralBehaviorFlag True
    Object.GameCrowdAgentBehavior.DurationBeforeBecomesViral 0.000000
    Object.GameCrowdAgentBehavior.DurationOfViralBehaviorPropagation 0.000000
    -Open up the Crowd Agent Archetype and scroll down to Behaviors section.
    - Now, i'm not sure which of the 2 is the correct to be set so i have set them both:
    - Set the Alert and Panic Behaviors with the Game Crowd Behavior Archetype you created above.

    - Open the DynamicGameCrowdDestination and set the Reached Behavior under Game CrowdDestination with the Game Crowd Behavior Archetype you created above.
    - Go to Reactions section -> Supported Archetypes and set all 3: "Game Crowd Behavior Archetype you created above" , "Crowd Agent Archetype" and the "Crowd Agent List Archetype" that contains the "Crowd Agent Archetype"

    - In Kismet once the MobileCrowdSpawner is done spawning (node "OUT") ------ Attach an event and set the event to be attacked as a Animation Notification. From here you can trace the location towards you want to shoot and spawn projectiles in that direction. From here you are on your own with this because I didn't experimented with this ye.

    - Open the AnimSet go to AnimSequence and set a new AnimNotify_Kismet Sequence.
    - Name it as in your Game Crowd Behavior Archetype you created above. In my case it's ATTACK

    - Save the Package and the map.
    - Once Saved Rebuild the AI Paths.

    you will find the pictures attacked here:

    Click image for larger version

Name:	Anim_notify.jpg
Views:	1
Size:	71.3 KB
ID:	3249852
    Click image for larger version

Name:	animTree_setup_animation.jpg
Views:	1
Size:	53.3 KB
ID:	3249853
    Click image for larger version

Name:	DynamicGameCrowdDestination.jpg
Views:	1
Size:	91.5 KB
ID:	3249854
    Click image for larger version

Name:	kismet_crowd_agents.jpg
Views:	1
Size:	82.7 KB
ID:	3249855
    Click image for larger version

Name:	reached_kismet.jpg
Views:	2
Size:	47.7 KB
ID:	3249856

    I hope i didn't forget anything because there are a lot of settings to be done. If so, just let me know and i will check everything again.

    Regards and good luck


      ok i got it to work but it only shoots once when it first spawns. any idea how i might make it loop so it keeps fireing?


        make a condition on the spawn projectile factory, and if that variable is false then have it re-trigger the spawn projectile.


          thanks for all your help really appreciate it! one last thing so it fires constantly now but still only the newest spawn agent fires. how do i make it so all of them keep firing?


            not entirely sure but, you can use the get location and rotation node and use it to get the location of the crowd agents, output the result into a variable and set the position of the projectile factory to that. this is a little bit clever because you need to figure out a way to detect which pawn is performing the fire animation. hmmm i guess it will work , but not entirely sure.