'Good to know' - tidbits of knowledge for mission makers

Workshop for all Mission Engineer Comrades. Home of the FA Mission Making Template.
Post Reply
User avatar
wolfenswan
Posts: 1209
Joined: Wed May 25, 2011 4:59 pm

'Good to know' - tidbits of knowledge for mission makers

Post by wolfenswan »

A collection of code snippets and editor knowledge. Please contribute.

Editor
  • If you're in the editor and have a scripting command highlighted, pressing F1 will bring up a small window explaining it, similar to the BI wiki.
  • Shift + Leftclick on a unit selects the unit's entire groups and all attached waypoints.
  • When having attached a waypoint to an object hold shift to select the object under the waypoint.
  • CTRL + SHIFT + V pasts a unit at exactly the location it was copied/cut from.
  • Group an object, a unit or group leader to a set of markers to have it spawn randomly at one of those locations.
  • ArmA 3 has an elevation option in the unit screen which saves you to use (getPos this select 0, getPos this select 1, z) over and over again.
  • If you want to change the side a group or unit belongs to give it leader of the desired side (e.g. a AAF soldier leading a CSAT group), make sure it has the highest rank in the group and set it's probability to 0%. The group will act as if it was part of the leader's side.
  • The "GUARD"-waypoint is a very useful but underused utility.
Code Snippets
  • Code: Select all

    this disableTIEquipment true
    - to disable Thermal Imaging
  • Code: Select all

    this lockDriver/lockTurret/lockCargo true
    - to lock various seats of a given vehicle
  • Code: Select all

    [group this,position this,50] call BIS_fnc_taskPatrol
    - put in the "On Activation" field of a group's move waypoint will order them to patrol in a random pattern, where the number at the end dictates the distances between each patrol spot.
  • Code: Select all

    this enableSimulation false
    - on vehicles to keep them from exploding even with damage 1. Useful if you need some make-shift cover for players but want something else than the usual wrecks.
  • Code: Select all

    [this,0, 90] call bis_fnc_setpitchbank;
    - to flip a vehicle on it's side. use 180 to flip it on it's back. Works best with cars, other vehicles might need their z-level to be adjusted to keep them from floating.
  • Code: Select all

    this setHit [getText(configFile >> "cfgVehicles" >> (TypeOf this) >> "HitPoints" >> "HitGlass1" >> "name"),1]};
    - On any vehicle (with glass windows) to damage those. Replace the last 1 with other numbers for various damage states. Try HitglassX with other numbers for different windows. Replace HitGlass1 with HitLFWheel for the left front wheel (also works with LBWheel, RFWheel, RBWheel) to damage wheels. Check the config entry of the super-glass of the vehicle you apply it to for more damageable areas
  • Code: Select all

     this setVectorUp(surfaceNormal(getPos this));
    - If you spawn something in and it is floating or not adjusting to elevation, chances are this will fix it.
  • Code: Select all

    unit setCaptive true
    - will stop the AI from recognizing the specific unit as hostile. The unit itself will still engage however.

Post Reply