Announcement

Collapse
No announcement yet.

This is ArmA

Collapse
X
Collapse
First Prev Next Last
 
  • Filter
  • Time
  • Show
Clear All
new posts

    This is ArmA

    Hi Folks,

    My other "sim".

    For those interested - just how I enjoy ArmA - again - it's not really a scripted game - just a sandbox that provides terrains and assets - where you design the mission/campaign.

    My opening sequence for a mission I'm making.





    Just an example of the scripting language - this facilitates the crash shown in the video:

    Code:
    //==========================//
    // Helicopter Crash Script  //
    //==========================//
    
    // Author: scottb613
    // File: SCOheliCrash.sqf
    
    // Note: Only tested in single player.
    
    // Given: "_heli" must be set to the variable name given to the helicopter to be crashed.
    // Given: Intended use - fired by trigger ===>>>         [] execVM "Scripts\SCOheliCrash.sqf";
    
    //=============================================================================================//
    //=============================================================================================//
    
    // Set to variable name assigned to helicopter
        private _heli = slick1;
    //-
    
    //private _groupMembers = units _heli;
    
    // Sound Explosion
        playSound3D ["a3\sounds_f\weapons\explosion\explosion_satchel1.wss", player, true, (_heli getPos [15, getDir _heli]) vectorAdd [0, 0, 5], 5, 1, 0];
    //--
    
    // Helicopter Setup
        _heli setDamage .98;
        _heli setHitPointDamage ["HitHRotor",1];
        _heli setHitPointDamage ["HitVRotor",.95];
        _heli setHitPointDamage ["HitEngine",.99];
        _heli allowDamage false;
    //--
    
    // Particle Effect Fire
        private _ps1 = "#particlesource" createVehicleLocal (position _heli);
        _ps1 attachto [_heli, [0,0,0]];
        _ps1 setParticleParams [
            ["\A3\Data_F\ParticleEffects\Universal\Universal", 16, 12, 0, 8], "", "Billboard",
            1, 3, [0, 0, 0], [0, 0, 2], 0, 1, 1, 0.5, [1, 3],
            [[1,0.5,0,1], [1,0.2,0,0.5], [0.5,0.1,0,0]],
            [0.5, 1], 1, 1, "", "", _ps1];
        _ps1 setParticleRandom [0.4, [1, 1, 1], [0.5, 0.5, 0.5], 0.4, 0.4, [0, 0, 0, 0], 0, 0];
        _ps1 setDropInterval 0.03;
    //--
    
    // Particle Effect Smoke
        private _ps2 = "test_EmptyObjectForSmoke" createVehicle (position _heli);
        _ps2 attachto [_heli, [0,0,0]];
    //--
    
    // End Fire
        sleep 3;
        deleteVehicle _ps1;
    //--
    
    // Destroy Helicopter
        waituntil {isTouchingGround _heli};
        sleep 1;
        _heli allowDamage true;
        sleep 1;
        _heli setDamage 1;
    //--
    
    // End Smoke
        sleep 60;
        deleteVehicle _ps2;
    //--​

    Regards,
    Scott
    <a href=https://www.trainsim.com/forums/filedata/fetch?filedataid=80663&type=full title=thumb_80663.png >thumb_80663.png</a>​ My Blender Models

    #2
    That's programmed, eh? Looks great.
    If you like what you see here at Trainsim.com, be it the discussions and knowledge in the forums, items saved in our library or the ongoing development of our TSRE Fork, I hope you'll consider a paid membership to help support keeping the site operating.... Thanks!

    Comment


      #3
      Originally posted by eric View Post
      That's programmed, eh? Looks great.
      Hi Eric,

      Yeah - they've built a massive programming language to do just about everything in ArmA. A big part of my enjoyment is writing scripts for ArmA and seeing the "sim" behave as scripted. I'm not a real programmer but I like Unix shell - when I'm here I use (Cygwin) to automate almost every step of my model making process - after export.

      Thanks for taking the time.

      Example ORTS Model Export (Cygwin Bsh):
      Code:
      #!/bin/bash
      #Acceptable Command Line Arguments -
      
      declaration () {
          ROUTE="ConnRiv"
          MSTSPATH="F:\MSTS Mini Fast\CT River\Train Simulator\Trains\Trainset"
          
          DOSCVSPATH="C:\Users\N63503\Documents\Blender\BM482"
          CVSPATH="/cygdrive/c/N63503/Documents/Blender/BM482"
          
          DOSEXPPATH="C:\Users\N63503\Documents\Blender\BM482\SCO_BM482"
          EXPPATH="/cygdrive/c/N63503/Documents/Blender/BM482/SCO_BM482"
          
          DOSRTEPATH="F:\MSTS Mini Fast\CT River\Train Simulator\Trains\Trainset\SCO_BM482"
          RTEPATH="/cygdrive/f/MSTS Mini Fast/CT River/Train Simulator/Trains/Trainset/SCO_BM482"
          
          NVDXT="/cygdrive/e/MSTS Tools/DDS Utilities/nvdxt.exe"
          
          TXT2UNI="/cygdrive/e/MSTS Tools/UTILS/txt2uni.exe"
          
          LOG=/home/N63503/tmp/ddslog.txt
      }
      
      createtexture () {
          #Remove Textures
          cd "${DOSCVSPATH}"
          rm ./*.ace 2>/dev/null
          rm ./*.dds 2>/dev/null
          cd "${DOSEXPPATH}"
          rm ./*.ace 2>/dev/null
          rm ./*.dds 2>/dev/null
          
          #Remove Shapes
          rm ./*.s 2>/dev/null
      
          #Make DDS
          echo ""
          echo "Process [TXT 0512] Default"
          "${NVDXT}" -box -u888 -file "${DOSCVSPATH}\Default.tga" -outdir "${DOSEXPPATH}"
          
          echo ""
          echo "Process [TXT 0512] ExpLink"
          "${NVDXT}" -box -u888 -file "${DOSCVSPATH}\explink.tga" -outdir "${DOSEXPPATH}"
          
          echo ""
          echo "Process [TXT 0512] Piston"
          "${NVDXT}" -box -u888 -file "${DOSCVSPATH}\Piston.tga" -outdir "${DOSEXPPATH}"
      
          echo ""
          echo "Process [TXT 4096] Prime"
          "${NVDXT}" -box -u888 -file "${DOSCVSPATH}\Prime.tga" -outdir "${DOSEXPPATH}"
      
          echo ""
          echo "Process [TXT 2048] PrimeFlat"
          "${NVDXT}" -box -u888 -file "${DOSCVSPATH}\PrimeFlat.tga" -outdir "${DOSEXPPATH}"
          
          echo ""
          echo "Process [TXT 1024] TruckLead"
          "${NVDXT}" -box -u888 -file "${DOSCVSPATH}\TruckLead.tga" -outdir "${DOSEXPPATH}"
          
          echo ""
          echo "Process [TXT 1024] TruckTrail"
          "${NVDXT}" -box -u888 -file "${DOSCVSPATH}\TruckTrail.tga" -outdir "${DOSEXPPATH}"
          
          echo ""
          echo "Process [TXT 0512 EMISSIVE] HotCoals"
          "${NVDXT}" -box -u888 -file "${DOSCVSPATH}\HotCoals.tga" -outdir "${DOSEXPPATH}"
          
          echo ""
          echo "Process [TXT 0064 EMISSIVE] NumBrdLight"
          "${NVDXT}" -box -u888 -file "${DOSCVSPATH}\NumBrdLight.tga" -outdir "${DOSEXPPATH}"
          
          echo ""
          echo "Process [TXT 0128 ALPHA] NumBrdAlpha"
          "${NVDXT}" -box -dxt3 -file "${DOSCVSPATH}\NumBrdAlpha.tga" -outdir "${DOSEXPPATH}"
          
          echo ""
          echo "Process [TXT 2048] Parts"
          "${NVDXT}" -box -u888 -file "${DOSCVSPATH}\Parts.tga" -outdir "${DOSEXPPATH}"
      
          echo ""
          echo "Process [TXT 0256] Bell"
          "${NVDXT}" -box -u888 -file "${DOSCVSPATH}\Bell.tga" -outdir "${DOSEXPPATH}"    
          echo ""
          echo "Process [TXT 0512] Rods"
          "${NVDXT}" -box -u888 -file "${DOSCVSPATH}\Rods.tga" -outdir "${DOSEXPPATH}"
          
          echo ""
          echo "Process [TXT 1024] Boxpok14"
          "${NVDXT}"  -box -u888 -file "${DOSCVSPATH}\Boxpok14.tga" -outdir "${DOSEXPPATH}"
          
          echo ""
          echo "Process [TXT 1024] Boxpok2"
          "${NVDXT}"  -box -u888 -file "${DOSCVSPATH}\Boxpok2.tga" -outdir "${DOSEXPPATH}"
          
          echo ""
          echo "Process [TXT 1024] Boxpok3"
          "${NVDXT}"  -box -u888 -file "${DOSCVSPATH}\Boxpok3.tga" -outdir "${DOSEXPPATH}"
      
          echo ""
          echo "Process [TXT 1024] Drive14"
          "${NVDXT}"  -box -u888 -file "${DOSCVSPATH}\Drive14.tga" -outdir "${DOSEXPPATH}"
          
          echo ""
          echo "Process [TXT 1024] Drive2"
          "${NVDXT}"  -box -u888 -file "${DOSCVSPATH}\Drive2.tga" -outdir "${DOSEXPPATH}"
          
          echo ""
          echo "Process [TXT 1024] Drive3"
          "${NVDXT}"  -box -u888 -file "${DOSCVSPATH}\Drive3.tga" -outdir "${DOSEXPPATH}"
      
          echo ""
          echo "Process [TXT 0512] Wheel_B1"
          "${NVDXT}"  -box -u888 -file "${DOSCVSPATH}\Wheel_B1.tga" -outdir "${DOSEXPPATH}"
          
          echo ""
          echo "Process [TXT 0512] Wheel_B2"
          "${NVDXT}"  -box -u888 -file "${DOSCVSPATH}\Wheel_B2.tga" -outdir "${DOSEXPPATH}"
          
          echo ""
          echo "Process [TXT 0256 ALPHA] Glass"
          "${NVDXT}"  -box -dxt5 -file "${DOSCVSPATH}\Glass.tga" -outdir "${DOSEXPPATH}"
          
          echo ""
          echo "Process [TXT 2048] TA_Prime"
          "${NVDXT}" -box -u888 -file "${DOSCVSPATH}\TA_Prime.tga" -outdir "${DOSEXPPATH}"
              
          echo ""
          echo "Process [TXT 2048] TA_PrimeFlat"
          "${NVDXT}" -box -u888 -file "${DOSCVSPATH}\TA_PrimeFlat.tga" -outdir "${DOSEXPPATH}"
          
          echo ""
          echo "Process [TXT 1024] TA_Bogies"
          "${NVDXT}"  -box -u888 -file "${DOSCVSPATH}\TA_Bogies.tga" -outdir "${DOSEXPPATH}"
                  
          echo ""
          echo "Process [TXT 0512] TA_Wheel"
          "${NVDXT}"  -box -u888 -file "${DOSCVSPATH}\TA_Wheel.tga" -outdir "${DOSEXPPATH}"
          
          echo ""
          echo "Process [TXT 0512] TD_Wheel"
          "${NVDXT}"  -box -u888 -file "${DOSCVSPATH}\TD_Wheel.tga" -outdir "${DOSEXPPATH}"
      
          echo ""
          echo "Process [TXT 0256 REPEAT] PipesLight"
          "${NVDXT}" -box -u888 -file "${DOSCVSPATH}\PipesLight.tga" -outdir "${DOSEXPPATH}"
      
          echo ""
          echo "Process [TXT 0256 REPEAT] PipesDark"
          "${NVDXT}" -box -u888 -file "${DOSCVSPATH}\PipesDark.tga" -outdir "${DOSEXPPATH}"
          
          echo ""
          echo "Process [TXT 0512 REPEAT] CoalLoad"
          "${NVDXT}" -box -u888 -file "${DOSCVSPATH}\CoalLoad.tga" -outdir "${DOSEXPPATH}"    
      
          echo ""
          echo "Process [TXT 0512] Crew"
          "${NVDXT}" -box -u888 -file "${DOSCVSPATH}\Crew.tga" -outdir "${DOSEXPPATH}"      
      
      }
      
      fixshape () {
          echo ""
          echo ""
          echo "    Fix Shape Animations..."
          cd "${DOSCVSPATH}"
          
          dos2unix ./BM482A.s > /dev/null 2>/dev/null
          dos2unix ./BM482A_T.s > /dev/null 2>/dev/null
          
          dos2unix ./BM482D.s > /dev/null 2>/dev/null
          dos2unix ./BM482D_T.s > /dev/null 2>/dev/null
          
          # Fix 16 Frame Animation
          
          echo ""
          echo "Fix model A locomotive 16 frame animation..."
          
          sed -- 's/animation ( 16 30/animation ( 16 60/' ./BM482A.s > ./TMPBM482A.s
          mv ./TMPBM482A.s ./BM482A.s
          
          echo ""
          echo "Fix model D locomotive 16 frame animation..."
          
          sed -- 's/animation ( 16 30/animation ( 16 60/' ./BM482D.s > ./TMPBM482D.s
          mv ./TMPBM482D.s ./BM482D.s
      }
      
      makeunit () {
          echo ""
          echo "    Make Units..."
          cd "${DOSCVSPATH}"
          for unit in 35 36 37
          do
              #Loco
              echo "        - Building ${unit}..."
              echo "        image ( 282AlphaCab_${unit}.ace )" > line.txt
              sed -- '/image ( 282AlphaCab.ace )/ {
                  r line.txt
                  d
                  }' ./BM482A.s > ./BM482A_${unit}.s
              "${TXT2UNI}" ./BM482A_${unit}.s > /dev/null 2>/dev/null
              mv ./BM482A_${unit}.s "${DOSEXPPATH}"
      
              #Tender
              echo "        image ( T_282Prime_${unit}.ace )" > line.txt
              sed -- '/image ( T_282Prime.ace )/ {
                  r line.txt
                  d
                  }' ./BM482A_T.s > ./BM482A_${unit}T.s
              "${TXT2UNI}" ./BM482A_${unit}T.s > /dev/null 2>/dev/null
              mv ./BM482A_${unit}T.s "${DOSEXPPATH}"
              done
              rm ./line.txt
              cp ./coal.s "${DOSEXPPATH}"
              cp ./crew.s "${DOSEXPPATH}"
      }
      
      copyshape () {
          cd "${DOSCVSPATH}"
          
          unix2dos ./BM482A.s > /dev/null 2>/dev/null
          unix2dos ./BM482A_T.s > /dev/null 2>/dev/null
          
          unix2dos ./BM482D.s > /dev/null 2>/dev/null
          unix2dos ./BM482D_T.s > /dev/null 2>/dev/null
          
          "${TXT2UNI}" ./BM482A.s > /dev/null 2>/dev/null
          "${TXT2UNI}" ./BM482A_T.s > /dev/null 2>/dev/null
          
          "${TXT2UNI}" ./BM482D.s > /dev/null 2>/dev/null
          "${TXT2UNI}" ./BM482D_T.s > /dev/null 2>/dev/null
          
          "${TXT2UNI}" ./coal.s > /dev/null 2>/dev/null
          "${TXT2UNI}" ./crew.s > /dev/null 2>/dev/null
          
          cp ./BM482A.s "${DOSEXPPATH}"
          cp ./BM482A_T.s "${DOSEXPPATH}"
      
          cp ./BM482D.s "${DOSEXPPATH}"
          cp ./BM482D_T.s "${DOSEXPPATH}"
          
          cp ./coal.s "${DOSEXPPATH}"
          cp ./crew.s "${DOSEXPPATH}"
      }
      
      compshape () {
          echo ""
          echo "    Compress Shapes..."
          java TSUtil fmgr -s -c "${DOSEXPPATH}" "${DOSEXPPATH}" | tee -a ${LOG}
      }
      
      copyprod () {
          echo ""
          echo "    Copy Files to CT River..."
          cd "${MSTSPATH}"
          rm -r ./SCO_BM482 2>/dev/null
          mkdir ./SCO_BM482
          cd "${DOSEXPPATH}"
          cp -r ./* "${MSTSPATH}"/SCO_BM482
      }
      
      cleanup () {
          echo ""
          echo "    Start Cleanup..."
          cd "${DOSCVSPATH}"
          "${TXT2UNI}" "${RTEPATH}" > /dev/null 2>/dev/null
      }
      
      ###START###
      declaration
      date > ${LOG}
      createtexture
      fixshape
      #makeunit
      copyshape
      compshape
      copyprod
      cleanup
      date >> ${LOG}
      ###END####​
      Regards,
      Scott
      Last edited by scottb613; 08-16-2024, 05:35.
      <a href=https://www.trainsim.com/forums/filedata/fetch?filedataid=80663&type=full title=thumb_80663.png >thumb_80663.png</a>​ My Blender Models

      Comment

      Working...
      X