Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
This will force all popup targets to stay down after being hit.
If you wish to apply this popup behavior to only specific targets, you can place the following line in each of target's Init field that you want to have this behavior.
Second, every popup target you place give a name.
Third, in the trigger On Activation field enter the following:
It will reset the specified target's health (assuming it was shot), and the second line will make the specified target pop up again.
It must go into your init.sqf file, and it will apply to every target. Every mission should include init.sqf and description.ext files. It is where the rules of the mission are established. Such as forcing all popup targets to stay down when shot. Or establishing respawn/revive rules, or music playlists, etc.
If you only want to effect just one target, and not modify the init.sqf file, then use the line:
Put the above line of code into the Init field of each target you wish to effect.
Yes. If you name your popup target "T12" then in the On Activation field of the trigger should include:
That will reset the target, undoing any damage and popping the target back up. You can place the trigger anywhere. It does not have to be near the popup target.
Also also, does this apply to proximity triggers as well? Or is that what I should assume when you say "trigger"? cuz I'm gonna have 1m*1m squares set up using cones on the corners and I want a trigger inside it to make them pop up per checkpoint.
And last thing, how could I go about making a timer start when you pass the opening gate and stop once you step into the final checkpoint?
The init.sqf file can be used for a lot of mission critical things, including creating your own functions. I use it to establish the relationships between sides. For example:
Placing this code segment into your init.sqf file will make everyone hate everyone and consider them the enemy. To make someone a friend, just change the appropriate value from 0 to 1.
I also commonly use the init.sqf to establish my music lists, the briefings, and the initial task(s) for the mission. It is also a good location to create markers, triggers, or any other dynamic component you wish to introduce, because it all happens before the mission starts.
The Description.ext file contain information about the mission, how it will be played, and even its appearance to some extent. For example, a Description.ext might contain:
All .EXT and .SQF files are plain text and can be edited with note pad. You can also get an Arma specific editor from: https://www.armaholic.com/page.php?id=1455
SQM files are mission files and can be either plain text or a pseudo-compiled binary. Once it has been compiled into a binary the SQM file is not editable via notepad. So don't compile the mission file until you have completed and tested the mission.
The mission.sqm, init.sqf, and Description.ext all need to reside in the same root mission folder. However, you may use sub-folders for all other files if you reference them correctly.
Sometimes the "barebone minimum" is not the best choice. You could set the nopop variable for each and every target by putting it into each target's Init field - the "barebone minimum" approach. Or you could add just one small line in your init.sqf file that effects all targets, which is a smarter approach.
In both cases you are adding a script. The question becomes how many times do you want to repeat the same script?
And what'd make it as good as I possibly can is making a timer for when you start and finish, as well as a point system to assess accuracy maybe (though, that's probably pretty out there).
In the laptop's Init field create an array (PopupTarget) that contains the names you gave each of the targets.
When the player selects the action from the laptop the script will cycle through the names of the targets you provided, reset their damage, and popup them back up into position again.
The above script also relies on the "nopop" global variable being set to true either in the init.sqf or with each individual target, as you see fit.
Sometimes using a separate file for your scripts is useful, because it allows you to use those same scripts multiple times, or with other missions, without having to copy/paste them each time you want to use them. Like resetting popup targets, or refueling vehicles, or HALO jumps, for example. Those are features you will most likely use in multiple missions. I found it convenient to consolidate the scripts that I use regularly into separate files. That way I can easily add the features I want to any mission I create.
If you really want to get fancy, you can add the following EventHandler to the Init field of each popup target. It will place a small (10 cm) yellow sphere over the exact position where your round impacted the target. This EventHandler will also work with vehicles and other objects. It is not exclusive to popup targets.
Use
For example, if you want to display where the target was hit for just 15 seconds, you could say:
The small sphere will stay where the round impacted the target, even after the target drops.
The createVehicle and deleteVehicle functions are used to create and destroy any object in the mission.
The setPosASL (Set Position Above Sea Level) function places the "Sign_Sphere10cm_F" object where the object was struck.
The sleep function just pauses the script for the specified number of seconds.
The sample code I provided is merely my interpretation of how I might go about the task you described, it doesn't mean there are not other ways, or even better ways, of doing the same thing.
I hope this is a topic you're interested in because of all the questions I'm asking lol, I've wanted to learn ArmA scripting for a while now but the youtube videos just weren't doing it for me.