meade95 0 Posted September 3, 2010 I use a House Patrol Script that works great - Just wondering, is there a way to keep OPFOR from not going on the roofs? This becomes the easiest way to take them out? Also, if you just place them in a house, without a script? Will they move at all, in terms of the way they are facing....It seems more or less they will simply stand in one direction until you are right up on them.... Is there a way for them to patrol only the down stairs floors? ---------- Post added at 11:33 AM ---------- Previous post was at 11:32 AM ---------- I use....Random House Patrol Script v1.1 by Tophe of Östgöta Ops [OOPS] Share this post Link to post Share on other sites
Beerkan 66 Posted September 3, 2010 (edited) I use this in the init field of a bad guy. Not quite a house patrol script, but this keeps them on the ground. this setUnitPos "MIDDLE";this setBehaviour "AWARE";this setCombatMode "RED";this disableAI "MOVE";this setPosATL [(getPosATL this) select 0, (getPosATL this) select 1, [color="Red"]0[/color]]; The 0 defines he will be 0 metres above ground level, ie on the ground. If you want him on the second floor, change this value to approx metres above ground level. You will need to experiment as each building is different. This can be useful if you want to accurately place a unit say beind a crate or on a balcony, or the top of the stairs or something. Note also I have used disableAI "MOVE" so he will not move from this position. Another way is to place a unit in a building in one of the pre-defined positons each building has. All buildings (game bug if they don't) have a number of places a unit can be placed, depending on the size of that building. For example each window and door usually corresponds to a position a unit can be placed at. (You can override this and place them EXACTLY where you want using the first example). In this following example the buildingPos value is 3, but can be from 1 - 12 or more depending on building size. You can experiment with different buildings to find out the available buildingPos #. this setUnitPos "MIDDLE";this setBehaviour "AWARE";this setCombatMode "RED";this setPos ((nearestBuilding this) buildingPos 3); This way I can have a few bad guys camping at the windows of a building. All I need to change in their init script it the buildingPos # If you want to add a bit of variation, you can also use the probability of presence so you're not quite sure how many bad guys might be in the building. Probability of presence is a variable on the unit in the editor, below the init field. Edited September 6, 2010 by Beerkan Share this post Link to post Share on other sites
meade95 0 Posted September 11, 2010 (edited) Thank you! Let me ask, if you use the "disable move"...so he doesn't move away from a position within a house.... will he at least turn and pivot in the direction of fire?? Edited September 11, 2010 by meade95 Share this post Link to post Share on other sites
meade95 0 Posted September 12, 2010 I use this in the init field of a bad guy. Not quite a house patrol script, but this keeps them on the ground. this setUnitPos "MIDDLE";this setBehaviour "AWARE";this setCombatMode "RED";this disableAI "MOVE";this setPosATL [(getPosATL this) select 0, (getPosATL this) select 1, [color="Red"]0[/color]]; The 0 defines he will be 0 metres above ground level, ie on the ground. If you want him on the second floor, change this value to approx metres above ground level. You will need to experiment as each building is different. This can be useful if you want to accurately place a unit say beind a crate or on a balcony, or the top of the stairs or something. Note also I have used disableAI "MOVE" so he will not move from this position. Another way is to place a unit in a building in one of the pre-defined positons each building has. All buildings (game bug if they don't) have a number of places a unit can be placed, depending on the size of that building. For example each window and door usually corresponds to a position a unit can be placed at. (You can override this and place them EXACTLY where you want using the first example). In this following example the buildingPos value is 3, but can be from 1 - 12 or more depending on building size. You can experiment with different buildings to find out the available buildingPos #. this setUnitPos "MIDDLE";this setBehaviour "AWARE";this setCombatMode "RED";this setPos ((nearestBuilding this) buildingPos 3); This way I can have a few bad guys camping at the windows of a building. All I need to change in their init script it the buildingPos # If you want to add a bit of variation, you can also use the probability of presence so you're not quite sure how many bad guys might be in the building. Probability of presence is a variable on the unit in the editor, below the init field. In using both the above scripts. The second works very well, though the AI will leave a building and hunt you if you are spotted....which is good and bad... The first script...The problem is...the AI will not even shoot at you if you walk up beside them (I have found)...Unless you pass directly in front of their firing arc they will not shoot at you.... Seeing how I can tweak each of them....The second one seems to work best right now.. Thanks again.. Share this post Link to post Share on other sites