PDA

View Full Version : Problem with NPC triggering alternative paths


kaaino
11-29-2007, 03:57 AM
Hi all,

I am trying to create a scenario where 10 or more human NPCs move in an urban scene as if they were common pedestrians. The paths should have some variability so that the scene is more realistic.

I have tried to set up few closed sequences of path_tracks and my npc_citizens successfully move around and repeat the tracks at the infinite. To add variability I have cross-linked some path_tracks altpath and triggering ToggleAlternatePath when an NPC triggers the OnPass so that the next NPC passing by will follow the altpath. This is done as follows:

track_path->Output->OnPass
Target->!self->ToggleAlternatePath

Although I think the OnPass output is triggered by NPCs nothing happens to the next NPC and they go on following the same path.

Any help is appreciated, and I am also open to alternative solutions as NPCs following track_paths are not realistic (in the sense that there is not enough variability) for what I want.

Thanks

Kaaino

wisemx
11-29-2007, 06:39 AM
Add a few info_node_link entities and trigger them:
http://www.sdknuts.net/akg/tutorials/wiseNodeLink.asp

Still won't be perfect but it will add some variables.

cinnamon whirl
11-29-2007, 06:44 AM
Check the "OnPass" is working with something obvious - like a big func_rotating, or whatever. Assuming that its OK, do you need to use the EnableAlternatePass variable before ToggleAlternatePath?

For added Variation, you could trigger scripted_sequences using on pass as well:
track_path->Output->OnPass Target->!activator Action->Seq_01. You could have an NPC stop, or look at something, or whatever. They do not have to walk to the script, and I think they will continue along the track as they perform the animation.

kaaino
11-30-2007, 02:51 AM
Yes I am sure that the onPass is triggered. I have tried any combination of toggle/enable/disable path but nothing applies to my npc :mad: . It is possible that these commands do not apply to all the npc typologies. I will now try the other suggestion (info_node_link) but then I am not sure how to generate predefined path sequences.

Thanks