diff options
author | DBmaoha <56738369+DBmaoha@users.noreply.github.com> | 2022-10-22 02:51:19 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-21 19:51:19 +0100 |
commit | ee0613f81248335191170ffccada19af0e85524c (patch) | |
tree | 5c4a363576b7cef9d3316cbc631050e2c255fa51 /Northstar.CustomServers/mod/scripts/vscripts/mp/_score.nut | |
parent | 133aa4c4d1559b680cc043fdfe9c4dafb5d486f8 (diff) | |
download | NorthstarMods-ee0613f81248335191170ffccada19af0e85524c.tar.gz NorthstarMods-ee0613f81248335191170ffccada19af0e85524c.zip |
Added Music and Dialogue Event (#469)
* Added Music and Dialogue Event
Added Music based on score event and time.
Added Dialogue event based on score comparation and after killing a player's titan
* Changed Filter Type to Only DM Gamemodes
Only vanilla gamemodes those have unlimited respawns will automatically plays music
* Added a !
omg
* Removed Music Event
Removed Music Event, Moved Dialogue Event to _gamestate_mp.nut
* Changed mods.json
* Changed RoundBased Gamemodes Check
not hardcoded right now
* Moved Killing Titan Dialogue to _score.nut
dialogue is now together with scoreevent
Diffstat (limited to 'Northstar.CustomServers/mod/scripts/vscripts/mp/_score.nut')
-rw-r--r-- | Northstar.CustomServers/mod/scripts/vscripts/mp/_score.nut | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/Northstar.CustomServers/mod/scripts/vscripts/mp/_score.nut b/Northstar.CustomServers/mod/scripts/vscripts/mp/_score.nut index 457b2c9f1..dacd43b0f 100644 --- a/Northstar.CustomServers/mod/scripts/vscripts/mp/_score.nut +++ b/Northstar.CustomServers/mod/scripts/vscripts/mp/_score.nut @@ -215,6 +215,9 @@ void function ScoreEvent_TitanKilled( entity victim, entity attacker, var damage Remote_CallFunction_NonReplay( attackerInfo.attacker, "ServerCallback_SetAssistInformation", attackerInfo.damageSourceId, attacker.GetEncodedEHandle(), victim.GetEncodedEHandle(), attackerInfo.time ) } } + + if( !victim.IsNPC() ) // don't let killing a npc titan plays dialogue + KilledPlayerTitanDialogue( attacker, victim ) } void function ScoreEvent_NPCKilled( entity victim, entity attacker, var damageInfo ) @@ -261,3 +264,42 @@ void function ScoreEvent_SetupEarnMeterValuesForTitanModes() { // relatively sure we don't have to do anything here but leaving this function for consistency } + +// faction dialogue +void function KilledPlayerTitanDialogue( entity attacker, entity victim ) +{ + if( !attacker.IsPlayer() ) + return + entity titan + if ( victim.IsTitan() ) + titan = victim + + if( !IsValid( titan ) ) + return + string titanCharacterName = GetTitanCharacterName( titan ) + + switch( titanCharacterName ) + { + case "ion": + PlayFactionDialogueToPlayer( "kc_pilotkillIon", attacker ) + return + case "tone": + PlayFactionDialogueToPlayer( "kc_pilotkillTone", attacker ) + return + case "legion": + PlayFactionDialogueToPlayer( "kc_pilotkillLegion", attacker ) + return + case "scorch": + PlayFactionDialogueToPlayer( "kc_pilotkillScorch", attacker ) + return + case "ronin": + PlayFactionDialogueToPlayer( "kc_pilotkillRonin", attacker ) + return + case "northstar": + PlayFactionDialogueToPlayer( "kc_pilotkillNorthstar", attacker ) + return + default: + PlayFactionDialogueToPlayer( "kc_pilotkilltitan", attacker ) + return + } +} |