Capture
Net_Capture in SkillsTries to capture a companion.
- id
- Net_Capture
- type
- 0
- flags
- 0
- nature
- 0
- script
- function onStep(s) { if (s.kind == Steps.Capture) { } } function onHit(hit) { if (hit.step.kind == Steps.Capture) { if (isCritter(hit.targetUnit)) { var pos = hit.targetUnit.position; trace("Hit " + hit.targetUnit + " count " + hit.hitCount ); if (ownerHero?.tryCaptureCritter(hit.targetUnit)) { playStep(Steps.Captured, hit.targetUnit, pos); } else { playStep(Steps.Missed, hit.targetUnit, pos); } } } }
- status
- 5
- duration
- 1
Raw data
{
"id": "Net_Capture",
"gfx": {
"x": 2,
"y": 0,
"file": "UI/icons/atlas_weapon_GreatAxe_96PX.png",
"size": 48,
"width": 2,
"height": 2
},
"anim": {
"file": "Anim/Human/TwoHanded/Combat/Anim_Human_TwoHanded_AttackCombo.fbx",
"blend": 0.1,
"startFrame": 0
},
"type": 0,
"vars": {},
"flags": 0,
"props": {},
"steps": [
{
"on": 0,
"type": 8,
"delay": 0.2,
"props": {
"move": {
"direction": [
0
]
}
},
"range": 2,
"duration": 0.1
},
{
"on": 0,
"type": 11,
"delay": 0.36,
"props": {},
"visuals": {
"playAnims": [
{
"anim": {
"file": "Anim/Human/TwoHanded/Combat/Anim_Human_TwoHanded_AttackCombo.fbx",
"blend": 0,
"startFrame": 15
}
}
]
}
},
{
"id": "Capture",
"on": 0,
"type": 0,
"delay": 0.36,
"props": {
"hitCount": 1,
"position": {
"directionalOffset": {
"x": 2
}
}
},
"range": 2,
"visuals": {
"fxs": [
{
"set": "Earth_AOE_Ground",
"flags": 16,
"props": {},
"space": 1
}
]
}
},
{
"on": 0,
"type": 11,
"delay": 0.36,
"props": {},
"visuals": {
"camShake": 25
}
},
{
"id": "Captured",
"on": 13,
"type": 11,
"props": {
"position": {
"origin": 4
}
},
"visuals": {
"fxs": [
{
"set": "Hero_LevelUp",
"flags": 192,
"props": {},
"scale": 0.5,
"space": 1
}
],
"target": 1
}
},
{
"id": "Missed",
"on": 13,
"type": 11,
"props": {
"position": {
"origin": 4
}
},
"visuals": {
"fxs": [
{
"set": "Wind_Blast",
"flags": 192,
"props": {},
"scale": 0.5,
"space": 1
}
],
"target": 1
}
}
],
"texts": {
"desc": "Tries to capture a companion.",
"name": "Capture"
},
"nature": 0,
"script": "function onStep(s) {\n\tif (s.kind == Steps.Capture) {\n\n\t}\n}\n\nfunction onHit(hit) {\n\tif (hit.step.kind == Steps.Capture) {\n\t\tif (isCritter(hit.targetUnit)) {\n\t\t\tvar pos = hit.targetUnit.position;\n\t\t\ttrace(\"Hit \" + hit.targetUnit + \" count \" + hit.hitCount );\n\t\t\tif (ownerHero?.tryCaptureCritter(hit.targetUnit)) {\n\t\t\t\tplayStep(Steps.Captured, hit.targetUnit, pos);\n\t\t\t} else {\n\t\t\t\tplayStep(Steps.Missed, hit.targetUnit, pos);\n\t\t\t}\n\t\t}\n\t}\n}",
"status": 5,
"mastery": [],
"duration": 1
}