diff options
author | BobTheBob <32057864+BobTheBob9@users.noreply.github.com> | 2021-12-19 17:32:09 +0000 |
---|---|---|
committer | BobTheBob <32057864+BobTheBob9@users.noreply.github.com> | 2021-12-19 17:32:09 +0000 |
commit | f8685213baf4eef93dae6cc98c8e4a8318565bd3 (patch) | |
tree | c5bfb10ee066e5f7fb031376ddb8b435577b2991 /Northstar.CustomServers/mod/scripts/vscripts/mp/levels | |
parent | 7cac56cb9bcaabed9562a7b46718f5c5de3400b8 (diff) | |
download | NorthstarMods-f8685213baf4eef93dae6cc98c8e4a8318565bd3.tar.gz NorthstarMods-f8685213baf4eef93dae6cc98c8e4a8318565bd3.zip |
fixes and dropship refactor
Diffstat (limited to 'Northstar.CustomServers/mod/scripts/vscripts/mp/levels')
-rw-r--r-- | Northstar.CustomServers/mod/scripts/vscripts/mp/levels/mp_lf_deck.nut | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/Northstar.CustomServers/mod/scripts/vscripts/mp/levels/mp_lf_deck.nut b/Northstar.CustomServers/mod/scripts/vscripts/mp/levels/mp_lf_deck.nut index dca30fe9..592422ee 100644 --- a/Northstar.CustomServers/mod/scripts/vscripts/mp/levels/mp_lf_deck.nut +++ b/Northstar.CustomServers/mod/scripts/vscripts/mp/levels/mp_lf_deck.nut @@ -2,6 +2,29 @@ global function CodeCallback_MapInit void function CodeCallback_MapInit() { - FlagClear( "Disable_Marvins" ) SetupLiveFireMaps() + + // worker drone model + PrecacheModel( $"models/robots/aerial_unmanned_worker/aerial_unmanned_worker.mdl" ) + + // note: this map has no marvin spawns, have to spawn them using idle nodes + AddSpawnCallback_ScriptName( "worker_drone_spawn", DeckSpawnWorkerDrone ) + AddSpawnCallback_ScriptName( "marvin_idle_node", DeckSpawnMarvinForIdleNode ) +} + +void function DeckSpawnWorkerDrone( entity spawnpoint ) +{ + + entity drone = CreateWorkerDrone( TEAM_UNASSIGNED, spawnpoint.GetOrigin(), spawnpoint.GetAngles() ) + DispatchSpawn( drone ) +} + +void function DeckSpawnMarvinForIdleNode( entity node ) +{ + entity marvin = CreateMarvin( TEAM_UNASSIGNED, node.GetOrigin(), node.GetAngles() ) + DispatchSpawn( marvin ) + + // doing this because no ai rn + if ( GetAINScriptVersion() == -1 ) + thread PlayAnim( marvin, node.kv.leveled_animation ) }
\ No newline at end of file |