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

Kill your comrades. Wholesale
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
  • 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.
  • 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.
  • Making several units 'playable' at once.
Code Snippets
  • Code: Select all

    (getPos this select 0, getPos this select 1, <elevation level>
    in a unit init to elevate it (e.g. onto rooftops)
  • Code: Select all

    this disableTIEquipment true
    - to disable Thermal Imaging
  • 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 lockDriver/lockGunner/lockCargo true
    - to lock various seats of a given vehicle
  • 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

    onMapSingleClick "player setPos _pos"
    - type this in the DebugConsole to enable teleporting on map-click.

    Code: Select all

    onMapSingleClick ""
    to disable
  • Code: Select all

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

Post Reply