Today is again a patch day! Thanks to your feedback on the last release candidates, I was able to fix most of the issues and even to make two additions Since, it’s more a fix than a release (as states the version number), no need to write a wall of text about it, so, enjoy […]
sqf
Stable release of Poseidon Tools today. No need to write additional text, past announcements (dev version) are here: Poseidon Tools development version 0.71 – Fixes Poseidon Tools dev update (0.71.1786) – Community Updater, fixes… As usual, feedback is appreciate (preferably on this thread), thanks! This is not an official tool, you bear the risk. In case […]
Second release of Poseidon Tools development branch! This development update should be the latest before the next stable release (0.72). As usual, there are some fixed issues like the performance problem caused by the bracket highlighter and some other minor issues. Regarding the additions, more the common update of functions and commands, Poseidon Tools continues its […]
Today is a special day! This is the very first time of a public release of a development version ! Like I already announced it in the last news, pair version numbers are public releases, and impairs are internal or development version, so here we go for the version development release version 0.71 rev 1526. It’s mostly […]
I must admit, this has been asked and requested many times and I was too lazy to publish something about it… But, today, I’m in holiday and have some free time to do it… The concept is pretty simple, it increases the fuel uptake taking into account the speed of the player vehicle. This script is […]
With some days of late, here the update of June, 0.69.1430. As usual you will find the new commands and functions for the latest version of Arma 3 but not only.Poseidon Tools begins to socialize with Mikero Tools, with a basic support for the moment. In the menu >> “External programs” >> “Mikero”, you will find […]
It’s time to update Poseidon Tools, this time, a little bit before the deadline  The bases of Poseidon Tools are now ready and next step will add more features. So, you can expect to new features, like SVN support (plus, maybe GIT) and some interactions with Arma 3 Tools, among others. Then, will come the turn of […]
Return a random value between min and max. Note that if #0 > #1, the function will swap vars. If the random result is lower than min, it returns the min. Same for the max value.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
/* Author: Tom_48_97 Description: Return a random value between min and max. Note that if #0 > #1, the function will swap vars. If the random result is lower than min, it returns the min. Same for the max value. Parameter(s): #0 NUMBER - The minimal value #1 NUMBER - The maximum value #2 BASE - Random result type: "round", "floor", "ceil", "float". Any other value will return a float Example of use: this setFuel ([0.2, 0.5] call tm4_fnc_random); this setPosATL [(getPosATL player select 0) + ([5, 10, "floor"] call bis_fnc_random), (getPosATL player select 1) + ([3, 7, "floor"] call bis_fnc_random), 0.1]; Returns: NUMBER - Integer or float */ private["_this", "_min", "_max", "_base", "_return"]; _min = [_this, 0, 0, [0]] call bis_fnc_param; _max = [_this, 1, 1, [0]] call bis_fnc_param; _base = toLower([_this, 2, "float", ["round", "floor", "ceil", "float"]] call bis_fnc_param); if !(typeName _min == typeName 0) exitWith { ["#0: Must be a NUMBER"] call bis_fnc_error; }; if !(typeName _max == typeName 0) exitWith { ["#1: Must be a NUMBER"] call bis_fnc_error; }; if (_min > _max) then { private ["_tmp1", "_tmp2"]; _tmp1 = _min; _tmp2 = _max; _max = _tmp1; _min = _tmp2; }; _return = random _max; if (_base == 'round') Then { _return = round(_return); }; if (_base == 'floor') Then { _return = floor(_return); }; if (_base == 'ceil' ) Then { _return = ceil(_return); }; if (_return < _min) Then { _return = _min + (random (_max - _min)); }; _return |
Sur “ArmA 2”, pas mal de level designer en herbe se demandent comment gĂ©nĂ©rer un effet de feu dans un niveau, voici une solution clĂ© en main. D’abord, le fichier de script, nommĂ© fx.fire.sqf :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
// File written by Julien V. // www.arma3.fr - www.tom4897.info #define posNul [0,0,0] #define mNbr2 [1,1,1,-1] #define partRandom1 [1.51, [1,1,0.3], [0.2, 0.2, 0.2], 0, 0.8, [0.05, 0.05, 0.05, 0], 0, 0] #define partRandom2 [0.2, [1, 1, 0.15], [0.3, 0.3, 1], 0, 0.3, [0, 0, 0, 0], 0, 0] #define ORANGE1 [1, 0.5, 0.4] #define ORANGE2 [0.8, 0.6, 0.2] _obj = _this select 0; _fire1 = "#particlesource" createVehicleLocal getpos _obj; _fire1 setdropinterval 0.03; _fire1 setParticleParams [["CaDataParticleEffectsUniversalUniversal", 16, 10, 32], "", "Billboard", 1, 0.7, posNul,[0, 0, 0.6], 0, 10, 7.9, 1, [2, 0.3], [[1,1,1,-0], mNbr2, mNbr2, mNbr2, mNbr2, [1,1,1,0]], [1], 1, 0, "", "", ""]; _fire1 setParticleRandom partRandom2; _smoke = "#particlesource" createVehicleLocal getpos _obj; _smoke setDropInterval 0.1; _smoke setParticleParams [["CaDataParticleEffectsUniversalUniversal", 16, 7, 48], "","Billboard",1, 5, posNul,[0, 0, 0.6], 0, 0.05, 0.04, 0.05, [0.5, 5], [[0.5, 0.5, 0.5, 0.1],[0.6, 0.6, 0.6, 0.2],[0.7, 0.7, 0.7, 0.08],[1,1,1, 0]], [0.8,0.3,0.25], 1, 0, "", "", _obj]; _smoke setParticleRandom partRandom1; _light = "#lightpoint" createVehicleLocal getpos _obj; _light setLightBrightness .048641; _light setLightAmbient ORANGE2; _light setLightColor ORANGE1; _light lightAttachObject [_obj, posNul]; _sound = createSoundSource ["Sound_Fire", getpos _obj, [], 0]; if (true) exiwith {}; |
Notre script crĂ©Ă©, la suite est on ne peut plus simple, il suffit d’ajouter le code suivant dans l’init […]
Il s’agit des principales base (Ă©quivalences) entre le SQS et le SQF puisque le SQS a Ă©tĂ© dĂ©clarĂ© obsolète ! Nota : J’avais jamais cliquĂ© “publier”, il est donc dans les cartons depuis 08/10/2010, dĂ©solĂ© :)