Jump to content


  • Content Count

  • Joined

  • Last visited

  • Medals

  • Medals

Community Reputation

2825 Excellent

About pierremgi

  • Rank
    Second Lieutenant

Profile Information

  • Location

Recent Profile Visitors

6520 profile views
  1. Nice map btw. I didn't know RHS made it. Perhaps, they have some Viet army project. I'm more on Unsung but I'll check for new RHS units if any.
  2. Ah OK, saw that lately. No, if you want to delete another (non-object) you need to find the 3den id. That's returned in console by cursorObject (in the p3D model), or, while in editor, run on debug console: do3DENAction "ToggleMapIDs";
  3. hmmm that works. So, delete this code and rewrite it manually. There must be an invalid hidden character somewhere (known BI forum bug by copying/pasting) As you can see, your code error added a call {} wrapping the code (for nuts).
  4. place a trigger on the river, near the bridge (or on it): NOT server only condition: TRUE on activation: { hideObject (getPos thisTrigger nearestObject _x) } forEach [138759,138760,138761,139106,139107,139108,139109,139176,138721,138722,138723,139110,139111,139112,139113]; Et voilà
  5. _x is the special variable inside the forEach code and related to the current element of this loop (treating elements of the array). Not specific to forEach, you can use it in select (as example allUnits select {side _x == WEST} ); _forEachIndex is an index (number) specific to forEach command
  6. yes, my bad (written at 5 AM) Need a coffee.
  7. That's better. Global ones are a little bit more demanding. So you can declare it for current scope and sub-scopes, especially before any loop, instead of multiplying that for nuts inside the loop.
  8. _hvt = "O_Officer_F" createUnit [getMarkerPos _hvtPos, _hvtGroup]; ... if "hvt_1","hvt_2","hvt_3",... are markers (should be).
  9. f_markLocations = { private _logics = ( allMissionObjects "Logic" select{ !( _x isKindOf "Module_F" ) } ) - [ BIS_functions_mainscope ]; private _numLogics = count _logics; private ["_logic","_pos","_count","_locations","_location","_townArray","_miscArray","_mkr"]; private _return = []; { _logic = _logics select _forEachIndex; _pos = getPosASL _logic; _locations = nearestLocations[_pos,["nameVillage","nameCity","nameCityCapital","CityCenter","Hill","Strongpoint"],3000]; _townArray = []; _miscArray = []; { _location = _locations select _forEachIndex; _pos = locationPosition _location; _mrk = createMarker [format ["location%1%2",_forEachIndex,_type],_pos]; _mrk setmarkerColor "ColorRed"; if(type _x != "Hill" and type _x != "Strongpoint") then { _miscArray pushBack _x; _mrk setMarkerType "O_Recon"; } else { _townArray pushBack _x; _mrk setMarkerShape "Ellipse"; _mrk setMarkerSize [50,50]; }; } forEach _locations; _return pushBack [_townArray,_miscArray]; } forEach _logics; _return }; hint str (call f_markLocations);
  10. pierremgi

    Unstable 'show / hide' module

    Ah OK, thank you for sharing. I was on other modules. Anyway, I had a look at yours. BI created this show/hide with global commands. That means your trigger should be "server only". And, your area is a little bit too fin (1m) That could lead to fail with a BLUFOR in vehicle because he needs to be present (his position) in area during a 0.5 sec slot (time between 2 checks of the trigger's condition). 10m doesn't hurt, imho.
  11. pierremgi

    Triggers and Hints.. WTF

    Mind for the position of the trigger (I just changed getpos _this (my test) for getpos unit1, or wherever you want to spawn this trigger).
  12. pierremgi

    Triggers and Hints.. WTF

    Well, I mentioned the create3denEntity which... creates entities while you're in 3den. It's something useful if you're working with codes for 3den (like some tools you would add to the editor (see enhanced 3den or MGI Modules) If you just want to spawn units or objects during the game, you don't need that. I should ask you: what's your aim? Scripting for MP needs some good starts. First of all, on dedicated there is no player (by definition), so player (as command) as no sense. You must spawn AI units/vehicles on server (preferably, not mentioning headless client which is useless in your case). You can run on server all codes for these AIs, but it's better to run locally all features for player (as example, personal message or HUDs, or behaviors concerning the player...). Just because you don't need to broadcast such things. It's a waste of bandwidth and net resource. So, don't try all combinations of initPlayerLocal.sqf, init.sqf and initServer.sqf... just think about what you want to obtain, when. You can create a scripted trigger. That's what your script does more or less. So first, I suggest you to abandon all these "layer" and "item" things in the process you describe, to focus on a simple example: Let's say you want to create a trigger for a unit (unit1) saying "hello", just "hello", if one player enters its area: If you want a globalChat, I guess that you want a message displayed on all PCs... unit1 must be known by all PCs , for course. The globalChat command is AG EL, so matter where is located the unit (chatting) , but the result is local (where the code is running). So, in this case, a trigger "not server only" could do the trick as it will run on all PCs: In init.sqf: (trigger must be known every where) private _trig = createTrigger ["EmptyDetector",[3999.66,5236.21,0] ]; _trig setTriggerArea [5,5,198,true,5]; // why not make sure the height is OK : 5m is fin. _trig setTriggerActivation ["ANYPLAYER","PRESENT",false]; _trig setTriggerStatements ["this","unit1 globalChat 'hello' ",""]; For personal message (first player in area, make it repeatable if you want for other players): also in init.sqf: private _trig = createTrigger ["EmptyDetector",getpos unit1 , false]; _trig setTriggerArea [5,5,198,true,5]; _trig setTriggerActivation ["ANYPLAYER","PRESENT",false]; _trig setTriggerStatements ["this","if (local (thisList #0)) then {unit1 globalChat format ['hello %1', name (thislist #0) ]}",""];
  13. pierremgi

    Triggers and Hints.. WTF

    I didn't know this method... playing with 3den layers and items as in mission.sqm??? For 3den, I'm using create3denEntity... Once in mission, I just spawn units... Anyway, your trigger is "VEHICLE" "PRESENT" but it seems not linked to a vehicle.
  14. pierremgi

    Unstable 'show / hide' module

    I don't understand this Hide/show moduleS with units... Do you have a repro? One sure thing: there is a solution for your problem.