1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 |
local function Vibrate ( eventCode , duration , coarseMotor , fineMotor , leftTriggerMotor , rightTriggerMotor )
end
end
local actionType = nil
--player doing stuff to people
if sourceType == COMBAT_UNIT_TYPE_PLAYER then
if actionResult == ACTION_RESULT_DIED or --player killed someone (self included ie falling damage)
actionResult == ACTION_RESULT_DIED_XP or
actionResult == ACTION_RESULT_KILLING_BLOW then
actionType = GAMEPAD_VIBRATION_TRIGGER_KILLED
end
end
--people doing stuff to player
if targetType == COMBAT_UNIT_TYPE_PLAYER and sourceType ~= COMBAT_UNIT_TYPE_PLAYER then
if actionResult == ACTION_RESULT_DIED or --player died
actionResult == ACTION_RESULT_DIED_XP or
actionResult == ACTION_RESULT_KILLING_BLOW then
actionType = GAMEPAD_VIBRATION_TRIGGER_DIED
elseif actionResult == ACTION_RESULT_STUNNED then --player got stunned
actionType = GAMEPAD_VIBRATION_TRIGGER_STUNNED
elseif actionResult == ACTION_RESULT_KNOCKBACK then --player got knockedback
actionType = GAMEPAD_VIBRATION_TRIGGER_KNOCKED_BACK
elseif actionResult == ACTION_RESULT_STAGGERED then --player got staggered
actionType = GAMEPAD_VIBRATION_TRIGGER_STAGGERED
end
end
return actionType ;
end
actionResult ,
isError ,
abilityName ,
abilityGraphic ,
abilityActionSlotType ,
sourceName ,
sourceType ,
targetName ,
targetType ,
hitValue ,
powerType ,
damageType ,
shouldLog )
if actionType ~= nil then
end
end
|