2019-06-19 01:10:15 -04:00
|
|
|
require ("global")
|
|
|
|
require ("utils")
|
|
|
|
|
|
|
|
--[[
|
|
|
|
|
|
|
|
AttackWeaponSkill Script
|
|
|
|
|
|
|
|
Finds the correct weaponskill subscript to fire when a weaponskill actor is activated.
|
|
|
|
|
|
|
|
--]]
|
|
|
|
|
|
|
|
function onEventStarted(player, command, triggerName, arg1, arg2, arg3, arg4, targetActor, arg5, arg6, arg7, arg8)
|
|
|
|
|
|
|
|
--Are they in active mode?
|
|
|
|
if (player:GetState() != 2) then
|
|
|
|
player:SendGameMessage(GetWorldMaster(), 32503, 0x20);
|
|
|
|
player:endEvent();
|
|
|
|
return;
|
|
|
|
end
|
|
|
|
|
|
|
|
if not player.aiContainer.IsEngaged() then
|
|
|
|
player.Engage(targetActor);
|
|
|
|
end;
|
2022-02-05 18:14:23 -05:00
|
|
|
player.WeaponSkill(command.Id, targetActor);
|
2019-06-19 01:10:15 -04:00
|
|
|
player:endEvent();
|
|
|
|
end;
|