how do i add points for a hit for a wepon pls answer
im in a rush so just do this script
{
“triggers”: [
{
“type”: “unitAttacksUnit”
}
],
“conditions”: [
{
“operator”: “==”,
“operandType”: “boolean”
},
true,
true
],
“actions”: [
{
“type”: “condition”,
“conditions”: [
{
“operandType”: “and”,
“operator”: “AND”
},
[
{
“operandType”: “itemType”,
“operator”: “==”
},
{
“function”: “getItemTypeOfItem”,
“entity”: {
“function”: “getLastAttackingItem”
}
},
“t2T76nMrLr”
],
[
{
“operandType”: “unitType”,
“operator”: “==”
},
{
“function”: “getUnitTypeOfUnit”,
“entity”: {
“function”: “getLastAttackedUnit”
}
},
“fighter”
]
],
“then”: [
{
“type”: “setPlayerAttribute”,
“attribute”: “cVyzzK1FJ7”,
“entity”: {
“function”: “getOwner”,
“entity”: {
“function”: “getLastAttackingUnit”
}
},
“value”: {
“function”: “calculate”,
“items”: [
{
“operator”: “+”
},
{
“function”: “getPlayerAttribute”,
“attribute”: “cVyzzK1FJ7”,
“entity”: {
“function”: “getOwner”,
“entity”: {
“function”: “getLastAttackingUnit”
}
}
},
2
]
}
}
],
“else”: []
}
],
“name”: “+2 Attack Unit”,
“parent”: null,
“key”: “VgEcSdQPQE”,
“order”: 12
}