What would be the best way...

Post » Fri May 13, 2011 11:32 am

I'm working on an immersion mod that aims at having NPCs have varying reactions (depending on their stats and loadout) to the player having their gun out and aimed at them, as I always found it ridiculous that taking out a rifle, going up to someone, and aiming down the sights at their face wouldn't really get any reaction from them. What I need help with are a couple of things, as I have it right now, the method I'm using to check if the player is aiming at an NPC is kind of un-reliable, and I can't really tell if it's working all that well, so any ideas on how to re-do that or improve it would be good. Also, making low confidence NPCs flee isn't too hard, but what I'd like to do, is have three reactions for higher confidence NPCs, ones with no guns/weapons would flee only temporarily, those with guns, if they were friendly towards the player (high responsibility) would take out their gun and aim it at the player, and either shoot at the player if the player does't listen to their warning, or holster their weapon of the player holsters theirs. If the armed NPC isn't friendly (low responsibility) they would take out their gun and shoot first. That reaction and the flee one are fairly simple, as all they require really are the flee and startcombat commands, getting an NPC to take out their weapon and aim at the NPC but not shoot, is less easy. I was thinking of using the function (was it fireweapon?) that can specify the target and number of shots fired, and use zero shots fired. In the script for the NPC, I could have the holster weapon thing be called before the fireweapon function, that way unless the conditions for the fireweapon stop being met, the weapon would stay out, and once they stop being met, it would be holstered immediately. How's that all sound?

PS: Sorry for not being able to post my scripts, I'm away from my modding rig until the weekend, but am kind of modding-crazy and wan't to continue getting work done, especially since getting a situation like this solved over the forums can take a day or two. Thanks!
User avatar
Zach Hunter
 
Posts: 3444
Joined: Wed Aug 08, 2007 3:26 pm

Post » Sat May 14, 2011 2:22 am

First, if you want some suggestions on how to improve the way targeting data is being calculated, you would need to describe what you are doing. Are you using FOSE's GetCrosshairRef?
Second, Responsibility is an unused stat, I don't see how this will affect whether an NPC will shoot or hold their weapon out.
Third, you mean 'UseWeapon' - and that sounds like it might work with the number of shots fired set to 0, but I don't know. Another AI package might take over and make the NPC do something else.
User avatar
Rex Help
 
Posts: 3380
Joined: Mon Jun 18, 2007 6:52 pm


Return to Fallout 3