Commit 3bed1ca7 authored by Mikleo's avatar Mikleo
Browse files

--

parent 7830d8f8
Pipeline #11900 passed with stages
......@@ -10,7 +10,7 @@
#include <SteamWorks>
#define PluginVersion "1.27"
#define PluginVersion "1.28"
float pVersion;
// note linearmap field is unstable
......
......@@ -68,7 +68,7 @@ void Funcs_OnPluginStart()
AddCommand("HookOutput",HookOutputCommand,3);
AddCommand("ChatText",ChatTextCommand,3);
AddCommand("HudText",HudTextCommand,5);
AddCommand("TextTimer",TextTimerCommand,6);
AddCommand("TextTimer",TextTimerCommand,6,false);
AddCommand("MovementTrigger",MovementTriggerCommand,6);
AddCommand("SpawnPreset",SpawnPresetCommand,6);
AddCommand("Teleport",TeleportCommand,6);
......@@ -470,7 +470,7 @@ void LoadScriptBeginning(char[] token,int entRef)
LoadScriptBeginningFromKV(kv,token,entRef);
} while(kv.GotoNextKey()) ;
} while(kv.GotoNextKey(false)) ;
}
kv.Rewind();
......@@ -1309,8 +1309,12 @@ public int TextTimerCommand(int entity,char[] args,char[] remainder)
{
int argIndex;
int timer = 1;
char time[32];
BreakArg(args,time,sizeof(time),argIndex);
// allow the time var to use variables. but the text fields to avoid
ReplaceVariables(entity,time,sizeof(time));
timer = StringToInt(time);
char nf_text[256];
......
"KOTH"
{
"$string_MainText" "King of the Hill\Hold the middle flag for 8 minutes to win"
"$string_NeutralText" "King Of The Hill"
"$int_TimerLength" "480"
"$int_TimerDecrease" "20"
"$int_TimerLengthMin" "260"
"i_HookFlag" "TargetName KOTHFlag -> HookOutput OnNeutral NeutralTimer -> HookOutput OnImpCap BETimer -> HookOutput OnNFCap NFTimer"
"i_StartingTimer" "Cancel KOTHTimer -> TextTimer -1 *$string_MainText* _ KOTHTimer"
"s_EnableTimer" "Run NeutralTimer"
"NeutralTimer" "Cancel KOTHTimer -> Run ReduceTime -> TextTimer -1 *$string_NeutralText* _ KOTHTimer"
"BETimer" "Cancel KOTHTimer -> TextTimer $int_TimerLength *BE Victory in TIME_LEFT* _ KOTHTimer -> TargetParams -> Run TeleportAboveFlag -> Input InputImpWin 0 "
"NFTimer" "Cancel KOTHTimer -> TextTimer $int_TimerLength *NF Victory in TIME_LEFT* _ KOTHTimer -> TargetParams -> Run TeleportAboveFlag -> Input InputNFWin 0 "
"ReduceTime" "Set $int_TimerLength = $int_TimerLength - $int_TimerDecrease -> If *$int_TimerLength < $int_TimerLengthMin* -> Set $int_TimerLength = $int_TimerLengthMin"
"TeleportAboveFlag" "Teleport 0 0 300 KOTHFlag"
}
\ No newline at end of file
"KOTHS"
{
"$string_MainText" "King of the Hill\Hold both flags for 8 minutes to win"
"$string_NeutralText" "King of the hill"
"$string_Warning" "King of the hill:TXTCLR_DF Hold onto both flags for 8 minutes to win. TXTCLR_G!scenario"
"$int_TimerLength" "480"
//automatically calculated
"$int_FlagNumber" "0"
"i_HookFlags" "Set $int_FlagNumber = 0 -> TargetNameAll KOTHFlag -> Inc $int_FlagNumber -> HookOutput OnNeutral FlagsChanged -> HookOutput OnImpCap FlagsChanged -> HookOutput OnNFCap FlagsChanged"
"FlagsChanged" "After 0.1 -> Run CountFlags -> If *$int_BEFlags == $int_FlagNumber* BEHasFlags *$int_NFFlags == $int_FlagNumber* NFHasFlags ELSE NooneHasFlags"
"i_StartingTimer" "Cancel KOTHTimer -> TextTimer -1 *$string_MainText* _ KOTHTimer"
"s_OnStart" "Run NooneHasFlags"
"BEHasFlags" "Cancel KOTHTimer -> TextTimer $int_TimerLength *BE Victory in TIME_LEFT* _ KOTHTimer -> TargetParams -> Input InputImpWin 0 "
"NFHasFlags" "Cancel KOTHTimer -> TextTimer $int_TimerLength *NF Victory in TIME_LEFT* _ KOTHTimer -> TargetParams -> Input InputNFWin 0 "
"NooneHasFlags" "Cancel KOTHTimer -> TextTimer -1 *$string_NeutralText* _ KOTHTimer"
"i_Warn" "Every 240 -> ChatText *$string_Warning*"
"$int_BEFlags" "0"
"$int_NFFlags" "0"
"CountFlags" "Set $int_BEFlags = 0 -> Set $int_NFFlags = 0 -> TargetNameAll KOTHFlag -> If *$m_iTeamOwner == 1* CountNFFlag *$m_iTeamOwner == 2* CountBEFlag"
"CountBEFlag" "Inc $int_BEFlags"
"CountNFFlag" "Inc $int_NFFlags"
}
\ No newline at end of file
......@@ -6,25 +6,29 @@
"BE_Tickets" "402.000000"
"Scripts"
{
"OnScenarioLoaded" "Run Introduction Introduction2 Setup BlockArty"
"Introduction" "After 60 -> ChatText *Gen. Strickland:TXTCLR_DF Listen up, the artifact in the ruins will provide us an enormous technological advantage in the war to come* *Gen. Mendez:TXTCLR_DF Intel has detected an artifact in the south east ruins with enormous strategic value* **"
"Introduction2" "After 65 -> ChatText *Gen. Strickland:TXTCLR_DF Our objective is clear, defend the artifact at any cost.* *Gen. Mendez:TXTCLR_DF Our objective is clear, destroy the artifact at any cost.* **"
"Setup" "TargetName artifact -> AddDamageFilter NoTeamDamage -> HookOutput OnBreak NFVictory -> Run ObjectiveTimer"
"ObjectiveTimer" "TextTimer 1200 *Defend The Artifact\TIME_LEFT $m_iHealth HP* *Destroy The Artifact\TIME_LEFT $m_iHealth HP* -> TargetParams -> Input InputNFWin 0 EndActivator"
"NFVictory" "TargetParams -> Input InputImpWin 0 EndActivator"
"BlockArty" "OnCommand *emp_comm_research 34* Handle -> PrintToTarget *Artillery tanks are disabled in this scenario*"
"OnGameStart" "Run Warning AirStrikeExec1 AirStrikeExec2 SmartIdeas AirStrikeExec3"
"Warning" "After 600 -> ChatText *Gen. Strickland:TXTCLR_DF Intel has revealed that the enemy are planning airstrikes on key buildings at our location. Don't take any defences for granted!* *Gen. Mendez:TXTCLR_DF Be alert, We have allied bombers in the area which will deliver precision airstrikes on enemy targets* **"
"AirStrikeExec1" "After 800 -> TargetClassname emp_building_radar 2 -> Run AircraftEffect -> TakeDamage 500 -> After 2 -> Run AirStrikeNotice1 "
"AirStrikeNotice1" "ChatText *Gen. Strickland:TXTCLR_DF Oh no! Our radar has just been taken out by a precision airstrike!* *Gen. Mendez:TXTCLR_DF Great news! A precision allied airstrike has just taken out the enemy radar! *"
"AirStrikeExec2" "After 900 -> TargetClassname emp_building_vehiclefactory 2 -> Run AircraftEffect -> TakeDamage 500 -> After 2 -> Run AirStrikeNotice2"
"AirStrikeNotice2" "ChatText *Gen. Strickland:TXTCLR_DF Oh no! Our vehicle factory has just been taken out by a precision airstrike!* *Gen. Mendez:TXTCLR_DF Great news! A precision allied airstrike has just taken out the enemy vehicle factory! *"
"SmartIdeas" "After 1000 -> ChatText ** *Gen. Mendez:TXTCLR_DF Listen up maggot, anyone else with 'smart' suggestions about airstriking the artifact will be reassigned to the bioweapon research division.* **"
"AirStrikeExec3" "After 1050 -> Run AirStrikeWarning3 -> After 50 -> TargetParams -> Run AircraftDownEffect -> Input SetNFTickets 1 -> After 2 -> Run AirStrikeNotice3"
"AirStrikeWarning3" "ChatText *Gen. Strickland:TXTCLR_DF We have a mole, intel has revealed that someone has just leaked our flight plans. Be prepared to run out of reinforcements soon.* *Gen. Mendez:TXTCLR_DF We have just recieved intel on enemy reinforcement flight plans, dispatching fighters. *"
"AirStrikeNotice3" "ChatText *Gen. Strickland:TXTCLR_DF Oh no! Enemy Fighters have shot down our remaining reinforcements. You're on your own now!* *Gen. Mendez:TXTCLR_DF Our Fighters have just shot down enemy reinforcements. Use this to your advantage, strike now! *"
"AircraftEffect" "EmitSound *ambient/explosions/explode_2.wav*"
"AircraftDownEffect" "EmitSound *npc/combine_gunship/gunship_explode2.wav*"
"Main"
{
"OnScenarioLoaded" "Run Introduction Introduction2 Setup BlockArty"
"Introduction" "After 60 -> ChatText *Gen. Strickland:TXTCLR_DF Listen up, the artifact in the ruins will provide us an enormous technological advantage in the war to come* *Gen. Mendez:TXTCLR_DF Intel has detected an artifact in the south east ruins with enormous strategic value* **"
"Introduction2" "After 65 -> ChatText *Gen. Strickland:TXTCLR_DF Our objective is clear, defend the artifact at any cost.* *Gen. Mendez:TXTCLR_DF Our objective is clear, destroy the artifact at any cost.* **"
"Setup" "TargetName artifact -> AddDamageFilter NoTeamDamage -> HookOutput OnBreak NFVictory -> Run ObjectiveTimer"
"ObjectiveTimer" "TextTimer 1200 *Defend The Artifact\TIME_LEFT $m_iHealth HP* *Destroy The Artifact\TIME_LEFT $m_iHealth HP* -> TargetParams -> Input InputNFWin 0 EndActivator"
"NFVictory" "TargetParams -> Input InputImpWin 0 EndActivator"
"BlockArty" "OnCommand *emp_comm_research 34* Handle -> PrintToTarget *Artillery tanks are disabled in this scenario*"
"OnGameStart" "Run Warning AirStrikeExec1 AirStrikeExec2 SmartIdeas AirStrikeExec3"
"Warning" "After 600 -> ChatText *Gen. Strickland:TXTCLR_DF Intel has revealed that the enemy are planning airstrikes on key buildings at our location. Don't take any defences for granted!* *Gen. Mendez:TXTCLR_DF Be alert, We have allied bombers in the area which will deliver precision airstrikes on enemy targets* **"
"AirStrikeExec1" "After 800 -> TargetClassname emp_building_radar 2 -> Run AircraftEffect -> TakeDamage 500 -> After 2 -> Run AirStrikeNotice1 "
"AirStrikeNotice1" "ChatText *Gen. Strickland:TXTCLR_DF Oh no! Our radar has just been taken out by a precision airstrike!* *Gen. Mendez:TXTCLR_DF Great news! A precision allied airstrike has just taken out the enemy radar! *"
"AirStrikeExec2" "After 900 -> TargetClassname emp_building_vehiclefactory 2 -> Run AircraftEffect -> TakeDamage 500 -> After 2 -> Run AirStrikeNotice2"
"AirStrikeNotice2" "ChatText *Gen. Strickland:TXTCLR_DF Oh no! Our vehicle factory has just been taken out by a precision airstrike!* *Gen. Mendez:TXTCLR_DF Great news! A precision allied airstrike has just taken out the enemy vehicle factory! *"
"SmartIdeas" "After 1000 -> ChatText ** *Gen. Mendez:TXTCLR_DF Listen up maggot, anyone else with 'smart' suggestions about airstriking the artifact will be reassigned to the bioweapon research division.* **"
"AirStrikeExec3" "After 1050 -> Run AirStrikeWarning3 -> After 50 -> TargetParams -> Run AircraftDownEffect -> Input SetNFTickets 1 -> After 2 -> Run AirStrikeNotice3"
"AirStrikeWarning3" "ChatText *Gen. Strickland:TXTCLR_DF We have a mole, intel has revealed that someone has just leaked our flight plans. Be prepared to run out of reinforcements soon.* *Gen. Mendez:TXTCLR_DF We have just recieved intel on enemy reinforcement flight plans, dispatching fighters. *"
"AirStrikeNotice3" "ChatText *Gen. Strickland:TXTCLR_DF Oh no! Enemy Fighters have shot down our remaining reinforcements. You're on your own now!* *Gen. Mendez:TXTCLR_DF Our Fighters have just shot down enemy reinforcements. Use this to your advantage, strike now! *"
"AircraftEffect" "EmitSound *ambient/explosions/explode_2.wav*"
"AircraftDownEffect" "EmitSound *npc/combine_gunship/gunship_explode2.wav*"
}
}
"Description" "Destroy/Defend the artifact in 20 minutes"
"details" "A timer will appear when the game starts.\Artillery is disabled."
......
......@@ -4,7 +4,7 @@
{
"Version"
{
"Latest" "1.27"
"Latest" "1.28"
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment