Creating a burning ruin of an ingame building (http://www.rockpapershotgun.com/forums/showthread.php?3541-EDITING-Collection-of-ARPS-published-scripts-and-snippets&p=102098&viewfull=1#post102098) (or a complete town!)

Depending on the settings these two can destroy the framerate. Take care.
Also note that these won't work when testing locally, only on dedicated servers!
To make them work locally (but not on servers!) remove the if !(isServer) exitWith {}; part (but not it's contents).

Creating a burning ruin of a building:
Put down a game logic -> location over the building you want destroyed and put this code in it's init:

nul = [this] execVM "ws_burningbuilding.sqf";

ws_burningbuilding.sqf is:

// Burning buildings mini script
// By Wolfenswan: wolfenswanarps@gmail.com
//
// Feature: Destroys a selection of buildings and sets them on fire
//
// Usage:
// In the editor place gamelogics named burn, burn_1, etc on top of the buildings you want to destroy/see burn
// add object names to _firearray below
// [] execVM "ws_burningbuilding.sqf" in the init.sqf
//
// Customization:
// Change _minfirestrength if you want a bigger/smaller fire

see this entry (http://wiki.zspecialunit.org/index.php?title=ArmA_2_Mission_Editing_Code_Exampl es_and_Hints#Burn_that_stuff.21) for an explanation of the parameters

for only a ruin without fire it's enough to create a logic over the building and put in it's init:

(getPos this nearestObject "Building") setdamage 1;

995

Destroying a complete city AND setting it on fire:
Create a logic in the center of the town you want to destroy and put

nul = [this,500,50,100] execVM "ws_cityinruins.sqf"; in the init

Note: Locality for this needs further testing, it might not be identical for all clients.

The ws_cityinruins.sqf:

// City in ruins mini script
// By Wolfenswan: wolfenswanarps@gmail.com
//
// Feature:
// Destroy a random selection of buildings and sets them on fire
//
// Usage:
// In the editor place a gamelogic with [this,300,50,50] execVM "ws_cityinruins.sqf" in the init.sqf
// Adjust values accordingly
//
// Customization:
// Second Number: radius around the gamelogic where buildings are affected
// Third number: chance in 100 that a building in the radius is destroyed
// Fourth number: chance in 100 that a destroyed building is burning
//
// Note:
// Not JIP-compatible

A simple but effective script to emulate artillery barrages without the need for placing actual units. It's highly customizable and all possible options are explained in the script itself further below.

To start it place markers for the targetlocations on the map and call
nul = [] execVM "ws_mortars.sqf"; during the mission. To end it use a trigger or a script to flag ws_shelling to false or exchange ws_shelling with a loopcounter in the script itself. Or remove the while wrap completely and call it every time you need something shelled to smithereens.

//Define these variables to your leisure
_targets = ["mortartarget_1"]; //the stuff you want to be shelled, have to be markers
_shell = "ARTY_Sh_81_HE"; //type of shell.
_illumshell = "F_40mm_red"; //illumination round. if set to "" this is ignored, otherwise every barrage will be announced by one illumination round
_illumsleep = 20; //how long the illumination round lingers in seconds before the real rounds hit
_frequency = 1500; //frequency of target changing in seconds
_barrages = 3; //minium number of barrages fired on one target before change
_extrabarrages = 1; //Up to this many more barrages could be fired
_timebetweenbarrages = 30; //the time in seconds between each single barrage
_shotsperbarrage = 4; //minimum shots/shells that come down per barrage
_extrashots = 2; //Up to this many more shells could come down
_disperson = 100; //the disperson of shells (0 = all spot on)
_height = 250; //the minium height where the shell will spawn (250 is good)

//These are needed for the script itself, don't alter these
if (isNil "ws_shelling") then {ws_shelling = true;};

You could also change _targets to = [_this select 0] and then call the script with nul = ["mytarget"] execVM "ws_mortars.sqf"; with, for example, a radio trigger. This could be used in an offensive mission to weaken a target/an area once.

Wolfenswan

05-10-2012, 03:03 PM

This is a simple script to improve vehicle behavior. They won't bail because of a broken tire but they will when all guns are destroyed.
This script creates a loop for every crewed vehicle on the map, by default for all sides, and requires F2 (but can easily be adapted not to). It's not fully tested so bugs might occur.