Jump to content

pierremgi

Member
  • Content Count

    4792
  • Joined

  • Last visited

  • Medals

  • Medals

Everything posted by pierremgi

  1. pierremgi

    Random Flagpole Teleport

    No problem.
  2. pierremgi

    Random Flagpole Teleport

    All these solutions work. So check your markers. I guess you wrote "rock", "stone"... in the init field of markers. That's not correct. You must write the name without quote in these fields: rock, stone, ... as any object's name in editor. Then in script you need to refer at the quoted name "rock", "stone" because that's markers (with specific getMarkerPos apply to the marker string, instead of getPos for an object (not stringed))
  3. It just shows you're quick at bashing.
  4. You have plenty of undefined local variables. Local variables are for a scope (There can be several scope inside a script. For a little idea... ). when I wrote: _hintLoc = [""," near the observatory "," in the valley "," near central valley "," at the peak "]; // in the main scope of the script, I define it here. So, you can use it in the script, or pass it to a new scope (like excVMed sqf, some eventHandler, addAction..) thru PARAMETERS. Each time you are writing [] execVM "a.sqf" , that means you don't need to pass parameters. It's OK if you are using global variables like currentRING (if defined somewhere in your mission: editor or other script). With local variable, when you write: if (_courseID !=0) then {....} , your _courseID is not defined at all inside the same script and before its use. >>>>> error undefined variable! Here you have 3 separate triggers (areas for 3 races). If you don't want too much unreadable codes inside their on act. field, you can use in your script: if (triggerActivated areaRINGtrig_3) .... do what you want for this area. _ringScript=[]execVM format ["ringCLEAR.sqf",_courseID] ?? Say _courseID = 3 (so defined before), the hard method: _ringScript=[]execVM format ["ringCLEAR%1.sqf",_courseID] will do something like _ringScript=[]execVM format "ringCLEAR3.sqf" 3 areas >> 3 scripts! Smarter method: you just have to pass _courseID as argument, and use a unique script ringCLEAR.sqf: _ringScript = _courseID execVM format "ringCLEAR.sqf"; In ringCLEAR.sqf, you import _courseID starting as first line of code: params ["_courseID"]; // then use _courseID (you can rename this variable as you want: params ["_soCuteRing"]; //then use _soCuteRing) or, last method near the 2nd one: use a global variable: courseID Then _ringScript= [] execVM "ringScript.sqf"; // inside this sqf (and all others), you can use straight the courseID (it's not a parameter to be passed but a global variable).
  5. pierremgi

    Random Flagpole Teleport

    this addaction ["Teleport","teleport.sqf"]; and in teleport.sqf params ["","_caller"]; // same as _caller = _this #1; _caller setpos getmarkerPos selectRandom ["yourmarker1", "yourmarker2","yourmarker3","yourmarker4"]; CORRECTED
  6. objectNull and locationNull have always [0,0,0] as position. If your ringCLEARX.sqf (btw I'd write only one, why several?) is short in term of execution (without sleep 30000, you see what I mean), the terminate is useless because your script will not last more than the sum of sleeping time(s) + all codes (during ms) So, I'm not sure you have to terminate it during the flight (even with extraterrestrial jet) _ring = call compile format ["ringMARK%1_GOAL",ringChall] means: ringMARK2_GOAL for ringChall = 2 so depending on ringChall value. In this case(2): ["ringMARK%1_GOAL",ringChall] // returns "ringMARK2_GOAL" so a string then compile ["ringMARK%1_GOAL",ringChall] // returns {ringMARK2_GOAL} so a code then call compile format ["ringMARK%1_GOAL",ringChall] // returns ringMARK2_GOAL so as returned value of called code. see call.
  7. Yes, a little bit. It's same as: _hintLoc = [""," near the observatory "," in the valley "," near central valley "," at the peak "]; _ringScript = scriptNull; if (ringChall !=0) then { _ring = call compile format ["ringMARK%1_GOAL",ringChall]; ["task1",getPos _ring] call BIS_fnc_taskSetDestination; hint format [" Ring Challenge Activated! Fly through the first ring%1to begin the ring course";rigChall]; {_x setpos getpos _ring} forEach [ringTRIGmock,ringOBJ]; _ringScript=[]execVM format ["ringCLEAR%1.sqf",ringChall]; } else { ["task1",[objNULL,false]] call BIS_fnc_taskSetDestination; // you could delete task if you don't somewhere... and recreate it with trigger ringOBJ setPos [0,0,0]; ringTRIGmock setpos [0,0,0]; terminate _ringScript; // not sure it's useful . depending on your script. Probably already terminated }; With your previous choices.
  8. Perhaps the copy/paste is messy (there are some cases for some times....) Read enableEnvironment and write it as you like.
  9. CNL Just a question: can you see your arrows while in air? They seem to me very small.
  10. If you want to limit the global number of active scripts, you can add something like: waitUntil (sleep 1; count diag_activeSQFScripts < 10); at the head of scripts. That will not end or decrease the number of script, so you need to take into account how many time you write that. You can't do that for all scripts if you want to see some of them terminated! I mean the waitUntil condition keeps its own script active while FALSE. So you are waiting for some other scripts termination (so, without this check) of course. But, overall, as far as you would manage the CPU load, IMHO it's a weird approach as all scripts have their own workload for CPU. You can play with diag_FPS instead (each PC has its own performance. So...) Just a remark: - when bad scripting with plenty of endless scripts, count diag_activeSQFScripts can reach 1000, 2000 (check in debug console) - heavy scenarios with plenty of codes can reach 100, 200, even 300 active scripts - small missions with nothing special but waypoints (as example) have often 10 , 20 active scripts It's just a general idea.
  11. _currentRing = (TAG_courses#(TAG_currentCourse)#TAG_ringID);// I don't know how this syntax works. Does it look for the first number in that variable? # is another way for select TAG_ringObject setPos getMarkerPos (TAG_courses#(TAG_currentCourse)#TAG_ringID); // there are no markers, used arrow objects can (getpos currentRING) do? GOM supposed you did, or will do (see post). If you don't want to add markers, just use your triggers (those for course). IMHO, you just have to add the next position of the ring (next trigger position) in the activation field of the current trigger. You don't need anything else.
  12. yes. I understand why deployB1 now...b1 is definitely one vehicle (always the same), named like this in editor or via a script So, no matter on which vehicle you want to apply the addAction, only b1 is supposed to be teleported. So, if you addAction on lvr, only b1 (lvr name or not) will be teleported. And you will loose this possibility after a respawn if it's not implemented. So, first, confirm that b1 is the name of the vehicle you want to teleport. No other ones?
  13. So much lines to obtain a simple definitely "I am finished running" ! Your while loop is weird (your condition for a simple boolean also). Are you sure you need to wait for all codes completion? (spawned or execVMed because the called ones are already queued in the scope). If you need to wait for scripts terminated, then repeated, you should think about repeatable trigger, you can act and deact as you need. ... or, referring to your idea, your loop could be: [] spawn { while {true} do { _code1 = [] spawn code1; _code2 = [] execVM "code 2.sqf"; call code 3; .... waitUntil { [_code1,_code2] findIf {! scriptdone _x} == -1 }; sleep (optional) }; }; EDITED Small example:
  14. Perhaps using the object: electronics & sensors / data link position (not active by default). I tested in vanilla, that makes no difference for AIs repeatedly asking your position. So, if this feature could impact on these useless reports, that could be fine! The step further could be that AI stops (or takes cover) when he doesn't know where you are. At present time: AI always regroups (on order), no matter yelling for your position (weird!), asking toooo soon where you are what ever the combat mode is. Not really stealth! Please dev: AI stops/ takes cover/ regroups on fellow's known position when he looses yours. Radio protocol depends on behavior mode, last order is regroup (for asking the position), use of setSkill and/or electronics & sensors could be versatile. Thanks
  15. If you spawn a box you should have a handle. say _crate So, as example:
  16. AddAction has it's own structure. Read this page. I think your deployb1,sqf misses a parameter like _target if you apply the given code in examples. "_this distance _target" is the condition for addAction using two specific variable for this scope. Truly, you need to read carefully all lines of BI doc for any command / function (not only for addAction). So in your case, i'll bet for something like: this addAction ["<t color='#2E64FE'>Deploy Vehicle</t>", {params ["_veh" ]; _veh spawn Deployb1.sqf } , [],1,true,true,"","_this distance _target < 5"]; in init field of the vehicle. (if not, give your code where/when/on what) Now you can use _this inside the deployb1.sqf,... (I don't know your code) referring to _veh (or what name you want for a local variable, the 1st param is the target so the vehicle, inside the inner code of addAction) ,... which refers to this... which is the object from its own init field. abstract: this (in init field of a vehicle) addAction [ "menu", { inner code with passed params ["_target", "_caller", "_actionId", "_arguments"] see doc, example above }, [],1,true,true,"", "condition (optional) with special variables (optional) _this and _target " ]; All this process for SP. In MP it's more difficult.
  17. this is a specific variable for init field (object/unit)... Even a magic one! _this catches the parameters passed from a scope to another one: [some params] spawn { a code for _this (passed params) } _this can't work inside the main code of an init field but _this can be used in a inner code. So: this setPosATL (this modelToWorld[0,0,2]); is correct this spawn { _this setPosATL (_this modelToWorld[0,0,2]); works also. {_x setPosATL (_x modelToWorld[0,0,2]) } forEach vehicles; works for all present vehicles at this time. I don't know what LVR is, no matter, just try to keep a variable name or a _handle workable.
  18. That's Arma Engine for an age! You should disable the simulation if you hide a unit. This way the hidden unit will not be hit and will not open fire on enemy, (and shut it up by the way)
  19. Kill the rabbits... enableEnvironment [false, true] . It's better, so, for the CPU load.
  20. Your mods? (you are the author?)
  21. That's because _ied (local variable) is undefined inside the trigger statement; Replace the (too heavy) code: if(isMultiplayer)then{ _trig setTriggerStatements[ "{vehicle _x in thisList && speed vehicle _x>4}count playableUnits>0", "{if((typeOf _x)in iedAmmo)then{[_x]call iedAct;};}forEach nearestObjects[thisTrigger,[],10];", "deleteVehicle thisTrigger"];}else{ _trig setTriggerStatements[ "{vehicle _x in thisList && isPlayer vehicle _x && speed vehicle _x>4}count allUnits>0", "{if((typeOf _x)in iedAmmo)then{[_x]call iedAct;};}forEach nearestObjects[thisTrigger,[],10];", "deleteVehicle thisTrigger"];}; Note: Here the condition isMultiplayer can be easily removed. by: _trig setTriggerStatements [ "{vehicle _x in thisList && && speed vehicle _x>4}count allPlayers >0", "{if(typeOf _x in iedAmmo)then{ [_x,20, true, true] execVM "AL_bomb\alias_bomb_ini.sqf"; [_x]call iedAct } }forEach nearestObjects[thisTrigger,[],10] ", "deleteVehicle thisTrigger" ]; (not tested) EDITED: execVm Alias code before the called iedAct. This way you will not wait for a iedAct completion.
  22. pierremgi

    Altis is broken, please help!

    First of all, check the files integrity on your Steam desk / arma3 / properties / local files /
  23. You can even replace a terrain object by another object (edited) in 3den (at min 2:55).
  24. Good idea. That will afford the advantage for applying that on some units instead of global behavior like enableSentences and enableRadio. At this time, the only command (if I'm right) which can be applied on units is disableConversation, but this command is not accurate for radio. Or perhaps a setSkill... That could be fine if a distance could be parametered: _unit setSkill ["RADIOPROTOCOL", 300]; // within 300 m, the unit is quiet on radio (only), in AWARE and STEALTH mode (doesn't apply on COMBAT mode). If not possible, perhaps the 150m which seems to be hard coded (tested on runway, aware group, no eny report), could be increased (300m or in game Setting difficulty).
×