Page 8 of 12 FirstFirst ... 456789101112 LastLast
Results 71 to 80 of 117

  Click here to go to the first Developer post in this thread.  

Thread: Line Of Sight (Example Thread)

  1. #71
    Quote Originally Posted by Rydygier View Post
    Very, very fascinating is all this. Can't wait for 1.61 official.
    Me too!. I'm seriously impressed (yet again) by the way forum members collaborate to make the game even better - kudos to tpw, SaOK, CameronMcDonald et al., and BIS for this set of great new functions/commands.

    Roll on next weekend when I should have some time to start playing again

  2. #72
    Master Gunnery Sergeant -Coulum-'s Avatar
    Join Date
    Dec 8 2010
    Location
    Canada
    Posts
    1,067
    Great job tpw. I just tried some fighting in shapur and the ai is much improved. No more do they run by you when you are clearly in their sight. A few observations/suggestions

    The ai is very bad at looking around them and being aware of their surroundings. Your script works great, but if the ai doesn 't see you they will still run right by you. this is good but the problem is the ai is bad at checking there surroundings, so sometimes they would see you if they had human intellegence but don't. It happens less often but a couple times the ai continued right passed me because I was facing them from the side.
    For example...
    Spoiler:


    Basically I think either the ai looking behaviour must be improved, which probably isn't worth/ is to complex too be tinkering with... or their field of view could simply be increased to compensate for the fact thaye don't know how to scan areas of possible danger nearly as well as a human. I don't know if this is possible but its just my observation.

    The other problem with the ai, as mentioned by many others, is that they are glacially slow to get on target at times. I have actually found that they can turn fast, but for some reason tehy don't always do it . I would say that its basically a fifty-fifty chance that they will turn quick and not slow. Anyways, I think this is a problem deep down in the ai code so there probably isn't a easy fix, but I did find this command...
    object setDir heading
    And it instantly rotates a unit, so there is no slow turning. Maybe it could be used to set the direction of a unit towards the enemy as soon as that enemy comes into sight? This would make it so the unit instantly turns (I know not exactly realistic) to face the threat, meaning that all he really has to do is raise his weapon and fire. This is a quick test I did...
    Spoiler:

    vs.
    Spoiler:

    The problem is you can't set the direction towards another object but rather a direction on the map (0-360). So if it is even possible to setdir towards a unit it would require a fair bit of math...
    I don't know if any of that is possible or reasonable, I'm just spitting out ideas as thy come. This is definitley an improvement over the vanilla ai though. Great work!

  3. #73
    First Lieutenant Kremator's Avatar
    Join Date
    Jun 8 2007
    Location
    Cambridge, UK
    Posts
    5,002
    Quote Originally Posted by -Coulum- View Post
    The ai is very bad at looking around them and being aware of their surroundings.
    Unless they know you are there that is ! I certainly don't have a 6th sense and they shouldn't either. I DO agree that when they are waiting they should be scanning some arcs (instead of looking forward) but it shouldn't look odd or unnatural. The setdir is unnatural and will open the 'milsim can of wormsTM'.

    So the addon version works for EVERY unit or is it only onto group leaders ?

  4. #74
    Master Gunnery Sergeant -Coulum-'s Avatar
    Join Date
    Dec 8 2010
    Location
    Canada
    Posts
    1,067
    Quote Originally Posted by Kremator
    Unless they know you are there that is ! I certainly don't have a 6th sense and they shouldn't either. I DO agree that when they are waiting they should be scanning some arcs (instead of looking forward) but it shouldn't look odd or unnatural.
    Yes I know what you mean, they shouldn't have super vision. But as a human player, you are constantly scanning around to check for enemies. The ai doesn't do that. In the example I showed, A human player would have quickly checked the corner of the compound I was hiding in, seen me and turned to engage me. The ai however was not scanning like a human however so they didn't do this. This is in my opinion one of the biggest problems that allow a player to just sit in a house or compound and watch the pile of dead ai at the door way pile up. But I do understand what you mean. The ai shouldn't be able to magically have eyes in the back of their head. But every-once and a while they should quickly glance behind themselves. or something like that.

    Quote Originally Posted by Kremator
    The setdir is unnatural and will open the 'milsim can of wormsTM'.
    Ha! yeah I figured as much. Keep in mind that it wouldn't look quite so unnatural if the ai was already somewhat facing the player and only had to turn a small amount. But I can't imagine a lot of people would be open to it, although the slow aiming we have currently IMO is even more unnatural... But I am just kicking around ideas if you know what I mean.
    Last edited by -Coulum-; Jun 16 2012 at 17:54.

  5. #75
    That top video in which you await in ambush - the AI didn't seem like he was in Combat mode - did he have any Knowsabout value on you? If not, I've played PvP where humans were equally oblivious if I got into their compound (behind their front). If he did have an awareness that an enemy was nearby - would be great if AI could 'detect' that they were passing thru a doorway/entryway and automatically do a quick scan if they have suspicion (Knowsabout) that enemy is nearby. At least for Arma 3 I hope
    ~The bearly literate pugilist~

    Stop discrimination! Fight for bot rights for them to thrive indoors! http://feedback.arma3.com/view.php?id=8671 -Please revote this! Previous one was mistakenly directed to DevHeaven only!

    Add Distance to Target/Gear Menus: http://feedback.arma3.com/view.php?id=8666

    Spoiler:

  6. #76
    First Sergeant
    Join Date
    Oct 30 2009
    Location
    Brisbane, Australia
    Posts
    980
    Personally, I'm not 100% convinced that setdir is the way to go. The idea of a script like this is to sharpen the AI a bit, not turn them into killbots. And because the script already forces the units to turn towards the spotted enemy (_unit lookat _near), the actual aiming seems to be reasonably quick the majority of the time. And with the script the average unit gets a bead on the enemy a damn site quicker than without.

    Regarding unit awareness: the script at present gives the unit 120 degree field of view. Partly this is a limitation of the eyedirection / head model. And partly it's for realism. If you stick your arms straight out to the side at shoulder level and look dead ahead, you won't see your fingers wiggling. Neither should the AI. However you are right that their awareness is not the same as a human player, and I'm not sure how a script like this can compensate in a way that doesn't turn them into killbots again. A script that could force AI head movement would be nice for a start(don't know if it can be done though), because we could then script in things like rapid scanning, or force them to look at each buildingpos etc etc.

    Anyway, the script is here to stimulate discussion and I'm very grateful for all your ideas even if I don't (or can't) implement them.

    Kremator - the script and the addon both work for an OPFOR or BLUFOR on the map. I will shortly, thanks to Rydygier, make it work for independents too. I'll try forcing a unit with LOS to an enemy into combat mode too, to see if that sharpens up their aiming.

  7. #77
    First Lieutenant CameronMcDonald's Avatar
    Join Date
    Oct 10 2005
    Location
    Sydney, Australia.
    Posts
    5,553
    Personally, I'm not 100% convinced that setdir is the way to go. The idea of a script like this is to sharpen the AI a bit, not turn them into killbots. And because the script already forces the units to turn towards the spotted enemy (_unit lookat _near), the actual aiming seems to be reasonably quick the majority of the time. And with the script the average unit gets a bead on the enemy a damn site quicker than without.
    Yeah, I don't think setdir is the way to go. Anything that breaks native AI behaviour, or forces a player's units out of parameters that he or she has specified for them (i.e. stealth, stance, movement orders, etc) is a red flag in my book. Hence, I'm watching this thread carefully.

    Everyone tempted to post another inane/useless/whogivesatoss topic in the A3 forum - here.

  8. #78
    Master Gunnery Sergeant -Coulum-'s Avatar
    Join Date
    Dec 8 2010
    Location
    Canada
    Posts
    1,067
    Quote Originally Posted by CameronMcDonald
    Quote Originally Posted by tpw
    Personally, I'm not 100% convinced that setdir is the way to go. The idea of a script like this is to sharpen the AI a bit, not turn them into killbots. And because the script already forces the units to turn towards the spotted enemy (_unit lookat _near), the actual aiming seems to be reasonably quick the majority of the time. And with the script the average unit gets a bead on the enemy a damn site quicker than without.
    Yeah, I don't think setdir is the way to go. Anything that breaks native AI behaviour, or forces a player's units out of parameters that he or she has specified for them (i.e. stealth, stance, movement orders, etc) is a red flag in my book. Hence, I'm watching this thread carefully.
    Fair enough. Can't really think of any other possible addition. Maybe making a slight delay for an ai to crouch and engage upon sight based on skill? Probably not that neceassary but I guess in SP it might be benificial so that your squad of special forces are able to easily eliminate insurgents in CQB... I don't know, just brainstorming...

  9. #79
    First Lieutenant Kremator's Avatar
    Join Date
    Jun 8 2007
    Location
    Cambridge, UK
    Posts
    5,002
    Is it possible to have a full script-only version that can be called from the init.sqf please? Addon is great but would love to be able to add it directly into my missions now that this has REALLY come on.

    This would also make it 'tweakable' perhaps in an hpp or something in description.ext.

    What we do need is a way to analyse just HOW CPU intensive this script is. Presently we just have hearsay and conjecture but no real evidence. Anyone got any ideas of how we would do that ?

  10. #80
    First Sergeant
    Join Date
    Oct 30 2009
    Location
    Brisbane, Australia
    Posts
    980
    Hi Kremator. I've been posting the code as well as the addon, so you can easily save the code into your mission directory as e.g lineofsight.sqf, tweak it, and then call it with nul = [] execvm "lineofsight.sqf".

    This page has some hints at the bottom regarding testing code speed: http://community.bistudio.com/wiki/C...on_yourself.3F. I've got a few ideas myself which I will test out too.


    Latest addon: http://www.gamefront.com/files/21857852/TPW_LOS.zip

    Latest script: Spoiler:

Page 8 of 12 FirstFirst ... 456789101112 LastLast

Similar Threads

  1. Line Of Sight code
    By Wolffy.au in forum ARMA 2 & OA : MISSIONS - Editing & Scripting
    Replies: 0
    Last Post: Feb 8 2011, 02:13
  2. Script/function request: Line-of-sight check
    By [FRL]Myke in forum ARMA 2 & OA : MISSIONS - Editing & Scripting
    Replies: 12
    Last Post: Dec 4 2009, 02:48
  3. Is getting line of Sight possible in anyway?
    By Second in forum ARMA - MISSION EDITING & SCRIPTING
    Replies: 13
    Last Post: Jun 22 2007, 20:28
  4. Non-Line-of-Sight Launch System (NLOS-LS)
    By Thunnder Bunny in forum ADDONS & MODS: DISCUSSION
    Replies: 0
    Last Post: Feb 24 2007, 01:11
  5. RPG - line of sight...
    By VecteR in forum TROUBLESHOOTING
    Replies: 12
    Last Post: Nov 25 2001, 11:48

Posting Permissions

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