irswat Posted March 14, 2014 Share Posted March 14, 2014 (edited) thanks to JIP, Mr. Patterson, Alien, and luthienanarion for helping me on the script! You will get credit as due when the mod is released!Here is the script that worked. The Snipers fire at play from as far away as I can see them :-) quite a challenge. Now its time to figure out how to make prone snipers :-D scn OldSniperModScriptWithTimer float hfPlayer int AlertFlag ref rSniper float WeapMaxRange float timer begin GameMode set timer to 0 if player.IsInInterior == 0 if(timer < 1) set timer to timer + getsecondspassed return else set AlertFlag to 0 set WeapMaxRange to GetMaxRange WeapNVGhillieSniperRifle set rSniper to GetSelf set hfPlayer to player.GetDistance rSniper if GetDead MessageEX "Sniper %i is dead" rSniper set AlertFlag to 0 return elseif player.GetDead set AlertFlag to 0 return elseif ((GetDead == 0) && (player.GetDead == 0)) if hfPlayer <= WeapMaxRange MessageEX "Sniper is %g units away" hfPlayer set AlertFlag to 1 elseif hfPlayer > WeapMaxRange MessageEX "Sniper is out of range by %g units" (hfPlayer-WeapMaxRange) set AlertFlag to 0 endif endif if AlertFlag rSniper.UseWeapon WeapNVGhillieSniperRifle rSniper player -1 0 0 1 0 elseif GetDetected player StartCombat player endif if player.GetDead set AlertFlag to 0 return endif endif endif return end Edited March 14, 2014 by irswat Link to comment Share on other sites More sharing options...
alienzerox Posted March 14, 2014 Share Posted March 14, 2014 nice sent me a copy ... not sure if you can do prone since it isn't one of the defaults might have to get it from a pose or something Link to comment Share on other sites More sharing options...
devinpatterson Posted March 14, 2014 Share Posted March 14, 2014 thanks to JIP, Mr. Patterson, Alien, and luthienanarion for helping me on the script! You will get credit as due when the mod is released!Great news Irswat :thumbsup: Link to comment Share on other sites More sharing options...
irswat Posted March 14, 2014 Author Share Posted March 14, 2014 (edited) it's not quite as good as the news of salvation through the death and resurrection of Jesus Christ: that God loves us so much that He sent His Son who knew no sin to take the curse of sin upon Himself so we could be set free from sin and death! If we turn away from sin and follow Him we can be forgiven and share in the hope of being raised from the dead to eternal life!I had to :-) You set me upAs far as the infinitely more trivial matter of the mod, I work on it with much of my free time. I'm putting the finishing touches on the script now messing around with creating detection events. It's the strangest thing. These snipers don't react right away from 11000 units, but if I get there attention and retreat they keep sniping at me from as far as I can see them through the sniper scope! I'm hoping I can use this create detection event function to make them initially react from as far away as 11000 units.Any idea how I would approach making prone snipers? Are there commands I can issue NPC's for different stances? E.g. sometimes they take a knee and start shooting. How can I make them do that? Edited March 14, 2014 by irswat Link to comment Share on other sites More sharing options...
irswat Posted March 14, 2014 Author Share Posted March 14, 2014 nice sent me a copy ... not sure if you can do prone since it isn't one of the defaults might have to get it from a pose or somethingthere has to be a way. If NPC's can kneel and fire, or crouch and fire, which I'm pretty sure I've seen, it's got to be possible to get them to prone. I'm looking into it Link to comment Share on other sites More sharing options...
devinpatterson Posted March 14, 2014 Share Posted March 14, 2014 it's not quite as good as the news of salvation through the death and resurrection of Jesus Christ: snipers for Christ? Can't say I have any supernatural beliefs (that I'm aware of), but to each their own. Are there commands I can issue NPC's for different stances? E.g. sometimes they take a knee and start shooting. How can I make them do that? Yes there are, playGroup will allow you to, but alas we have no prone animations and until someone does the KF for them you wonn't be able to implement them :sad: Link to comment Share on other sites More sharing options...
irswat Posted March 14, 2014 Author Share Posted March 14, 2014 ill do the animations myself if I have to, or find someone who will. thanks devin Link to comment Share on other sites More sharing options...
devinpatterson Posted March 14, 2014 Share Posted March 14, 2014 If you do you'll make some very happy peeps. Seems like the probe animations have been asked for, for quite a while. Even if you just do one for the rifle animation Link to comment Share on other sites More sharing options...
betto212 Posted March 14, 2014 Share Posted March 14, 2014 what happen if you try to sneak behind the sniper with this script ? Link to comment Share on other sites More sharing options...
irswat Posted March 15, 2014 Author Share Posted March 15, 2014 betto, it depends how how away you are, if there is LOS, etc. Link to comment Share on other sites More sharing options...
Recommended Posts