Jump to content
Tankbuster

set a unit to look out of window function?

Recommended Posts

What exactly do you need?

I don't have the full AI routine yet (but I don't think it's too hard to make.), however I can send you the script to find a good windowpos with some (rated) view, with input of a house object and returning [exact position to stand, lookout direction, quality of lookout (free los meters up to 350m. First 30m can be blocked by vegetation, after that buildings only)]

Let me know if that has any use for you, or wait until I have time to finish Black Rain, it'll include this pretty well (according to the plans of course)

Edit: lol., I rolled up and I already posted this. Nevermind then...

Share this post


Link to post
Share on other sites
On 1/27/2014 at 10:37 AM, das attorney said:

Maybe - I don't have A2 installed anymore , but will see if possible.

Yes - won't be for a while but definitely something is on it's way.

 

Still waiting.....:hehe:

 

Hehe, seriously man this is a cool script i forgot about.   Id love to get the AI to check windows of a house they know an enemy is in - this is one aspect, the feeling of being hunted by AI that is sorely needed in this game imo. The worst is when they know your in a house (well sorta), your the only enemy  and known threat, yet they lay outside with rifles aimed perpendicular or worse, opposite direction of house your in. Bad.

 

Anyways, I can get the AI to DoWatch the window spheres but they wont target or DoMove to them as im guessing they are positions not objects? Any ideas on how to spawn invisible objects in those spots to get AI to move to them?

 

 

@Zapat: Sorry never saw your post :P

Share this post


Link to post
Share on other sites
19 hours ago, froggyluv said:

Anyways, I can get the AI to DoWatch the window spheres but they wont target or DoMove to them as im guessing they are positions not objects? Any ideas on how to spawn invisible objects in those spots to get AI to move to them?

 

Yo, necro-frog, if these scripts are giving you the window positions (I'm assuming these are inside building) and direction facing out, you could calculate the position outside the window for a unit to move to and peer in (commandMove should work if its a navigable place for the AI).   Obviously you only want that for ground floor windows.  For targeting windows, you can place invisible targets at window positions and reveal those to hunter AI outside.  That target could be moved from window to window periodically so AI scanning different windows...

 

I like your goals, hunter AI peering in windows would be awesome for immersion.  I've also wanted AI to hose/suppress windows when they have a known enemy within a house.   I'd have them hose multiple windows, not just one where player is near, to add to suppression fear factor.

  • Thanks 1

Share this post


Link to post
Share on other sites

 

 That was quite the delayed reaction necro -ha! Yeah thats exactly what im intending to do, its actually really cool just making AI look up and gaze at 2nd floor windows but yeah invisible targets are where its at. Sadly I dont know where Invisible targets are (full retard flame suit on -literally)

Share this post


Link to post
Share on other sites
7 minutes ago, froggyluv said:

That was quite the delayed reaction necro -ha! Yeah thats exactly what im intending to do, its actually really cool just making AI look up and gaze at 2nd floor windows but yeah invisible targets are where its at. Sadly I dont know where Invisible targets are (full retard flame suit on -literally)

Here's an example.  You need to crew the invisible target for AI to fire on it (a trick I learned from my oddball attorney @das attorney).

_invisibleTarget = "B_TargetSoldier" createVehicle [10,10000,0]; 
_invisibleTarget allowdamage false; 
createVehicleCrew _invisibleTarget; 
_invisibleTarget setpos getpos FroggyLuvsWindowPos; 

_someDude reveal _invisibleTarget;
_someDude doTarget _invisibleTarget;

Here's the target object names for Blufor, Opfor, Independent.  For some lame reason, these objects aren't in the editor.

  • B_TargetSoldier
  • O_TargetSoldier
  • I_TargetSoldier

Rock on brother.

  • Thanks 1
  • Haha 1

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×