Page 3 of 4 FirstFirst 1234 LastLast
Results 21 to 30 of 34

Thread: Clear house script

  1. #21
    The AI reports that he can't get there so it may be possible to change the position to a simple move.

    You could use reveal command to alert the AI.

    Also I think it may be useful for the AI to do other things such as turn 360 randomly so it looks like it's searching.

  2. #22
    Ah, I didn't know you got a report. Reveal - of course, I forgot the name! (every time I've searched the BiKi today I've had error 504, Gateway timeout).

    Turning randomly might be a bit hazardous if there are enemies wandering around inside the building.

    Hmm - is there a command to make a unit move it's head (i.e., look) from side to side without changing direction? (I'm also interested in that as I want to make some members of an AI-led team "scan horizon").

  3. #23
    you can use setformdir, they will turn but if they see an enemy they will engage and stop turning, it all needs test but I'm so short of time right now.

    Isn't there a house clear script already done, I'm sure I've seen one but never tested it.

  4. #24
    Thanks, F2k Sel! - no worries, I'll check it out. And I want them to stop turning & engage the enemy so it's great that the engine will take over

    I think you're right, indeed there may be more than one. I'll see what I have bookmarked.

  5. #25
    @yoannio1995: have a look at JTD's Building search script

    @F2KSel: setFormdir doesn't look like the answer to my question, I want an AI group to carry on to its waypoint but with some of the squad dong the equivalent of the "Scan horizon" for human-led teams - that is, turning their heads from one side to the other to look for enemies. Damn, I think it's another of those engine commands/functions that are not public domain

  6. #26
    Thanks, I had a look at the scripts but it doesn't allow the player to order IA to clear a building. And I couldn't find anything about an occupied position... :/
    Is there any posibility to know wheter a position is occupied or not ?!

    ---------- Post added at 11:29 AM ---------- Previous post was at 10:15 AM ----------

    I've added that to the script:
    PHP Code:
    _listEnemy = [];
    _listEnemy = (position _buildnearEntities ["Man",25];
    {
    _unitL reveal [_x3.5];} forEach _listEnemy
    it helps to avoid that the IAs get killed too easily in the building. But is there any possibility to select only the units of one side (EAST) in the _listEnemy ?!

  7. #27
    Any ideas ?!

  8. #28
    Not tested but this might do the job, you could also create an array of just enemy or remove the enemy from the array

    PHP Code:
    {if (side _x == eastthen  {_unitL reveal [_x3.5]} foreach _listEnemy
    or

    PHP Code:
    if (side _x != eastthen  {_listEnemy _listEnemy - [_x];}} forEach _listEnemy;

    {
    _unitL reveal [_x3.5]} foreach _listEnemy
    from now on _listEnemy would only contain east units in the array.

  9. #29
    Yeah it seems to be working, thanks
    Any ideas how to know if a position is occupied or not ?
    I don't really know how we could do it but maybe combine the "if" and "forEach" commands to check if the position of each unit contained in the array _listEnemy is equal to one of the entries in the building positions array ?!

  10. #30
    If the enemy was placed in the building using a waypoint then you can use pos = waypointHousePosition [group red,1]; to return the position.

    I'm not sure how you could implement that, also for some reason my units don't seem to be skipping rooms today so I can't really test anything.

Page 3 of 4 FirstFirst 1234 LastLast

Similar Threads

  1. Garrison House Area Script
    By Jakerod in forum ARMA 2 & OA : MISSIONS - Editing & Scripting
    Replies: 61
    Last Post: Mar 20 2013, 04:14
  2. Shoot House Script :D
    By TheRev709 in forum ARMA 2 & OA : MISSIONS - Editing & Scripting
    Replies: 13
    Last Post: Feb 6 2013, 18:37
  3. Script VIP to go to a House ID
    By psvialli in forum ARMA 2 & OA : MISSIONS - Editing & Scripting
    Replies: 0
    Last Post: Feb 4 2012, 11:52
  4. script to make you clear dead from battlefield
    By smacker909 in forum ARMA 2 & OA : MISSIONS - Editing & Scripting
    Replies: 0
    Last Post: Jul 10 2011, 15:39
  5. Best way to "clear house" AI?
    By meade95 in forum ARMA 2 & OA - GENERAL
    Replies: 21
    Last Post: Aug 5 2010, 19:40

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •