AgentJonathan 0 Posted February 26, 2007 (1.) I was wondering if it is possible to make civillians walk around without waypoint. (2.) I wanted to know if you can make them "intelligent" enough to not walk into the streets, or into a certain area. If this (No.(2.)) doesn't have a script or soloution, then drop it, but i would like to know how to make them walk around without waypoints... AgEnTjOnAtHaN Share this post Link to post Share on other sites
fasad 1 Posted February 26, 2007 It should be easy - make a script that moves them to a random point within a defined area that does not cover road (or is a minimum distance away from any road object). When they arrive, repeat. Use trig to define circular zones, or (random n + xxxx) for rectangular zones. http://community.bistudio.com/wiki/random http://community.bistudio.com/wiki/move http://community.bistudio.com/wiki/nearestObject_type http://community.bistudio.com/wiki/unitReady If that makes no sense to you, maybe waypoints are the easier option. Share this post Link to post Share on other sites
Metal Heart 0 Posted February 27, 2007 Not quite that easy neccessarily if you have anything more complex than a single area for a group. For example, it's not enough to see if the random waypoint is not in a disallowed zone, you must also see that the path there doesn't go through one but you have no way of knowing what path the AI will take around obstacles. With complex areas, like you might create for larger towns, there's a lot more problems such as performance and areas with very little chance of getting visited because of the surrounding disallowed areas etc. Share this post Link to post Share on other sites
DnA 5154 Posted February 27, 2007 While the "DISMISSED" waypoint is a waypoint, you only need to place 1 and it can be at the civilian's feet. It will make him walk around and sit down in certain places. Share this post Link to post Share on other sites
fasad 1 Posted February 27, 2007 Hmm, a very useful new waypoint type, thanks! Share this post Link to post Share on other sites
AgentJonathan 0 Posted March 5, 2007 DnA: You probably play ArmA which i dont have... There isnt a "DISMISSED" waypoint. Share this post Link to post Share on other sites
DnA 5154 Posted March 5, 2007 The waypoint should be there for any version, but maybe you did not expect it being the last waypoint in the list? It should be right under "GET IN NEAREST". Share this post Link to post Share on other sites
sanctuary 19 Posted March 5, 2007 The waypoint should be there for any version, but maybe you did not expect it being the last waypoint in the list? It should be right under "GET IN NEAREST". It's been a long time you have not used OFP mission editor no "get in nearest" or "dismissed" waypoint here. Share this post Link to post Share on other sites
Pillum 0 Posted March 5, 2007 My trick without scripting to make them move.. I put the waypoint "seek and destroy" with radius, behaviour safe or careless. It was working better on older version, now they stay at same place, but when they see army units they go...(run away) can use too, with the previous waypoint, setunitpos up and allowfleeing always... Hope will work for you. Pillum Share this post Link to post Share on other sites
AgentJonathan 0 Posted March 7, 2007 I've 1.96 GOTY, and for some reson, i dont have get in nearest, or dismissed. Maybe if someone teaches me how to script it, that'd be most appreciated... Share this post Link to post Share on other sites
sanctuary 19 Posted March 7, 2007 (1.) I was wondering if it is possible to make civillians walk around without waypoint. Quick and simple script for this one In the init line of each civilian (do not group them) write : <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">[this] exec "civimove.sqs" And here is the script you may name as civimove.sqs <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_civi = _this select 0 _civi setspeedmode "LIMITED" #loopmove ?!(alive _civi) : goto "endmove" _xrd = (random 80)-40 _yrd = (random 80)-40 _civi move [(getpos _civi select 0)+_xrd, (getpos _civi select 1)+_yrd] ~5+(random 10) goto "loopmove" #endmove exit if you want to group the civilians, write the same code in each of their init line, but for the script change : <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_civi move [(getpos _civi select 0)+_xrd, (getpos _civi select 1)+_yrd] into <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_civi domove [(getpos _civi select 0)+_xrd, (getpos _civi select 1)+_yrd] But they will run, not walk in such case. Share this post Link to post Share on other sites
-)rStrangelove 0 Posted March 7, 2007 To actually get a realistic citylife script we'd need to have sidewalks that are in fact buildings, with buildingpositions at each turning corner and inbetween. That would be awesome. Share this post Link to post Share on other sites
AgentJonathan 0 Posted March 8, 2007 Thanx Sanc! Now they have boundries. Meahahah! Share this post Link to post Share on other sites
DnA 5154 Posted March 10, 2007 I'm sorry everyone, I was indeed talking about ArmA. OFP does not have this waypoint Share this post Link to post Share on other sites
dmarkwick 261 Posted March 23, 2007 Use the Urban Patrol Script on individual civilians to get realistic wandering activity. If you group them though they walk in single file together, as if on patrol but if not in groups you get good dispersion of movement within an area. Share this post Link to post Share on other sites