Announcement

Collapse
No announcement yet.

Arg Editors guide!!

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Arg Editors guide!!

    I swear, sometimes I read the Editors guide and while Mr Murray did a great job, sometimes I read sections and go "WHAT?????????" "Where the hell am I meant to put that?"

    Example...It took me 2 hours to work out how to create an incoming explosion. I had the code, I understood that, but there is no description as to what you put on the map in editor in order to place the code in the init line!?! Eventually I finally worked out on my own that you can use a "Game Logic" "Object" and place the code in that, but I think the whole guide is written with a sense of assumption that users already have a certain knowledge of how to use certain scripts.


    Now to some it may be painfully easy, but to people like me who really are not that gifted when it comes to scripting etc, I often pull my hair out trying to work out what "item" I am menat to use in order to paste the script.... Very annoying!

    Anyway.....this has thrown up my query.....

    I can now generate smoke, flares, explosions, however these are one time events from the moment the game launches.

    How do I make these multiple events, like flares relaunching, etc, or trigger based incoming explosions, i.e I dont want my game logic explosion to instantly go off, when the game stars, but I would like it to happen when say a player activates it by being near the strike zone?

    Any ideas, help please!?!

    Ta
    BD1
    BlackDog1




    "What we do in life... echoes in eternity!"

  • #2
    Re: Freakin Editors guide!!

    There are a couple of different ways to make an explosion go off when a unit activates it. The simplest, IMO, would be a trigger that activates when a unit activates it.
    For example, you can place a trigger down that is activated when BLUFOR is present.
    Set the radius you want the trigger to occupy. Axis A and B, default are 50 meters.
    In the activation field, select "Blufor". Ensure the "Present" box is selected
    Ignore the Countdown stuff for now, you could do a countdown, and I will cover it if you want me to, but for simplicity ignore it.
    The "type" should be "none"
    The name is what the game uses to reference to the trigger.
    The text is the text displayed when you place you mouse over the trigger in the editor.

    The real meat and potatoes of a trigger is the "On Act." (on activation) field. In this field, you can place code which is executed when the trigger is activated.
    Place this code into your trigger On Act. field
    [] exec "arty.sqs";
    This code tells the game to execute a script called "Arty.sqs"
    You need to make a script in your game folder that matches this name.

    Here is an example arty script with comments added (; in front)
    ;********Tells the game to wait for random 0 to 10 seconds
    ~random 10

    ;********Defines the target variables for the arty, where ARTYTAR is a gamelogic named such
    _Z = ARTYTAR
    _X = getPos _Z select 0;
    _Y = getPos _Z select 1;

    ;********Randomizes where the arty will land
    _X = _X+((random 200)-100);
    _Y = _Y+((random 200)-100);

    ;********This code creates a Heli pad that is invisible which will make the arty noise
    _H = "HeliHEmpty" createVehicle [_X,_Y] ;
    ~1
    ;********You must define the "Ari" sound in the description.ext
    _H say "Ari";
    ~2.5


    ;********This code creates the actual shell at the arty target. In this case, it is a FFAR missile impacting the ground
    "R_80mm_HE" createVehicle [_X,_Y,0] ;
    deleteVehicle _H;


    This kind of stuff can get real complicated, and the best way to learn is to read about how to do something, and then experiment on your own: see what works and what does not

    If you want me to, I can create a sample mission with a guide and post it, showing how to do this stuff.
    Hope this helped, might of confused you more :(.
    "Never forget that you are there to SERVE the soldiers. Listen to your NCOs and always do the right thing." -My Father
    "http://www.youtube.com/watch?v=wGNxHMFjigA"
    "http://www.youtube.com/watch?v=Ce0c6qVnJE4"
    "http://www.youtube.com/watch?v=i2Lpc9vTnqU"
    "http://www.youtube.com/watch?v=xEzc9fB8xPo"
    "http://www.youtube.com/watch?v=4tdCTP_ae_8"
    "http://www.youtube.com/watch?v=RrmoSZgYaFw"

    Comment


    • #3
      Re: Freakin Editors guide!!

      I feel your pain BD! Mr Murray did a good job but some of it just doesn't work or assumes you already know stuff. Why would you need a manual if you already know lol
      Jex.

      Comment


      • #4
        Re: Freakin Editors guide!!

        Keep up the Fight though!! The Scene needs map makers like yourself to keep it afloat..
        |TG|ARMA Pathfinder
        ..now where did I put my keys?

        Comment


        • #5
          Re: Arg Editors guide!!

          Thanks Igor,

          Already hit a bit of confusion. What exctly do you mean by "defining" "Ari" in the description ext? do I need to insert a sound file?

          Cheers Peardog, it's fun creating different scenarios, but I am come to learn that simple is often better, so I am trying to keep stuff really simple, it's just nice to throw in some similar RL challenges that troops on the ground face from time to time.

          BD1
          Last edited by Blackdog1; 02-09-2009, 09:34 PM.
          BlackDog1




          "What we do in life... echoes in eternity!"

          Comment


          • #6
            Re: Arg Editors guide!!

            Originally posted by Blackdog1-22 Reg.SAS View Post
            What exctly do you mean by "defining" "Ari" in the description ext? do I need to insert a sound file?
            It looks like Igor wanted you to be able to put in that "death whistle" sound of an incoming artillery shell before it hits. The "say" command will play a sound from a given source, then his code waits 2.5 seconds, then it creates the explosive. If you wanna do this, keep reading... otherwise just call me Super Nerd. I feel your pain for trying to learn things that aren't documented thoroughly enough, so I'll try to make this as annoyingly comprehensive as it needs to be.

            I wrote the rest of this post using http://community.bistudio.com/wiki/D...ion.ext#Sounds and my past experience as a guide.

            Sounds: There are three types of sound that can be specified:

            1. General sounds that can be used for dialog, voiceovers in the briefing etc. These sounds are caused in a mission by using the commands: say, or playSound
            2. ....radio
            3. ....music

            General Sounds: you have to define these in a "Code Block" called CfgSounds in your mission's Description.ext file. Each sound entry (called a class) has three important lines:

            Class name <--- this name, is what ArmA names the sound for use with "say" and "playsound" commands
            name = "???" <--- if you go into the Effects area of a trigger you may see this at the bottom of one of the sound lists, it allows you to select and play that sound when the trigger goes off
            sound[] = {"PATH TO SOUND", db level, speed/pitch multiplier};

            Possible needed content in the Description.ext file: (open/edit/create the file with notepad)
            Code:
            class CfgSounds
            {
             sounds[] = {};   
            
            
              class Ari
              {
               name = "Artillery incoming sound";
               sound[] = {"\sound\ArtyWhistle.ogg", db+10, 1};
               titles[] = {};
              };
            
              class Second_Sound_If_You_Wanted
              {
                ...etc.
              };
            
              class Third_Sound_If_You_Wanted
              {
                ...etc.
              };
            
            };
            Or learn it by ignoring all the B.S. I just said, and just try the crazy thing:

            -make a folder called "sound" in your mission's folder
            -find a sound and convert it to a low quality mono .ogg (I use GoldWave ... I think .wav's may work also, but they're massive files)
            -put that sound in the "sound" folder you made
            -put that code into your Description.ext file (EXCEPT the Second and Third sound entries, and their empty code blocks)
            -LOAD or RE-SAVE your mission in the editor --> it only "looks at" the Description.ext file when you do one of those two things.
            -run Igor's script... it should play that sound from the "invisible helo" thingy it made.

            Phew. lot of work for one sound eh? If you do it a few times it gets pretty easy/fast. Let us know how you do.

            Comment


            • #7
              Re: Arg Editors guide!!

              Originally posted by Homer Johnston View Post
              It looks like Igor wanted you to be able to put in that "death whistle" sound of an incoming artillery shell before it hits. The "say" command will play a sound from a given source, then his code waits 2.5 seconds, then it creates the explosive.
              Thats exactly what I wanted. Basically, you have to use a custom sound file as there is not a "screaming" shell sound in basic Arma.
              You could opt out of using a sound however.
              "Never forget that you are there to SERVE the soldiers. Listen to your NCOs and always do the right thing." -My Father
              "http://www.youtube.com/watch?v=wGNxHMFjigA"
              "http://www.youtube.com/watch?v=Ce0c6qVnJE4"
              "http://www.youtube.com/watch?v=i2Lpc9vTnqU"
              "http://www.youtube.com/watch?v=xEzc9fB8xPo"
              "http://www.youtube.com/watch?v=4tdCTP_ae_8"
              "http://www.youtube.com/watch?v=RrmoSZgYaFw"

              Comment


              • #8
                Re: Arg Editors guide!!

                Fantastic fellas, well done, you both get a credit in "The Street Sweeper" V3..... Mortar rounds now doing exactly as I wanted.

                Thanks
                BD1
                Last edited by Blackdog1; 02-11-2009, 06:07 AM.
                BlackDog1




                "What we do in life... echoes in eternity!"

                Comment


                • #9
                  Re: Arg Editors guide!!

                  Props to you BD1, those mortar sounds are incredible. Just sucks to get hit by one :-(
                  |TG-Irr|Duc748s

                  sigpic

                  Comment


                  • #10
                    Re: Arg Editors guide!!

                    I did a similar script a while back and discovered that if I am simulating a mortar attack I have to reset the X and Y coordinates or the rounds will drift further away from the initial position with each shot. In the case below, you'll see that I used a marker for the initial position (although this can certainly be changed) and I have a GameLogic elsewhere on the map with the following initialization:

                    null = [] execVM "scripts\MortarAttack.sqf"

                    The code is as follows:

                    _pos = getMarkerPos "MortarAttackPos";
                    _radius = 100;
                    _numrounds = 3 + (random 15);
                    _numflares = 1;
                    sleep (random 300);
                    while { _numflares<(1+(random 2)) } do
                    {
                    _pos = [(_pos select 0)+_radius/2-random _radius,(_pos select 1)+_radius/2-random _radius, _pos select 2];
                    _mortar = "F_40mm_Yellow" createVehicle [_pos select 0, _pos select 1, 300];
                    _pos = getMarkerPos "MortarAttackPos";
                    _numflares = _numflares+1;
                    sleep (random 3);
                    };
                    while { _numrounds>1 } do
                    {
                    _pos = [(_pos select 0)+_radius/2-random _radius,(_pos select 1)+_radius/2-random _radius, _pos select 2];
                    _mortar = "G_40mm_HE" createVehicle [_pos select 0, _pos select 1, 100];
                    _pos = getMarkerPos "MortarAttackPos";
                    _numrounds = _numrounds-1;
                    sleep (random 3);
                    };
                    exit;

                    In this case, I was trying for a one-time attack on a fixed position. As you can see, I initialized the script as the mission started (rather then a trigger) and to add to the randomness of the mission, the GameLogic with the init code only had a 60% chance of spawning. So 60% of the times the mission is run, during the first 300 seconds you can get a mortar attack that starts with 1 - 3 flares for targeting, followed by 3 - 18 40mm rounds simulating mortars with up to three seconds between each shot. I tried it with the 80mm rockets but couldn't get it to work for some reason.

                    One thing I do with these type of scripts is load up the Desert Island map - it's flat and has a few nice little hills that one can stand on to view the results of one's latest script or other efforts.

                    Also, depending on the mission, you may even add in a bit extra with 105mm arty rounds impacting somewhere near the action - at least near enough to hear but not otherwise impact the gameplay - to simulate counterbattery fire.

                    -BoD
                    BarnacleofDoom

                    One shot - One miss!

                    Comment


                    • #11
                      Re: Arg Editors guide!!

                      Oh, counter battery. Now if you could script that, it would be the heat!!
                      "The chief foundations of all states, new as well as old or composite, are good laws and good arms; and as there cannot be good laws where the state is not well armed, it follows that where they are well armed they have good laws." -Machiavelli

                      Comment


                      • #12
                        Re: Arg Editors guide!!

                        That's so far beyond my scripting abilities it isn't even funny... It should be easy simulate, but actually figuring out a counter battery script?

                        Hmm... wonder if ofpec has anything.
                        BarnacleofDoom

                        One shot - One miss!

                        Comment


                        • #13
                          Re: Arg Editors guide!!

                          Hey,
                          i see all here will use Mr. Murray's Editig guide but it is not realy good for scripter - no Syntax documation.
                          There is a other one from Alex Sworn called ArmedManualv213.pdf - it is better.
                          The Link on Armaholic is death but you will find it in Google if you search for "University of Paraiso".

                          Laki
                          Feind erkannt - Gefahr gebannt!

                          Comment


                          • #14
                            Re: Arg Editors guide!!

                            Here is the download link:
                            http://www.file-upload.net/download-...lv213.rar.html

                            However...my understanding of German is small to say the least! ;)

                            Is there an English version?

                            BD1
                            BlackDog1




                            "What we do in life... echoes in eternity!"

                            Comment


                            • #15
                              Re: Arg Editors guide!!

                              yes but the link is temp down.
                              armamdb.de/phpkit/include.php?path=content/content.php&contentid=779

                              if i find it i will post it...
                              Laki
                              Feind erkannt - Gefahr gebannt!

                              Comment

                              Connect

                              Collapse

                              TeamSpeak 3 Server

                              Collapse

                              Advertisement

                              Collapse

                              Twitter Feed

                              Collapse

                              Working...
                              X