Jump to content

Search the Community

Showing results for tags 'init'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • BOHEMIA INTERACTIVE
    • BOHEMIA INTERACTIVE - NEWS
    • BOHEMIA INTERACTIVE - JOBS
    • BOHEMIA INTERACTIVE - GENERAL
  • FEATURED GAMES
    • Arma Reforger
    • Vigor
    • DAYZ
    • ARMA 3
    • ARMA 2
    • YLANDS
  • MOBILE GAMES
    • ARMA MOBILE OPS
    • MINIDAYZ
    • ARMA TACTICS
    • ARMA 2 FIRING RANGE
  • BI MILITARY GAMES FORUMS
  • BOHEMIA INCUBATOR
    • PROJECT LUCIE
  • OTHER BOHEMIA GAMES
    • ARGO
    • TAKE ON MARS
    • TAKE ON HELICOPTERS
    • CARRIER COMMAND: GAEA MISSION
    • ARMA: ARMED ASSAULT / COMBAT OPERATIONS
    • ARMA: COLD WAR ASSAULT / OPERATION FLASHPOINT
    • IRON FRONT: LIBERATION 1944
    • BACK CATALOGUE
  • OFFTOPIC
    • OFFTOPIC
  • Die Hard OFP Lovers' Club's Topics
  • ArmA Toolmakers's Releases
  • ArmA Toolmakers's General
  • Japan in Arma's Topics
  • Arma 3 Photography Club's Discussions
  • The Order Of the Wolfs- Unit's Topics
  • 4th Infantry Brigade's Recruitment
  • 11th Marine Expeditionary Unit OFFICIAL | 11th MEU(SOC)'s 11th MEU(SOC) Recruitment Status - OPEN
  • Legion latina semper fi's New Server Legion latina next wick
  • Legion latina semper fi's https://www.facebook.com/groups/legionlatinasemperfidelis/
  • Legion latina semper fi's Server VPN LEGION LATINA SEMPER FI
  • Team Nederland's Welkom bij ons club
  • Team Nederland's Facebook
  • [H.S.O.] Hellenic Special Operations's Infos
  • BI Forum Ravage Club's Forum Topics
  • Exilemod (Unofficial)'s General Discussion
  • Exilemod (Unofficial)'s Scripts
  • Exilemod (Unofficial)'s Addons
  • Exilemod (Unofficial)'s Problems & Bugs
  • Exilemod (Unofficial)'s Exilemod Tweaks
  • Exilemod (Unofficial)'s Promotion
  • Exilemod (Unofficial)'s Maps - Mission Files
  • TKO's Weferlingen
  • TKO's Livonia
  • TKO's Rules
  • TKO's Changelog
  • TKO's Help
  • TKO's What we Need
  • TKO's Cam Lao Nam
  • MSOF A3 Wasteland's Server Game Play Features
  • MSOF A3 Wasteland's Problems & Bugs
  • MSOF A3 Wasteland's Maps in Rotation
  • SOS GAMING's Server
  • SOS GAMING's News on Server
  • SOS GAMING's Regeln / Rules
  • SOS GAMING's Ghost-Town-Team
  • SOS GAMING's Steuerung / Keys
  • SOS GAMING's Div. Infos
  • SOS GAMING's Small Talk
  • SOS GAMING's TS³ Viewer
  • NAMC's Topics
  • NTC's New Members
  • NTC's Enlisted Members
  • The STATE's Topics
  • CREATEANDGENERATION's Intoduction
  • CREATEANDGENERATION's HAVEN EMPIRE (NEW CREATORS COMMUNITY)
  • HavenEmpire Gaming community's HavenEmpire Gaming community
  • Polska_Rodzina's Polska_Rodzina-ARGO
  • Carrier command tips and tricks's Tips and tricks
  • Carrier command tips and tricks's Talk about carrier command
  • ItzChaos's Community's Socials
  • Photography club of Arma 3's Epic photos
  • Photography club of Arma 3's Team pics
  • Photography club of Arma 3's Vehicle pics
  • Photography club of Arma 3's Other
  • Spartan Gamers DayZ's Baneados del Servidor
  • Warriors Waging War's Vigor
  • Tales of the Republic's Republic News
  • Operazioni Arma Italia's CHI SIAMO

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Yahoo


