Civilians, urban.

  • Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.

Mogmoogle

New Member
Oct 5, 2005
2
0
0
hey im trying to program a way to add a civilian populace to the streets in my urban map, i just want them to follow a simple path alone sidewalks etc. and i need some help scripting this. im sure someone knows where to start.
 

Hazard.ep

New Member
Oct 7, 2003
166
0
0
Well, I haven't yet worked with the runtime, but I guess there's no AI implemented at all. So basically that's what your up to. Only following pathes should however be pretty simple.
For the AI:
*you'll need some primary loop, that checks every ... what the pawn is going to do (like a tick function, but not necessarily that often). At the end of this loop, when all actions are planned you should execute them.
Example:
loop
-pawn shall go somewhere
->check if pawn has a destination (no)
->determine where pawn should go (may be location of next PathNode)
->start moving
loop
-pawn shall go somewhere
->check if pawn has a destination (yes)
->if pawn is not yet within a specific range (say about 32UU)(no)
->start moving
loop
-pawn shall go somewhere
->check if pawn has a destination (yes)
->if pawn is not yet within a specific range (say about 32UU)(it is)
->stop moving
->clear destination
loop
=>do it all over again

So I hope that helps you to figure out the basics of the AI you need.