Arma 3
PapermacheSherman 2019 年 7 月 4 日 下午 5:34
Vehicle damage scripting help
I'm trying to script a mobility kill on a vehicle while its in motion using "unit setDamage 60" but the script is completely destroying the vehicle and killing the crew inside, which is not the intent. Is there a script I can use to target specific modules such as the engine or tracks that will keep the vehicle from exploding?
引用自 MATTXYO:
Correct way:

In trigger Activation add:
v1 setHitPointDamage["hitengine",1];v1 setHitPointDamage["hitrtrack",1];v1 setHitPointDamage["hitturret",1];

Where v1 was used as the vehicle name.
< >
正在显示第 1 - 15 条,共 20 条留言
MATTXYO 2019 年 7 月 4 日 下午 5:40 
You can use the setHit command to damage parts of a vehicle.
MATTXYO 2019 年 7 月 4 日 下午 7:34 
If you had a tank named v1 via the eden editor attributes, you could use the below as an example trigger:

Activation: BLUFOR

Condition: v1 in thislist

OnActivation:
0=[]spawn{ damagePartList = ["hit_engine_point","hit_fuel_point","hit_trackL_point","hit_trackR_point"]; { v1 setHit [_x,1] }forEach damagePartList; }
最后由 MATTXYO 编辑于; 2019 年 7 月 4 日 下午 7:34
Dankan37 2019 年 7 月 5 日 上午 8:51 
Also, setDamage 60 is wrong, the maximum is 1, so you should write .6
PapermacheSherman 2019 年 7 月 9 日 上午 5:14 
引用自 MATTXYO
If you had a tank named v1 via the eden editor attributes, you could use the below as an example trigger:

Activation: BLUFOR

Condition: v1 in thislist

OnActivation:
0=[]spawn{ damagePartList = ["hit_engine_point","hit_fuel_point","hit_trackL_point","hit_trackR_point"]; { v1 setHit [_x,1] }forEach damagePartList; }
I put this in almost exactly the same as you have it, with changes in the variable name of the target unit and the omitting of one of the hitpoints but the script simply didn't work. rather than blowing up entirely or working correctly, the script didn't run. Any ideas on how to fix this?
MATTXYO 2019 年 7 月 9 日 上午 5:54 
Without seeing what you have written or the setup I would be guessing, if you can post what you have that would be best.
PapermacheSherman 2019 年 7 月 9 日 上午 7:42 
引用自 MATTXYO
Without seeing what you have written or the setup I would be guessing, if you can post what you have that would be best.
0=[]spawn{
daamgePartList =
["hit_engine_point","hit_fuel_point","hit_trackR_point"];
{ bradley setHit [_x,1]}
forEach damagePartList;};

is it worth noting that the target vehicle is from a RHS mod?
MATTXYO 2019 年 7 月 9 日 上午 8:38 
If you have copied and pasted your code, the spelling of damagePartList is incorrect. If that is not it, the hitParts maybe named differently for the RHS vehicle.

Try the below edited code:
0=[]spawn{ damagePartList = ["hitengine","hitfuel","hitrtrack"]; { bradley setHit [_x,1] }forEach damagePartList; }
最后由 MATTXYO 编辑于; 2019 年 7 月 9 日 上午 8:57
PapermacheSherman 2019 年 7 月 9 日 上午 9:33 
already tried changing the hitParts. No dice
the the typo was only here, I double checked to make sure it was not spelled incorrectly in the editor
最后由 PapermacheSherman 编辑于; 2019 年 7 月 9 日 上午 9:35
MATTXYO 2019 年 7 月 9 日 下午 8:13 
The last example was tested on a RHS vehicle and it worked as intended.
PapermacheSherman 2019 年 7 月 10 日 下午 6:00 
is it possible that the inclusion of extra functions to be executed is causing the script to fail? in the trigger that I am attempting to execute this script, I have 6 other functions setup to kill six other entities, but each are their own function separated by semicolons.
MATTXYO 2019 年 7 月 10 日 下午 6:01 
Post what you have if you like, it may shed light on a potential problem.

Or you can remove the other parts of the script to test the vehicle damage and see if it works for you.
最后由 MATTXYO 编辑于; 2019 年 7 月 10 日 下午 6:07
PapermacheSherman 2019 年 7 月 10 日 下午 6:26 
I've removed the extra scripts, recopied and pasted the script that you yourself tested, set the trigger activation to blufor and set up the proper condition to activate the trigger.I know the trigger is activating because I have it setup to play an explosion effect and the task progresses once the trigger activates, (and I've even tested it without the explosion effect). still the script refuses to run. I'm attempting to run the script on an M2A2ODS Woodland varient (RHS_M2A2_wd). sorry for not specifying that sooner
MATTXYO 2019 年 7 月 10 日 下午 6:46 
Try:

0=[]spawn{ damagePartList = ["HitEngine","HitRTrack"]; { bradley setHit [_x,1] }forEach damagePartList; }
PapermacheSherman 2019 年 7 月 10 日 下午 6:52 
still nothing
MATTXYO 2019 年 7 月 10 日 下午 6:53 
Can you link the mod version you have.
< >
正在显示第 1 - 15 条,共 20 条留言
每页显示数: 1530 50

发帖日期: 2019 年 7 月 4 日 下午 5:34
回复数: 20