OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Sexy_Beast on 05 Sep 2004, 14:51:01
-
im tired of getting head shot by Ai's 300m distance i there was a script in ofpec that would make Ai's miss but i cant remember the name of it ???
-
I've prepared a small script to use in a mission I'm making so I thing it's time to BETA test it! ;)
-
The higher their skill, the better they aim, so lower it, that'll give you a break.
Also, you can set a unit's damage to a negative value, that'll make their aim alittle bit wobbley for some reason.
Try 'someEnemy SetDammage -1'.
Last, you could use HD (High Dispersion) weapons/mags.
All JAM weapons/mags come in both a standard and HD version.
-
i cant open ur file i need some thing named chopse.exe
-
Use notepad.
-
@Sexy_Beast
Did the scipt work as you expected?
-
@ Ace Productions:
I have not tried your script as I am unsure as how to implement it. Is it used in conjuction with the "fired" eventhandler? IIRC the fired EH does provide the five five parameters used in your script (shooter, weapon, muzzle, mode, and shell) but how would one call your script? Something like:
this AddEventHandler ["fired", {[_x] exec "scriptname.sqs"}]
Thanks in advance for your reply.
Wadmann
-
Ok, here we go...
If your unit is called "MG42" you can write the following in the Init.sqs file, in a trigger, or in any script:
MG42 AddEventHandler ["fired",{_this Exec "scriptname.sqs"}]
If you are going to use it in the unit's init line then:
this AddEventHandler ["fired",{_this Exec "scriptname.sqs"}]
Good luck mate!
-
Ace Productions, this is excellent.
Please can you explain in detail what each part of your script does?
Thanks in advance.
-
I'm glad you like it andywt.
Just give me a couple of days cause I'm updating it. That was just the initial idea. Different weapons will vary in inaccuracy and the inaccuracy will be base on the skill level you select for your unit. 8)
-
This script is clever (i.e., intercepting the bullet and resetting its pos and velocity a little randomly).
A technique I've used is attach an invisible infanrtry target to units in a loop that randomly moves (setpos) that invisible target around the player. This makes the AI sometimes shoot at you and sometimes at the invisible target near you, simulating near misses.
If you use an invisible armored target, then you get RPGs, tanks and choppers firing on you, which can really get your heart going!
I'm using Lester's invisible target addon.
-
That's quite a nice idea actually!
Can you post a sample so we can try it out?
-
Here's a little sample mission for the editor, plus one script "attach_target.sqs". In this script a civilian paces in front of two buses, while some soldiers shoot at an invisible target attached to the civilian. He gets killed when the invisible target happens to get placed directly between him and the shooter.
After 30 seconds, a trigger moves an invisible armored target to the civilians position. This causes the soldier AI to fire their laws.
The example assumes you have Resistance and the Invisible Targets addon by Lester (InvTargets.pbo).
-
Please could someone post the scripts and/or the mission examples that were once in this thread.