From ee1644422ea43574aa1b151b75b482a623fe9410 Mon Sep 17 00:00:00 2001 From: RoyalBlue1 Date: Sun, 17 Jul 2022 03:25:09 +0200 Subject: Add Revive to Turrets --- .../mod/scripts/vscripts/ai/_ai_turret.gnut | 47 ++++++++++++++++++++++ .../scripts/vscripts/gamemodes/_gamemode_fd.nut | 1 + .../vscripts/gamemodes/_gamemode_fd_events.nut | 3 ++ .../vscripts/gamemodes/_gamemode_fd_nav.nut | 8 ++++ 4 files changed, 59 insertions(+) (limited to 'Northstar.CustomServers') diff --git a/Northstar.CustomServers/mod/scripts/vscripts/ai/_ai_turret.gnut b/Northstar.CustomServers/mod/scripts/vscripts/ai/_ai_turret.gnut index 73813385..9d3aabbc 100644 --- a/Northstar.CustomServers/mod/scripts/vscripts/ai/_ai_turret.gnut +++ b/Northstar.CustomServers/mod/scripts/vscripts/ai/_ai_turret.gnut @@ -1,7 +1,10 @@ +untyped global function AiTurret_Init global function GetMegaTurretLinkedToPanel global function MegaTurretUsabilityFunc global function SetUsePromptForPanel +global function RevivableTurret_DamageCallback +global function RevivableTurret_Revive void function AiTurret_Init() { @@ -21,4 +24,48 @@ string function MegaTurretUsabilityFunc( var turret, var panel ) void function SetUsePromptForPanel( var panel, var turret ) { +} + +void function RevivableTurret_DamageCallback(entity turret,var damageInfo) +{ + if(turret.GetHealth() function getRoute(string routeName) currentNode = currentNode[0].GetLinkEntArray() } return ret +} + +void function Dev_MarkRoute(string routename){ + foreach(entity e in getRoute(routename)) + { + DebugDrawSphere(e.GetOrigin(),30.0,255,0,255,false,40) + } } \ No newline at end of file -- cgit v1.2.3