Jump to content

pierremgi

Member
  • Content Count

    4792
  • Joined

  • Last visited

  • Medals

  • Medals

Everything posted by pierremgi

  1. pierremgi

    Delete vehicles

    Sure! define abandoned. Empty vehicle(s) at start; Can't move & disembarked crew; just disembarked crew (distance for abandon; by side or anybody?); wreck(s); other specific filters like types/sides for vehicles/units... timeout...
  2. pierremgi

    Language of the AI

    Perhaps, they should mix/cooperate (if possible) with ArmaModFrance...
  3. Yes, the script checks for marker(s) first, then "start" as string parameter. So if a marker is named 'start", this one will be used. What you can do is: - mark the initial position by a marker like "veh1Start" and specify this marker in your command line : 0 = [[veh1],["veh1Start"],10,true,false] spawn MGI_fnc_VehicleRespawn; - change my script (command line included) to read "startVeh" as string anytime you read "start". This way,(if you don't have any marker already named "startVeh", this string will operate and the true position at start will be used. NOTE: There are some remaining problems, respawning on a carrier, and when UAV has remaining waypoints, choosing the start position. I'll check that.
  4. This script doesn't need the BI respawn module. It's done to replace it. See the video for global explanation. I also explained how to use the scripts in this topic. Or... you can use the MGI advanced modules instead (not at the same time). You shouldn't need any extra script.
  5. Yes, It should. Test that in Vanilla Arma (no mod). If you have time, describe how I can reproduce that (out of Domination) and make a little video. Thks.
  6. Just apart, I can't understand the added value to run HCs on same processor as the server.
  7. No trigger at all but on each frame Event Handler. Trigger : 2 possible slots running a code, this EH: 30 events/ sec if 30 FPS
  8. You can play with fuel set to zero then refilled along with frames (EH). It's a little bit tricky but I didn't find better for limiting the player's vehicle speed. Not on Arma. Sorry for no more details.
  9. Read the BIKI for commands. Watch for arguments and return data (if any). _arr deleteAt (_arr findIf {not alive _x}); will not delete all the dead units at once. For your aim, it's easier to: _deadUnits = _arr select {!alive _x}; _deadPos = _deadUnits apply {getPos _x};
  10. Welcome on this forum. Take time to detail your problem. Without more precision, I'd say add some waitUntil condition in your script(s). See also scriptdone command. You'll find useful commands here.
  11. Not exactly. thisList is updated every 0,5 sec. but the code runs only at each activation. So, you think thisList isn't updated but in fact the code needs to be fired again if you want to deal with this update. The only mean to re-run such code is to deactivate (make the condition wrong again) and play the repeat.
  12. The problem is: you want to remove the weapon for units entering the trigger, (and perhaps, in a second time, you'd want to give them some kind of weapon for the pattern). A trigger (repeatable) fires when the condition is met (here some indep unit present), applying the code on thisList (which is the list of compliant unit(s), usually the first one or the list at start if any). Why the first one while in game? Because the trigger scans the condition every 0,5 sec and it's harder to make 2 or more units entering at the same 0,5 sec slot. Once the condition is met, you need to deact the trigger to react it again. I'm far from Arma for testing but you need to deact (empty thisList) if you want to see a good result: The condition could be: this && thisList findIf {_x isKindOf "CAManBase" && !(count weapons _x isEqualTo 0)} > -1 This way, the trigger will fire if an infantry unit has some weapon (vehicles are not concerned), and deact after it removes all weapons of thisList, so it should rearm at the next slot. NOT TESTED The second step, adding some other weapons, if any, needs to pass a variable on each disarmed unit, to be treated apart.
  13. pierremgi

    Trigger delete itself

    That's the principle.
  14. Difficult to help you without more details. For example, description.ext code. Do you have some config for difficulties?
  15. Just an idea: You probably respawn at start, so the code of your EH killed could be persistent in effect (spectator). Try without this EH, then try to cancel this code with an EH respawn. No other clue so far.
  16. Hi, I'd like to write some Ais behaviors and it seems to me that they are usually done with FSM files. I didn't read so much things about that. I'd like to know what differences, gain or advantages makes FSM scripting vs SQF. Then, the way to integrate a FSM file in some working environment (init.sqf call?) Thanks.
  17. If you want to apply an EH or MPEH on all existing units, no matter how they spawn, you can: [] spawn { while {true} do { { _x setVariable ["yourVarNameHere",true]; _x addMPEventHandler ["MPKilled", {hint "bla bla"}]; } forEach (allUnits select {isNil {_x getVariable "yourVarNameHere"}}); sleep 2; };
  18. So, if I'm right, you have choice between: - a MEH (usually run on each PC through init.sqf, or initPlayerLocal.sqf for players things), mission oriented, then you don't need to check for units update (i.e. your code applies on each entity kill). The inner code will run locally, but on every PC running the code; - a MPEH (AG EG) but applied to unit(s), so that means you need to run a loop for adding this MPEH on "spawned in game" units.
  19. I don't have my Arma & my editor right now, but you could: onEachframe some script (use the addStackedEventHandler) in order to: - detect some units inside some areas (use inArea command) - if player (isPlayer command) >> increase visual effects (ppEffect commands) while in area, decrease them outside; - decrease skill if AI (!isPlayer) by setSkill and/or disableAI commands; - add damage for any unit during the stay in hazardous area. - optional: check for specific equipment protecting against effects.
  20. And don't forget the allUnits (or allPlayers, vehicles..) represents the units, (players/vehicles) at the time you run the code. So, at start for example. Then there is no update to take into account the spawned units,/vehicles. In this case you need to loop the code in order to treat such new entities.
  21. @jgaz-uk From where do you run your MEH "entityKilled"? From init.sqf, this should work.
  22. Have a look on previous topics about that. https://forums.bohemia.net/search/?q=.raP
  23. pierremgi

    if statement

    Repeatable? It's typically a good usage of trigger.
×