Jump to content

TuTu

Members
  • Posts

    9
  • Joined

  • Last visited

Posts posted by TuTu

  1. Hello guys!

    I'm looking for a way to make a ship patrol indefinitely. I have already tried several solutions:
    - Advanced ME option: Switch to a waypoint => Does not work
    - Moose script: UNIT:Patrol or GROUP:Patrol => Does not work
    - Mist script: mist.ground.patrol('NAME-OF-CARRIER-GROUP') => Does not work

    Does anyone have a solution or an example of a simple mission that I can adapt?

    Thank you for your help.

  2. Hello,

    I would like to spawn enemy planes using the F10 menu, and keep the opportunity to destroy them using this same menu.

    I created a script with moose, but the planes refuse to disappear when I use the destroy command. I also checked that they didn't have a name (just a number) despite the "InitKeepUnitNames" option.

    Could someone who knows Moose please help me?

    Thank you in advance.

     

    do
    
    -- Add main menu radio
    local MenuCoalitionBlue = MENU_COALITION:New( coalition.side.BLUE, "A/A targets manage" )
    
    -- Respawn zones table
    local ZoneTable = { ZONE:New( "SpawnZone1" ), ZONE:New( "SpawnZone2" ) , ZONE:New( "SpawnZone3" ) , ZONE:New( "SpawnZone4" )}
    
    -- #SPAWN class
    local SpawnClasTargetPlane
    
    local function SpawnTargetPlane()
    	SpawnClassTargetPlane = SPAWN
    		:New( "TARGET_PLANE" )
    		:InitKeepUnitNames(true)
    		:InitLimit( 2, 1 )		-- :InitLimit( 2, 20 )
    		:InitRandomizeZones( ZoneTable )
    		:SpawnScheduled( 10, .5 )
    end
    
    
    local function DestroyTargetPlanes()
    	if SpawnClassTargetPlane:IsAlive then
    		SpawnClassTargetPlane:Destroy(true)
    	end
    end
    
    
    -- Add second menu radio
    local MenuSpawnTargetPlane = MENU_COALITION_COMMAND:New( coalition.side.BLUE, "spawn target plane", MenuCoalitionBlue, SpawnTargetPlane )
    
    local MenuDestroy = MENU_COALITION_COMMAND:New( coalition.side.BLUE, "Remove all target plane", MenuCoalitionBlue, DestroyTargetPlanes )
    
    
    end	-- do

     

    Spawn_AA_light.lua

×
×
  • Create New...