Jabber (xmpp)


Skype


Biography


Twitter


Google+


Youtube


Vimeo


Xfire


Steam url id


Raptr


MySpace


Linkedin


Tumblr


Flickr


XBOX Live


PlayStation PSN


Origin


PlayFire


SoundCloud


Pinterest


Reddit


Twitch.Tv


Ustream.Tv


Duxter


Instagram


Location


Interests


Interests


Occupation

Found 26 results

  1. Hi, i'm working on a mission and i have my init.sqf that seems to crash/stop on the client side if i use waituntil {scriptdone _a} at line 17 (just after the execVM). Single player and host don't have this issue. I'm stuck using the sleep command for it to work but i dont like it since the script that's running before is for a conversations which I haven't quite finished yet so I don't know the exact length. I'm attaching the init and the other sqf i've referenced. I know scripting for multiplayer can be finicky cause of desync and packet loss but this is really quite enraging to be fair 😄 Does anyone have a suggestion to how i could use waituntil and still have it work in multiplayer ? Thanks ! Init.Sqf BriefingDone = false; cutText ["", "BLACK FADED", 1]; [0,0,false] spawn BIS_fnc_cinemaBorder; titleText ["ONI HOSTAGE SITUATION", "plain", 1]; a1 playMove "Acts_B_M03_briefing"; sleep 3; cutText ["", "BLACK in", 1]; _A = execVM "conversation1.sqf"; sleep 28; [1,1,false] spawn BIS_fnc_cinemaBorder; titleCut ["", "BLACK out", 1]; sleep 8; BriefingDone = true; a1 switchMove "amovpercmstpslowwrfldnon"; sleep 8; titleCut ["", "BLACK IN", 1]; conversation1 : player KbAddTopic ["briefing","texts.bikb","",""]; a1 KbAddTopic ["briefing","texts.bikb","",""]; a2 KbAddTopic ["briefing","texts.bikb","",""]; a1 KbTell [player,"briefing","ONI1brief"]; waitUntil { a1 KbWasSaid [player,"briefing","ONI1brief",3]; / }; a2 KbTell [player,"briefing","ONI2brief"]; waitUntil { a2 KbWasSaid [player,"briefing","ONI2brief",3]; }; a1 KbTell [player,"briefing","ONI1brief1"]; sleep 2;
  2. Hello, I need a little help: I would like the AI not to be visible to the naked eye but only visible through thermal NVG. I would like to add it either in the IA init or in a script. And usable in Multiplayer. Can someone help me?
  3. Hi everyone, I've created this script to create a random weather and random forecasts each time you start a mission. It automatically passes all weather data to clients. The script is able to filter different kinds of weather based on supported terrain position: - Mediterranean islands; - Europe; - Middle east; Just put the script in the mission directory with the name you prefer and call it from the init.sqf file with the following. init.sqf if (isServer) then { [] execVM "nameYouPrefer.sqf"; }; Hope you enjoy. randomWeather.sqf /* Sets random weather and forecasts based on "real" world positioning. It supports add-ons maps. * Ombra 12/06/2020 * latest update 18/02/2022 */ CONST_MAX_RAIN_LEVEL = 0.6; //To avoid fps issues CONST_MAX_FOG_LEVEL = 0.6; //To prevent annoying fog _currentMap = worldName; _probabilityFog = random[0,0.5,1]; _probabilityRain = random[0,0.5,1]; //Declaring variables _currentOvercastCoef = 0; _forecastOvercastCoef = 0; _currentRainCoef = 0; _forecastRainCoef = 0; _currentFogCoef = 0; _forecastFogCoef = 0; _windSpeedN = 0; _windSpeedE = 0; _windDirection = 0; switch (_currentMap) do { //Calculating weather for desert terrains case "MCN_Aliabad"; case "takistan"; case "zargabad"; case "Mountains_ACR"; case "fallujah"; case "kunduz"; case "Shapur_BAF": { //Probability of 30% for deserts to encounter overcast (and therefore rain) if (_probabilityRain > 0.7) then { _currentOvercastCoef = random[0,0.5,1]; } else { _currentOvercastCoef = random[0,0.2,0.5]; }; _forecastOvercastCoef = random[0,0.5,1]; //Current rain only if overcast > 0.6 if (_currentOvercastCoef > 0.6) then { _currentRainCoef = random[0, CONST_MAX_RAIN_LEVEL/2, CONST_MAX_RAIN_LEVEL]; } else { _currentRainCoef = 0; }; _forecastRainCoef = random[0, CONST_MAX_RAIN_LEVEL/2, CONST_MAX_RAIN_LEVEL]; _currentFogCoef = 0; _forecastFogCoef = 0; //Some wind like sandstorms _windSpeedN = random[0,10,30]; _windSpeedE = random[0,10,30]; _windDirection = random[0, 180, 360]; }; //Calculating weather for european terrains (Vanilla and CUP) case "Bootcamp_ACR"; case "Woodland_ACR"; case "chernarus"; case "chernarus_summer"; case "Chernarus_Winter"; case "ProvingGrounds_PMC"; case "Enoch": { //Probability of 60% for northern EU to encounter overcast (and therefore rain) if (_probabilityRain > 0.4) then { _currentOvercastCoef = random[0,0.5,1]; } else { _currentOvercastCoef = random[0,0.2,0.5]; }; _currentOvercastCoef = random[0,0.5,1]; _forecastOvercastCoef = random[0,0.5,1]; if (_currentOvercastCoef > 0.6) then { _currentRainCoef = random[0, CONST_MAX_RAIN_LEVEL/2, CONST_MAX_RAIN_LEVEL]; } else { _currentRainCoef = 0; }; _forecastRainCoef = random[0, CONST_MAX_RAIN_LEVEL/2, CONST_MAX_RAIN_LEVEL]; //Probability of 30% for northern EU to encounter fog if (_probabilityFog > 0.7) then { _currentFogCoef = random[0, CONST_MAX_FOG_LEVEL/2, CONST_MAX_FOG_LEVEL]; } else { _currentFogCoef = 0; }; _forecastFogCoef = random[0, CONST_MAX_FOG_LEVEL/2, CONST_MAX_FOG_LEVEL]; //Not much wind in continental land _windSpeedN = random[0,10,20]; _windSpeedE = random[0,10,20]; _windDirection = random[0, 180, 360]; }; //Calculating weather for mediterranean terrains case "Stratis"; case "Altis"; case "Malden": { //Probability of 50% for northern EU to encounter overcast (and therefore rain) if (_probabilityRain > 0.5) then { _currentOvercastCoef = random[0,0.5,1]; } else { _currentOvercastCoef = random[0,0.2,0.5]; }; _currentOvercastCoef = random[0,0.5,1]; _forecastOvercastCoef = random[0,0.5,1]; if (_currentOvercastCoef > 0.6) then { _currentRainCoef = random[0, CONST_MAX_RAIN_LEVEL/2, CONST_MAX_RAIN_LEVEL]; } else { _currentRainCoef = 0; }; _forecastRainCoef = random[0, CONST_MAX_RAIN_LEVEL/2, CONST_MAX_RAIN_LEVEL]; _currentFogCoef = random[0, CONST_MAX_FOG_LEVEL/2, CONST_MAX_FOG_LEVEL]; _forecastFogCoef = random[0, CONST_MAX_FOG_LEVEL/2, CONST_MAX_FOG_LEVEL]; //Islands are windy _windSpeedN = random[0,20,40]; _windSpeedE = random[0,20,40]; _windDirection = random[0, 180, 360]; }; case "Tanoa": { //Probability of 80% for jungle areas to encounter overcast (and therefore rain) if (_probabilityRain > 0.2) then { _currentOvercastCoef = random[0,0.5,1]; } else { _currentOvercastCoef = random[0,0.2,0.5]; }; _currentOvercastCoef = random[0,0.5,1]; _forecastOvercastCoef = random[0,0.5,1]; if (_currentOvercastCoef > 0.5) then { _currentRainCoef = random[0, CONST_MAX_RAIN_LEVEL/2, CONST_MAX_RAIN_LEVEL]; } else { _currentRainCoef = 0; }; _forecastRainCoef = random[0, CONST_MAX_RAIN_LEVEL/2, CONST_MAX_RAIN_LEVEL]; //Probability of 20% for jungle areas to encounter fog if (_probabilityFog > 0.8) then { _currentFogCoef = random[0, CONST_MAX_FOG_LEVEL/2, CONST_MAX_FOG_LEVEL]; } else { _currentFogCoef = 0; }; _forecastFogCoef = random[0, CONST_MAX_FOG_LEVEL/2, CONST_MAX_FOG_LEVEL]; //Islands are windy _windSpeedN = random[0,20,40]; _windSpeedE = random[0,20,40]; _windDirection = random[0, 180, 360]; }; default { //Probability of 50% as default if (_probabilityRain > 0.5) then { _currentOvercastCoef = random[0,0.5,1]; } else { _currentOvercastCoef = random[0,0.2,0.5]; }; _currentOvercastCoef = random[0,0.5,1]; _forecastOvercastCoef = random[0,0.5,1]; if (_currentOvercastCoef > 0.5) then { _currentRainCoef = random[0, CONST_MAX_RAIN_LEVEL/2, CONST_MAX_RAIN_LEVEL]; } else { _currentRainCoef = 0; }; _forecastRainCoef = random[0, CONST_MAX_RAIN_LEVEL/2, CONST_MAX_RAIN_LEVEL]; //Probability of 30% to encounter fog if (_probabilityFog > 0.7) then { _currentFogCoef = random[0, CONST_MAX_FOG_LEVEL/2, CONST_MAX_FOG_LEVEL]; } else { _currentFogCoef = 0; }; _forecastFogCoef = random[0, CONST_MAX_FOG_LEVEL/2, CONST_MAX_FOG_LEVEL]; _windSpeedN = random[0,10,20]; _windSpeedE = random[0,10,20]; _windDirection = random[0, 180, 360]; }; }; //Setting weather 0 setOvercast _currentOvercastCoef; 0 setRain _currentRainCoef; 0 setFog _currentFogCoef; setWind [_windSpeedN, _windSpeedE, false]; 0 setWindDir _windDirection; forceWeatherChange; //Setting forecast 3600 setOvercast _forecastOvercastCoef; 3600 setRain _forecastRainCoef; 3600 setFog _forecastFogCoef; Up here it is posted as script but it can also be used as function: [] spawn YourTAG_fnc_randomWeather; Call the script file fn_randomWeather.sqf and place it in a scenario subfolder names functions. Then edit the description.ext file by putting standard function declaring: description.ext class CfgFunctions { class YourTAG { tag = "YourTAG"; class functions { file = "functions"; class randomWeather {}; }; }; }; If you use it in a function way you MUST call it from init.sqf in this way: if (isServer) then { [] spawn OFF_fnc_randomWeather; };
  4. Hello We are currently developing an Sandbox Arma 3 Server. i want to make a Sniping spot where you can Snipe some AI´s the AI´s are set to: this disableai "ALL"; i got a simple Respawn script from a another forum post. which looks like this: the Problem is that when the ai Respawns the init isn´t there anymore so they run around and shoot at the players how can i fix that? thanks for you´re help Marvin Admin at German-Gamers.net
  5. So here's my problem: I have a line of code that goes into the init box of a group leader to make the group hunt the player(s) by setting a waypoint at the player's current position, however, the code runs at mission start (obviously because it's an init). I want to know if there's a line of code similar to WaitUntil that will work for the unit's init box in Eden. The reason I want to do it this way is because I don't want to mess with .sqfs/variable names for each individual unit/squad. What I have now is copy/paste-able in Eden and that's what I'm looking for. I've tried: 1) WaitUntil, but that command doesn't work in Eden 2) If TriggerIsActivated, but either I'm getting the syntax wrong or it doesn't work either. 3) enable dynamic sim, which is great, but it still places the waypoint at the start of the mission at the players Alternatively, I could loop the code, but I can't figure out how to use Sleep effectively where it's still performance friendly. Here's the code: if (isServer) then { _null = this spawn { Hunt_players_fnc = { _player = objNull; _players = +(allPlayers - (entities "HeadlessClient_F")); _distance = 100000; { if (alive _x && _x distance (Leader _this) < _distance) then { _distance = _x distance (Leader _this); _player = _x; }; } foreach _players; if !(isNull _player) then { _wp = (Group _this) addWaypoint [getPos _player, (50 + (floor(random 70)))]; _wp setWaypointStatements ["true","_null = this spawn Hunt_players_fnc;"]; _wp setWaypointType "SAD"; _wp setWaypointCombatMode "RED"; _wp setWaypointSpeed "FULL"; }; }; _null = _this spawn Hunt_players_fnc; }; }; Thanks.
  6. So I'm currently trying to make a mission like that from Ace Combat's multiplayer where each team is trying to take out the other's ground or sea assets first while in aircraft. Currently I'm just using a sector control game mode that works fine just using modules. What I've done is make it so dying and respawing for players doesn't take away tickets and the cap area is a tiny area in the middle of the map which players will ignore (this is a private multiplayer things so we just agree to ignore it) Now the point of the question. There is also a bunch of AI trucks driving around, when one of them dies I want it to take a specific number of tickets away from the side it belonged too. Therefore, destroying all of Opfor's teams AI trucks would mean they have no tickets and Blufor Would win. Is there something I could stick in the AI trucks "Init" in the editor that would just remove a number of sector control tickets for it's side die upon death?
  7. Hello, I am an ArmA veteran who is just getting into scripting, mostly out of necessity, as in a new setting I have a pilot who is currently flying the Gryphon from the AAF Faction, however this is an issue as the Gryphon is very lightly armed and we are having to frequently re-arm to remain combat effective. As such I want to arm Gryphons with heavier armaments and while I am having limited success I seem to have come up against a wall as far as progress is concerned. I have already worked out some basic script to give a Gryphon Two pods of DAGR 70mm Rockets; this setPylonLoadOut [4, "PylonRack_12Rnd_PG_missiles", true]; this setPylonLoadOut [3, "PylonRack_12Rnd_PG_missiles", true]; However, I now would like to see how I could add a Triple 'PylonPod' of Maverick's ATGM's to Pylon 5, and (if possible) a Dual Pylon of CBU-85 Cluster Bombs to Pylon 6. There is definitely enough physical space on the aircraft to accompany such weapons, but I just cant seem to find any way to arm them this way. Any help is much appreciated, especially anything that can set me up to do this sort of thing on my own in the future. Thanks, Dan.
  8. Hi, I need a script that every time a player connects on server directly when he is spawning exec 2 scripts (welcome music, intro) but only the player who connected should see it, like a init... i tryed it with Init.sqf,initPlayerLocal.sqf,initPlayerServer.sqf. Init only runs the 2 scripts on Server Mission start. an the other 2 did nothing? could you please help me?... Sry for my bad english!
  9. Test Lab Workshop for ARMA III, ver. BETA 0001 (2019) This download is compatible with APEX game version 1.7 and higher Drive Link Download: Test Lab New Live readMe file This download includes mission editor files. When my mission folder began to overflow with script test scenarios and VR compositions, I decided to create a master workshop file to use in the future. I considered what features should be built in. Hopefully this tool will be helpful for you, too. INSTALLATION Install the folder 0_testLAB.VR to your ArmA 3 mission folder (usually in Documents). Examples included: Images: Video: THANKS to everybody at: Bohemia Forums Check out our Patreon page Ascina Illustration & Design Arma Public License No Derivatives (APL-ND)
  10. Hello guys. Does anyone know a way to prevent functions from launching in the main menu? When I set up my functions to pre-init or post-init, they also execute in the main menu but I don't want this to happen.
  11. I have built a military training area in the game editor mode and its almost all ready to go live, however I cant seem to find the correct Init: in the functions menu for spawning people close to the training site. I would like to be able have people just join the live server and jump straight to the training site with a basic load out.
  12. Hey guys, what is the most efficient way to load your custom scripts during initialization? So far I've just been using [] execVm over and over and I can't help but feel there is a better way. Any better ways to list your scripts say as an "include" like in c++? I'm coming from a software developers point of view so throw what you got at me.
  13. Hi! simple question : is there a way to return an object's init code (set in the editor in its init field, or later with createVehicle) in the form of a string?
  14. Hi all sorry im again :D I would Give a unit a init over this trigger below when he join my group. The Condition of the trigger are : ({alive _x} count units mygroup) < 2 And in on Activation i would give the group member this in the init : dummy = [this, units (group this)] execVM "automedic.sqf"; This is for a script that force ACE 3 Ais to revive me . I know i can normally set :dummy = this ............. in the init field of my group member BUT the group member existing not before , i recuit them with the Ravage recuit script and want to give them the init when he joining me. Its that possible to make that over this Way ? I only found ways to spawn units with a init but nothing over joing player goup . Tanks again for Reading and hopfully try to help me ! :)
  15. Hi, I am fairly new to modding, so I don't understand too much yet. I searched the forums but not found much info about this. I made a script which adds a "HandleDamage" eventHandler and some code in it to a unit. I want to add this script to every man class unit created either on mission init or spawned later. Actually on mission start I can do it with a simple '{} forEach allUnits', but I have troubel with the spawned ones. I think it would be the best to add the code to every units init field. As I understand the eventHandler init should do the trick but I dont really understand how shold I set it up. Sofar I've tried to add this to my mods config.cpp class CfgVehicles { class EventHandlers { class Man; { init = "systemChat format ["Man created: %1", _this]"; }; }; }; Of course I would put run a 'fnc_somescript.sqf', but first I just tried to display a text for testing purposes. Could someone explain how this should work? Or show alterntive ways to run script for every man created. Thanks.
  16. I created a vehicle init script a few months ago with the purpose of automatically making the plane auto-eject pilots when the damage to the plane exceeds a certain threshold while limiting the damage to .9 for a few seconds preventing it from blowing up instantly. After a recent arma update however the script stopped working so I'm hoping that maybe someone more experienced in arma scripting can help me out with it. My current revisions (seperated with a line) of the vehicle init with comments: https://pastebin.com/XSyXyES1 I'm trying to avoid using seperate script files to make this a simple copy-paste solution for everyone who isn't that familiar with mission editing.
  17. Hi. I want to make an addon with this script: ["unit", {(_this select 0) setVariable ["ace_movement_loadCoef", 1]}, true] call CBA_fnc_addPlayerEventHandler; I ve tried following instructions from here: here http://www.ofpec.com/forum/index.php?topic=35205.0 and here But it still doesn t work. Any ideas? Thanks
  18. Hello all, This is Joel. I am a code newb and an EDEN noob. I love this game and I've been banging out my first scenario with glee, with a couple of puzzling hangups. I try assiduously to figure stuff out on my own and read in the forums. I feel like there a thousand variations of my problem with a thousand different replies. So, here I am asking for help. I apologize if this is painfully newbish. Here goes. 1. I am trying to create a properly formatted briefing. I first tried placing the creatediary module in the scenario editor screen, and editing the situation, mission, execution, signals, etc. The result, when played in the game is a sloppy, unformatted mess. I then read about using html tags when writing in the module text. NO change when played. I then found the F3's briefing code generator utility online and entered , generated, then pasted into a text file I created, renamed briefing.sqf. I created the init.sqf file and wrote this: [] execVM "briefing.sqf"; Nothing, and I mean nothing seems to be changing with the briefing. I'm really frustrated. I have created the init.sqf and briefing.sqf files in the same folder as the mission file I'm trying to play. Between this site, youtube, google, eveyone has an opinion and nothing they say seems to do the trick. Please help!
  19. So pretty much a long time I found this unit = group player createUnit ["classname", getPos player, [], 0, "FORM"]; and placed it in a radio trigger so when the player radios in he will get the corresponding unit. So after I implemented it in game it works but it spawns the unit for all players in game. Is there a way i can make it spawn only for the one activating the trigger.
  20. I have learned how to change weapon turrets and ammo on vehicles VIA inits, but can anyone tell me how to get the actual turret to be visible on the vehicle? As ridiculous as it sounds - I am trying to use twin 125mm cannons (and other weapons) from a Pawnee instead of the miniguns or DAR pods, and I would love to see them attached. Any help appreciated!
  21. Ok so for my missions I want all my unit members to be able to select premade loadout that I made depending on the role they want to play, I cant figure out how to do it. My idea was: There is the scroll menu (the different options that you have for actions in the scroll menu ), and somehow in the attributes of an ammo box there would be a script containing custom loadouts that I premade, and when someone would to check the different options of the ammo box there with the scroll menu there would be different roles that contain different loadouts. If any body could help me that we be amazing, if you didn't understand my question let me know ill try to be more understandable.
  22. Good Morning, for my SP/MP Mission i modified the script from Evo Dan's vehicle respawn script for vehilce respawn and made a new script for respawn AI Soldier-units. When the Chopper and the AI gets killed, the Chopper and pilot gets spawned at the Base, then the Pilot shall get in his specific vehicle. I have some more Pilots for CAS/EVAC/Halo/Support. My scripts are working, but my new Pilot doesnt know anymore where his old vehicle is, because the old vehicle got deleted and he didnt got the reference to the new vehicle. Here are my scripts, Vehicle Respawn Script: /* [EVO] Dan's vehicle respawn script modified by Steam-User immerfestedruv In the Unit Init Field insert <0 = [this,5] execVM "vehicle_respawn.sqf";> for example. Will run only on the server, as it only needs to run in one place, but obviously can be used in both singleplayer and multiplayer */ _vehicle = _this select 0; // First Argument, get vehicle's details _respawntime = _this select 1; // Second Argument, get the init set respawn time _facingofvehicle = getDir _vehicle; // get original facing _positionofvehicle = getPosATL _vehicle; // get original position _vehicletype = typeOf _vehicle; // get the vehicle type _vehicleName = vehicleVarName _vehicle; // get the Variable-Name from the Vehicle _n = 1; if(isServer) then{ while{_n == 1} do{ hint format ["Fahrzeug-Variablen-Name lautet ",_vehicleName]; if((!alive _vehicle) || (!canMove _vehicle)) then { //true if vehicle is not alive or it cannot move sleep 240; // respawn time between respawn/move and deletion deleteVehicle _vehicle; //clear up old vehicle sleep _respawntime; // respawn time between deletion and then respawn _vehicle = _vehicletype createVehicle _positionofvehicle; // create a new vehicle of same type at starting position _vehicle setPosATL _positionofvehicle; //set correct position _vehicle setDir _facingofvehicle; //set correct facing of the vehicle _vehicle setVehicleVarName _vehicleName; /* Next Code-Line will be executed for the new Object by your CPU, but time of execution unkown. This behaves similar to the code in the init-field of your object. */ [[[_vehicle,_respawntime],"vehicle_respawn.sqf"],"BIS_fnc_execVM",false,false] spawn BIS_fnc_MP; _n = 0; // break out condition }; sleep 120; // sleep for a bit in order to reduce processing calls }; }; Unit Respawn Script: /* Based on [EVO] Dan's vehicle respawn script modified by Steam-User immerfestedruv In the Unit Init Field insert <0 = [this,5,blackfish_1,"Driver"] execVM "unit_respawn.sqf";> for example. Will run only on the server, as it only needs to run in one place, but obviously can be used in both singleplayer and multiplayer */ _unit = _this select 0; // First Argument, get Unit's details _respawntime = _this select 1; // Second Argument,get the init set respawn time _vehicle = _this select 2; // Third Argument, Vehicle in which the unit shall get in _vehicleSeat = _this select 3; // Forth Argument, on which Seat shall the unit sit _facingofunit = getDir _unit; // get original facing _positionofunit = getPosATL _unit; // get original position _unittype = typeOf _unit; // get the unit type _unitgroup = group _unit; // get group of the original unit _unitName = vehicleVarName _unit; // get the Variable-Name of the Vehicle _unitRank = rank _unit; // get the units orignal rank _unitSkill = skill _unit; // get the original skill of the unit _n = 1; if(isServer) then{ while{_n == 1} do{ if (alive _vehicle) then { hint format ["Fahrzeug %1 lebt noch.",_vehicle]; switch (_vehicleSeat) do { case "Driver": {_unit moveInDriver _vehicle}; case "Gunner": {_unit moveInGunner _vehicle}; case "Turret": {_unit moveInTurret _vehicle}; case "Commander": {_unit moveInCommander _vehicle}; default {_unit moveInCargo _vehicle}; }; } else {hint format ["Kein Fahrzeug für %1 ",_unit];}; if((!alive _unit) || (!canMove _unit)) then { //true if unit is not alive or it cannot move sleep 120; // additional time delay between unit being killed and unit being deleted _unit setPosATL [0,0,0]; // move old unit away before respawn new unit sleep 1; // wait a bit for safety // create a new unit of same type at starting position _unittype createUnit [_positionofunit, _unitgroup,"newUnit = this", _unitSkill, _unitRank]; newUnit setVehicleVarName _unitName; newUnit setPosATL _positionofunit; // set correct position newUnit setDir _facingofunit; // set correct facing of the unit sleep _respawntime; // respawn time between respawn/move and deletion deleteVehicle _unit; // clear up old units? /* Next Code-Line will be executed for the new Object by your CPU, but time of execution unkown. This behaves similar to the code in the init-field of your object. */ [[[newUnit,_respawntime,_vehicle,_vehicleSeat],"unit_respawn.sqf"],"BIS_fnc_execVM",false,false] spawn BIS_fnc_MP; _n = 0; // break out condition }; sleep 60; // sleep for a bit in order to reduce processing calls }; }; How do i can get my Pilot in his new specific Chopper? And is it useful to use the command setVehicleVarName/vehicleVarName in a Multiplayer/Internet/Singleplayer Mission? Another idea would be to not delete the vehicle but to repair it and move it to origin position. How to? regards EDIT: Link to my working but not finished and optimized script, unit_respawn.sqf vehicle_respawn.sqf
  23. Edit: Nvm close this please. i just fixed the dedicated server issue (forgot to do an isDedicated check) so now putting the script in the vehicle init isn't required. Hey guys, i've been away from the ArmA scene for a while but it's all coming back pretty quick. I feel like ArmA is lying to me; in the init of a vehicle i have the following: nul = [this] execVM "scripts\mhq\respawnmhq.sqf"; and the first two lines of respawnmhq.sqf are: _mhqveh = _this select 0; _vehiclepos = getPos _mhqveh; So then when i launch the mission to test in the editor it has the gall to say respawnmhq.sqf has an: "Error getpos: Type Array, expected Object,Location". Correct me if I'm wrong, but there is no damn array in there right? [this] is an array with a single item from what i know but it's in the vehicle init not the script, _mhqveh is defined as the 'this' from within the array so is that causing it to think _mhqveh is an array? If so is there another way to execVM that script from the vehicle init? I'm doing this to avoid putting this script in the Init.sqf because really it doesn't need to go in there and if i do that it activates twice on dedicated servers but that's another issue entirely (which I'm pretending doesn't happen).
  24. Hi and thanks for helping I'm looking for an answer for hour and can't figure out how to do it, there must be a simple way to make an init value persist after the unit respawns in multiplayer. For instance, the playable units of my game have this init: this enableFatigue false; this setCustomAimCoef 0.85; But as soon as the player dies and respawns those init lines doesn't work anymore. Can somebody give me a hand?
  25. EDEN aka 3D editor: 1. I place down the unit and first one appears not wearing any body camo (transparent well, sky texture) 2. 2nd placed unit is all wrecked up model, see example shot: http://www.vojak.si/photos/fancy.jpg Usually ends with game crash (CTD). If I do the same in 2D editor it works just fine, units perform without any glitch or missing textures, they don't break model. What is funny is that after 2D editor I can ran EDEN/3D and it works there too? :) some kind of init failure or what? I've given all that info to Tom aka J. to inspect. I can supply the units causing that in order to pinpoint the problem -I've tried for 4 days and I give up.
×