Jump to content

Recommended Posts

Posted (edited)

Thought others might find this useful. This MOOSE script randomly generates explosions within a specified zone to simulate an active artillery bombardment.

 

Expl_Zone = ZONE:New( "Explosion Zone" )  -- Instantiate ME explosion zone             
      
ExplScheduler = SCHEDULER:New( nil, 
 function()
   
   Expl_Truck = SPAWN:New( "Expl_Truck" ) -- ME vehicle for explosion locations
                 :SpawnInZone( Expl_Zone, true ) 
                 
   Explode = Expl_Truck:GetCoordinate()
   Explode:Explosion( 500 )  -- 500 is explosion intensity. Change to suite.
   Expl_Truck:Destroy()

   CollectGabage()
   
 end, {}, 5, 6, .5  -- Explosions start after 5 sec, average every 6 sec.
 )  

Edited by Habu_69
Posted

I have not explored the new trigger action functionality nor poly zones. I have tested explosions in a moving zone around Player, and it works well. MOOSE script:

 

Player1 = GROUP:FindByName( "Player" )

ExplScheduler = SCHEDULER:New( nil, 
 function()
    
   ExploStrength = math.random( 300, 700 )    
   Expl_Zone = ZONE_GROUP:New( "Zone A", Player1, 1800 )  -- Instantiate moving explosion zone of 1800m radius
   Blast_Loc = Expl_Zone:GetRandomVec2()
   Explode = COORDINATE:NewFromVec2( Blast_Loc ) -- Explosion coordinates

   Explode:Explosion( ExploStrength )  -- Random intensity. Alter to suite.
   
 end, {}, 0, 4, .8  -- Explosions start after 0 sec, average every 4 sec.
 )

 

Only problem is Player is advancing while explosion locations are determined. As a result few explosions occur in front of Player.

Posted

I've not seen it exposed to the SSE yet, but I'm desperate to use it. Unfortunately can only use it with triggers so far.

Have you seen the new shell in zone trigger action? It'd be interesting if you could use a script to make that happen instead of a trigger or use an irregular shaped zone

___________________________________________________________________________

SIMPLE SCENERY SAVING * SIMPLE GROUP SAVING * SIMPLE STATIC SAVING *

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...