mob Spawner for pvp Player bases

Discussion in 'Custom Playfields & Systems' started by casishur, Sep 4, 2022.

  1. casishur

    casishur Ensign

    Joined:
    Oct 22, 2016
    Messages:
    6
    Likes Received:
    1
    Ich bin zurzeit dabei für meinen Sever einen Spawner zu erstellen, den die Spieler setzen können. Hier habe ich bereits eine eigenen Mob type erstellt. Er Spawnt einen playerZiraxMinigun (ZiraxMinigun), die keine XP und loot geben und auf der Fraktionsseite des Basis Eigentümers oder der Fraktion ist, das ist so gewollt.

    Bauen und Plazieren funktioniert
    Aber nachdem diese Wachen Abgeschossen worden sind Spawnen keine weiteren mehr nach

    Im Krative menu kann man den Tick bei Respawn auf True setzen: (default False)

    Aber wie kann man für dieses ein Objekt den Tick als Default setzen
    ich finde in der Blocksconfig keine hilfreichen hinweise wie ich den den tick setzen kann
    oder ist dieser Tick Harcoded?

    English
    I am currently in the process of creating a spawn for my server that the players can set. Here I have already created a custom mob type that spawns a playerZiraxMinigun (ZiraxMinigun) that does not give XP and loot and is on the faction side of the base owner or faction, this is intentional.

    Building and placing works
    But after these guards are shot down, they don't spawn again.

    In the Krative menu you can set the tick for respawn to True (default False).

    But how can you set the tick as default for this one object?
    I can't find any helpful hints in the blockconfig how to set the tick
    or is this tick hardcoded?

    Translated with www.DeepL.com/Translator (free version)


    Code:
    { Block Name: Player_mob_spawner
      Class: Spawner
      Group: cpgEquipment #cpgNPCSpawner
      IndexName: EntitySpawner
      AllowedInBlueprint: false, display: true
      Shape: Config3DCollider
      Material: metallight
      Model: @models/Blocks/Misc/EntitySpawnerPrefab
      DropMeshfile: Entities/Misc/DropContainerNewPrefab             #Large container box; Available variants: see start of this document!
      Place: Free
      ForceMaxCount: true  #TemplateRoot: TurretBAArtilleryBlocks
      PickupTarget: Player_mob_spawner
      AllowPlacingAt: Base, display: true
      SizeInBlocks: "1,1,1", display: true
      SizeInBlocksLocked: "Base,MS"
      Volume: 50, type: float, display: true, formatter: Liter
      Mass: 200, type: float, display: true, formatter: Kilogram
      IsActivateable: true
      IsAccessible: true, type: bool
      BlockColor: "110,110,110"
      HitPoints: 150, type: int, display: true
      EnergyIn: 1, type: int, display: false, formatter: Watt
      Category: Devices
      BlastParticleIndex: 4
      BlastRadius: 1
      BlastDamage: 10
      Collide: "bullet,rocket,melee,sight"     #  for AI pathfinding: do not consider this block as collide with movements
      SpawnClass: PlayerZiraxMinigun
      SpawnCount: 2
      Info: bkiEntitySpawner, display: true
      AllowWander: true
      RemoveOnSI: true       # avoid to show the dummy block on SI collapse
      MaxCount: 2, type: int, display: true
      UnlockCost: 115, display: true
      UnlockLevel: 25, display: true
      TechTreeParent: OfflineProtector
      TechTreeNames: "Base"
    }
    

    templates

    Code:
    { +Template Name: Player_mob_spawner #Artillery Turret"
      CraftTime: 30 #D1 20  uses "ArtilleryRocket"
      Target: AdvC
      { Child Inputs
        SteelPlateArmored: 10
        ZascosiumAlloy: 5
        Oscillator: 4
        PowerCoil: 1
      }
    }
    
    EClassConfig

    Code:
    { +Entity Name: PlayerZiraxMinigun, Ref: AlienTemplateBAI
      Mesh: Enemies/Zirax/ZiraxBluePrefab
      MeshDead: Enemies/Zirax/ZiraxBlueDeadPrefab
      HeadTransform: Bip01_Head
     
      Prefab: AlienHumanoid
    
      /* Determines particle effect  */
      SurfaceCategory: human
    
      /* General entity properties */
      ViewAngle: 180
      MaxHealth: 500
      # XpFactor: 3
      XpFactor: 0
      RightHandJointName: Bip01_R_Hand
      ItemsOnEnterGame: ZiraxMinigunWeapon
      RotateToGround: false
      RotateSpeed: 150
    
      /* Sound settings */
      SfxRandomTime: 50.0
      SfxRandom: Enemies/Zirax/Zirax_SfxRandom
      SfxAlertTime: 25.0
      SfxAlert: Enemies/Zirax/Zirax_SfxRandom
      SfxHurt:  Enemies/Zirax/Zirax_SfxHurt
      SfxDeath: Enemies/Zirax/Zirax_SfxDeath
    
      LootListOnDeath: 0
      FadingEnabled: false              # disabled otherwise problems with switching to DeadMesh
    
      UpdateClusterInfo: true      
      AllowUserInstantiate: true
      AllowInSpawners: true
     
      { Child MainBehavior
        BehaviorName: Behaviors/HiLevelTrees/ZiraxTroopCommands
      }
     
    
      { Child VariableOverride
        SpeedCalm: 0.3
        SpeedAlerted: 0.8
        SpeedAttack: 1.5
      }
     
      { Child Hints
        AttackApproachTarget: 0
        AttackOptimalDistance: 40
        SearchAdvanceTime: 2.0
        SearchWaitTime: 3
        SearchRandomDistanceMult: 1
        FireWeaponBlendInTime: 0.5
        FireWeaponDurationMultiplier: 1.0
      }
      
      {    Child VisionSensor
        VisibleDistance: 130
        ViewAngle: 110
        VisibleTypes: "Player,HV,SV,CV,PlayerBike"
      }  
     
      {    Child TargetSensor
        AttackableTypes: "Player,HV,SV,CV,PlayerBike"
      }
     
      { Child StuckSensor
        Use: 0
      }
     
      {    Child AlertSensor
        AlertLevel1: 10, param1: 0
        AlertLevel2: 40, param1: 2
        AlertLevel3: 60, param1: 50
        AlertLevelDrop:10 /* slow alert drop */
        AlertAddFromVisionMinNoMovement:10 /* no alert when not moving */
        AlertAddFromVisionMovement:200
        AlertVisionMaxSpeed:2
        AlertAddFromAutoAlert:30
        MinDistanceToAutoAlert:20
        NoiseMaxDistance:65
        NoiseAlertMultiplier:0.5
      }      
    
     
    #1
    Ferrugem likes this.

Share This Page