Habu_69 Posted February 17, 2018 Posted February 17, 2018 (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 February 17, 2018 by Habu_69
Stonehouse Posted February 19, 2018 Posted February 19, 2018 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
Habu_69 Posted February 20, 2018 Author Posted February 20, 2018 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.
fargo007 Posted February 23, 2018 Posted February 23, 2018 @Stonehouse - It could operate on a polygon, within MOOSE at least very easily. In the example used, define Expl_Zone to be a polygon zone and it's done. Have fun. Don't suck. Kill bad guys. https://discord.gg/blacksharkden/
Pikey Posted February 25, 2018 Posted February 25, 2018 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 *
Recommended Posts