-
Content Count
7379 -
Joined
-
Last visited
-
Medals
-
Medals
Everything posted by pierremgi
-
That's normal. You're in safeZone coordinate (the best one), so: x = 0 * safezoneW + safezoneX; >> is at left edge of your screen x = 1 * safezoneW + safezoneX; >> is at right edge of your screen (and your box/text doesn't appear any more if starting here) y = 0 * safezoneH + safezoneY; >> is at upper edge of your screen y = 1 * safezoneH + safezoneY; >> is at bottom edge of your screen (and your box/text doesn't appear any more if starting here) w = 0.153594 * safezoneW; >> 15% of the width h = 0.141 * safezoneH; >> 14% of the height You can change the position (even dynamically) referring to the control (passed by uinamespace variable as i showed you, if you script some new coordinate with: ctrlsetPostion But, furthermore, as i wrote you, if board (i guess background) and killfeed (I guess result text) are supposed to be displayed at the same time, just group the 2 control (idc) in one display (idd , called by uinamespace variable, you can let it to idd = -1). Then make 2 different choices for your idc 1001 , 1002 something easy to find with a search tool! Example: dizableserialization // if not yet done _yourBoard = (uiNameSpace getVariable "killfeed_board") displayCtrl 1001; // 0 for you _orbe ctrlSetPosition [0.05 * safeZoneW + safeZoneX, 0.75 * safezoneH + safezoneY, 0.1 * safezoneW, 0.1 * 1.77778 * safezoneH]; _orbe ctrlSetTextColor <some rgba color>; _orbe ctrlSetText "some.paa"; // or nothing if a box _orbe ctrlCommit 0; // instantaneously move the control from hpp position to this new position (you can delay it with another value) // mandatory Don't forget, the cutRSC but be written BEFORE all work on controls (ctrlSet... commands).
-
Interesting! So my questions are: Is there a difference between a dirt track and a road? If not, is a tank able to enter a dirt track and then, endless bump at each rock, tree? If there a difference between a tank and a car in term of path choice (same behavior/careless)? or all vehicles are only preferRoads = true; ? didn't find something else.
-
Firing at a can (named cible): For a sniper, gunner, but single burst (what ever the weapon mode could be!): in init field of the shooter (adapt for script apart): 0 = this spawn { while {alive _this} do { _this doTarget cible; sleep 2; if (_this ammo (currentWeapon _this) == 0) then {_this addMagazine currentMagazine _this}; _this forceWeaponFire [currentWeapon _this,"manual"]; sleep 2; _this lookAt cible ; sleep 2; } }; For a MG, use dosuppresiveFire instead: 0 = this spawn { while {alive _this} do { _this doTarget cible; sleep 2; if (_this ammo (currentWeapon _this) == 0) then {_this addMagazine currentMagazine _this}; _this doSuppressiveFire cible; sleep 2; _this lookAt cible ; sleep 2; } }; To go one step further: For an accurate shoot on a target (firing range), it's far more difficult. I succeed with this kind of code, pretty demanding for finding the good value: Say for a target popup (named cible) at 150 m 0 = this spawn { while {alive _this} do { _this doTarget cible; waitUntil {cible animationPhase "Terc" == 0}; _time = diag_tickTime; sleep 2; if (_this ammo (currentWeapon _this) == 0) then {_this addMagazine currentMagazine _this}; if ((_this weaponDirection (currentWeapon _this) vectorCos ((position cible) vectorDiff (eyepos _this))) > 0.991 min (0.975 + (0.00024 *(_this distance cible)))) then { _this forceWeaponFire [currentWeapon _this,"single"]; waitUntil {cible animationPhase "Terc" == 1 or diag_tickTime > _time + 10}; } else { _this lookAt cible }; sleep 3; } } Change 0.991 by any value <1. If too close from 1, accuracy is sharp but your unit will never fire. On the other hand, the less value, the more spilled bullets. Probably better workaround but no idea at this time. Keep on mind, if no sway at all, this could be hard to meet the condition also. Any improvement greatly appreciated.
-
resync respawned vehicle to support module
pierremgi replied to feldmaus's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Normally, it's far batter to use the vehicle respawn module (with createVehicleCrew inside of expression) . It throws the variable name to the new vehicle (just test the variable still exists on this object (target it, and read cursortarget in a debug console watch line). If not, you must apply the new variable (local or not, resulting of the createVehicle) to be applied on your link. Anyway, in both case, use [_unit,_requseter,_support] call BIS_fnc_addSupportLink; instead. This function works better; -
-
Are you sure your trigger (the one linked to the closest "move" waypoint") is not activated at start? I don't have any issue with that.
- 5 replies
-
- triggers
- mission editing
-
(and 1 more)
Tagged with:
-
You don't need to set on activation: BLUFOR. The OPFOR will guard the trigger(s)' point(s) "guarded by" against all enemies, with priority order (1st trigger position, then 2nd trigger position).. If you don't want your vehicle start and reach the "guarded by" wpt, you need to place another one wpt "move" , first one, close to the vehicle, then a trigger with you condition you want, linked to the waypoint "move".(setwaypoint activation). Some good readings: https://community.bistudio.com/wiki/Waypoint_types#Guard https://community.bistudio.com/wiki/Waypoint:Guard https://community.bistudio.com/wiki/Eden_Editor:_Trigger Note also the "skip waypoint" type for a trigger. Useful to break a guard posture.
- 5 replies
-
- triggers
- mission editing
-
(and 1 more)
Tagged with:
-
[SOLVED] Squad hold until helicopter land
pierremgi replied to 4K.Scar's topic in ARMA 3 - MISSION EDITING & SCRIPTING
2 options? My Eden is broken. If you script use synchronizeWaypoint (a bit confusing). -
respawn only the ai soldiers that died?
pierremgi replied to sabot10.5mm's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I wrote a little script on your idea. -
Calculating the distance a Bomb would travel.
pierremgi replied to crewt's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I can't test that right now (I'm on another script) but I imagined to register some free-fall trajectory, from high altitude (I guess there is no atmosphere variation in Arma) , with the ffur2007slx2_5 method (note). (data recovery) In a second time, apply this bunch of data with the command, from anywhere, until the simulated projectile hits the ground. Not sure it works and in all cases (init speed, init pitch..) But if some constants could be extracted/identified then applied in this king of command, this could be fine to simulate the trajectory and obtain the hit point. -
[SOLVED] Squad hold until helicopter land
pierremgi replied to 4K.Scar's topic in ARMA 3 - MISSION EDITING & SCRIPTING
In editor, between 2 waypoints, there is just one solution: "set waypoint activation". Difficult to test something else. -
Calculating the distance a Bomb would travel.
pierremgi replied to crewt's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Just wondering if you're in a "framed" or "cycled" , so you're working on dt (differential time), not t (time). So, why not use speed differences (dv) and apply a non-physic formula but a command, based on a test with https://community.bistudio.com/wiki/setVelocityTransformation Not tested yet. " It can be used as a position tracker with all necessary information collected, copied and then released within one function. " -
Determine if an entry parameter is array or a string
pierremgi posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hi, I can't remember where I read something about that. I didn't find after several hours of seach on BIKI and forums, how to manage an entry parameter which could have several format like string or array. For example: params [ ["_firstParam", "trial", ["",["","","",""]] ], ...., ["_otherParam", 0, [0]], ["_lastParam", true, [true]] ]; Not sure to write this first param at its best... I'd like to let the player enter so various things as "", "test", [test,""] ... (always with string(s) , not mandatory for single one, then work with the entry, like this principle: if string then if empty then something... else other code if array then if empty then something... else other code The code is not my problem here, just the way to make difference between a string and an array without returning an error. Thanks -
Determine if an entry parameter is array or a string
pierremgi replied to pierremgi's topic in ARMA 3 - MISSION EDITING & SCRIPTING
More than 3 hours to miss that! Thanks a lot! -
That's a politician speech. "Always speak in positive way".. as an answer back in your face when no solution. But no lesson please, if you consider how much time, how much people have spent to describe, report, suggest some improvements. So sorry that the word "broken" may sound so unproductive! I hope you and BI will not need a psychology care unit after that! Less time on unfinished stuff like dynamic simulation (issued far too soon) or even DLCs (bugged), and more time for Arma Vanilla strengthening, should do the trick for most of players and writers. That's my best positive thought tonight.
-
respawn pilot and his vehicle and get pilot into vehicle again
pierremgi replied to feldmaus's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Yes, carrier environment is garbled by some altitude consideration and automatic behavior; Nothing difficult but some workaround! -
-1 No
-
Calculating the distance a Bomb would travel.
pierremgi replied to crewt's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Same for mortar calculation. Doesn't work with physic equations and impossible to find the Artillery computer formula. -
cutRsc and Updating Variables
pierremgi replied to complacent_lizard's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Let IDD to _1 , you don't need to specify it. Choose any number for your display control, example idc = 564382; // must not be already used change your onload for: onLoad = "uiNamespace setVariable ['aVariableNameHere', _this select 0]"; Now you can pass any value for this variable in scripts for changing text, color, position of the control, with lines of code like: _myRSClayer cutRSC ["cashDisplayTitle",0,false]; // always before manipulation controls even in another script, then below: [] spawn { while{true} do { uiNamespace getVariable "aVariableNameHere" displayCtrl 564382 ctrlSetText "Mmmmmoney"+str(round time); sleep 0.5 } }; NOTA1: you can have several controls (box, text, images) in same RSC. Generally place all you want to be displayed (or not) at the same time. NOTA2: It's always preferable to use the layer alternate syntax. You can easily cutRSC on/off with this variable and, last but not least, you display on differents layers without interfering with existing ones! And there are sometime many displays (layers) in some addons like ACE, EXILE ans so on. NOTA3: here I wrote in one line: uiNamespace getVariable "aVariableNameHere" displayCtrl 564382 ctrlSetText... Sometime, it's preferable to: disableSerialization; // mandatory for storing the display elements in a variable; _display = uiNamespace getVariable "aVariableNameHere"; _display displayCtrl 564382 ctrlSetText... -
respawn pilot and his vehicle and get pilot into vehicle again
pierremgi replied to feldmaus's topic in ARMA 3 - MISSION EDITING & SCRIPTING
How to respawn manned (or not) vehicle, air/ground/sea, with their previous waypoints: For those would like something simple working: - Place a vehicle respawn module; - link it to any vehicle you want; - write in expression field of the module : if (count crew (_this select 1) >0) then {createVehicleCrew (_this select 0); _gr = group (_this select 0); _gr copyWaypoints (group (_this select 1))}; Enjoy. -
Like this? in init field of the aircraft: this spawn { _veh = _this; _emitter1 = "#particlesource" createVehicleLocal (getpos _veh); _emitter1 attachTo [_veh,[0,-6,0]]; _emitter1 setParticleClass "ObjectDestructionFire1Smallx"; _emitter2 = "#particlesource" createVehicleLocal (getPos _veh); _emitter2 attachTo [_veh,[0,-6,0]]; _emitter2 setParticleClass "ObjectDestructionSmoke"; };
-
Balance Teams in MP TvT
pierremgi replied to roby7979's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Frankly, take time to write your problem before writing code in initPlayerLocal.sqf : if ( ( west countSide allPlayers > ( (east countSide allPlayers) max (resistance countSide allPlayers))+1) or ( east countSide allPlayers > ( (west countSide allPlayers) max (resistance countSide allPlayers))+1) or ( resistance countSide allPlayers > (( east countSide allPlayers) max (west countSide allPlayers))+1) ) then { player enableSimulation false; ["<t color='#ff0000' size = '.8'>Warning!<br />YOU ARE UNBALANCING TEAMS, BLUFOR/OPFOR/INDY RATIO SHOULD BE 1/1/1, CHANGE TEAMS...</t>",-1,-1,10,1,0] spawn BIS_fnc_dynamicText; uisleep 10; ["END6",false,10] call BIS_fnc_endMission; }; -
titleText during game via remoteexec
pierremgi replied to Devastator_cm's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hello, I wrote a tittle text in the initPlayerLocal.sqf and some other codes. I never ever obtain this text, except on hosted server... So titleText seems to be correct. Timing also (12 sec slot) but nothing appears on client, neither: titletext [["Some text...", "BLACK FADED"],1.2]; nor: [[],{titletext [["Some text...", "BLACK FADED"],1.2]}] remoteExec ["call",clientOwner]; uiSleep 12; Any idea? Thanks -
Scripting Discussion (dev branch)
pierremgi replied to Dwarden's topic in ARMA 3 - DEVELOPMENT BRANCH
setDate with the date of your PC date/time ?- 1481 replies
-
- branch
- development
-
(and 2 more)
Tagged with:
-
Balance Teams in MP TvT
pierremgi replied to roby7979's topic in ARMA 3 - MISSION EDITING & SCRIPTING
You can't write if (..) then {..} else {...} else {...}; // too much else! no chance to visit the last one! And _friendlyCount = _enemyCount = _opforCount, _indyCount; // has no sense! There are some more efficient codes for your topic, but for a general case, I suggest you a faster code (exit on first true answer): Call { if (something true here ) exitWith {some code}; if (something else true here ) exitWith {some other code}; if (something else true here ) exitWith {some other code}; if (something else true here ) exitWith {some other code}; here code by defaut (optional); }; But right now, what you need is : west countSide allPlayers; East countSide allPlayers; .... or allUnits if some Ais.... then a loop to compare the result and make you code. No time to develop. See you later.