KiloSwiss Posted January 18, 2015 Author Report Share Posted January 18, 2015 Better use https://community.bistudio.com/wiki/addVehicle And assignAsDriver, assignAsCargo etc. for specific vehicle roles. And don't forget to unlock the vehicle, or only lock driver and cargo but allow AI to man turrets if the vehicle is static. Greez KiloSwiss Link to comment Share on other sites More sharing options...
Leigham Posted January 18, 2015 Report Share Posted January 18, 2015 something like this _veh = createVehicle["B_MRAP_01_EPOCH", _pos, [], 0, "NONE"]; _veh setDamage 0.8; _veh setFuel 0; _veh setVariable["LASTLOGOUT_EPOCH",1000000000000]; _veh setVariable["LAST_CHECK",1000000000000]; //So Vehicle doesnt despawn EPOCH_VehicleSlotsLimit = EPOCH_VehicleSlotsLimit + 1; EPOCH_VehicleSlots pushBack str(EPOCH_VehicleSlotsLimit); _slot = EPOCH_VehicleSlots select 0; _veh setVariable ['VEHICLE_SLOT',_slot,true]; EPOCH_VehicleSlots = EPOCH_VehicleSlots - [_slot]; EPOCH_VehicleSlotCount = count EPOCH_VehicleSlots; publicVariable 'EPOCH_VehicleSlotCount'; _veh call EPOCH_server_setVToken; //Creates vehicle inventory clearWeaponCargoGlobal _veh; clearMagazineCargoGlobal _veh; clearBackpackCargoGlobal _veh; clearItemCargoGlobal _veh; _group = [_pos,(15+(random 7))] call SEM_fnc_spawnAI; //Spawn AI into Vehicle _grp = [_pos,2)] call SEM_fnc_spawnAI; _grp addVehicle _veh _grp assignAsDriver _veh _grp assignAsCargo _veh Link to comment Share on other sites More sharing options...
cyncrwler Posted January 18, 2015 Report Share Posted January 18, 2015 I put 0.6 on my test server last night, commented out the launchers though. Had another issue where the AI would only fire at me if I was within 50m exactly. 51m they didn't fire, stepped forward to 49 they opened up, anyone else had this behaviour? Only had that issue once in every long while, and not with the whole mission crew. They work off line of sight, so if they see you at 700 meters, they shoot you at 700 meters. If they don't see you, you can walk up and pop a bullet in their heads. You should move up to v0.7.1 though, lots of improvements. Also, the launchers disappear upon AI death, so players can't pick them up. I think the launcher units keep shite real. Last night they fired a rocket at my team mate, when he was running from one position to another...good stuff!! Link to comment Share on other sites More sharing options...
Leigham Posted January 18, 2015 Report Share Posted January 18, 2015 just tried what i posted 2 lines up, getting this ? 14:08:43 Error in expression <)] call SEM_fnc_spawnAI; _grp = [_pos,1)] call SEM_fnc_spawnAI; _grp addVehicle> 14:08:43 Error position: <)] call SEM_fnc_spawnAI; _grp addVehicle> 14:08:43 Error Missing ] 14:08:43 File sem\missions\DisabledHunter.sqf, line 43 Link to comment Share on other sites More sharing options...
KiloSwiss Posted January 18, 2015 Author Report Share Posted January 18, 2015 You have a ) after the Number. _grp = [_pos,1] call ... But the function to spawn AI will always spawn a minimum of 5 Units. Better take one of the already spawned units and assign him a vehicle role. Greez KiloSwiss Link to comment Share on other sites More sharing options...
Leigham Posted January 18, 2015 Report Share Posted January 18, 2015 how would i take just one of the ai, or would it just pick one at random Link to comment Share on other sites More sharing options...
Tywin Posted January 18, 2015 Report Share Posted January 18, 2015 Revive player is not working on my server, I have only these missions and a Welcome text script on my server, does anyone know if they could be causing the revive player not to work? Link to comment Share on other sites More sharing options...
KiloSwiss Posted January 18, 2015 Author Report Share Posted January 18, 2015 @Leigham Do not select the first unit of the group because this is always the leader. This code selects the last unit, which is never a specialized unit like sniper, SMG, AT-soldier, etc. _unit = units _group select (count units _group -1); Link to comment Share on other sites More sharing options...
Leigham Posted January 18, 2015 Report Share Posted January 18, 2015 Thanks, so if i wanted someone in turret select another unit _unit = units _group select (count units _group -2); _unit assignAsGunner _veh; ? ~~~ Edit, while trying to add just a driver, im getting : 17:47:03 Error in expression <select (count units _group -1); _unit addVehicle _veh; _unit assignAsDriver _v> 17:47:03 Error position: <addVehicle _veh; _unit assignAsDriver _v> 17:47:03 Error addvehicle: Type Object, expected Group so im doing it as if _veh = is my vehicle _group = calls your spawn script _unit = selects one unit from the _group Link to comment Share on other sites More sharing options...
KiloSwiss Posted January 18, 2015 Author Report Share Posted January 18, 2015 Read the BIS wiki page I linked You, addVehicle expects a group not a single unit. I don't want to sound mean and I really appreciate Your efford here but, these are basic scripting errors and they tell You exactly what is wrong. You should be able to fix (most of) them by Yourself. Link to comment Share on other sites More sharing options...
Leigham Posted January 18, 2015 Report Share Posted January 18, 2015 i got it, just didnt read it right, if im using addVehicle. im sending a group to the vehicle. but using assign to, i have to select a single unit KiloSwiss 1 Link to comment Share on other sites More sharing options...
Leigham Posted January 18, 2015 Report Share Posted January 18, 2015 Right so. 1. The Mission is working as it should, AI are spawning in the vehicle, it is driving around as it should. 2. The rpt is being spammed, by errors, but the errors arent in the script .pbo its File A3\functions_f\misc\fn_fineSafePos.sqf Link to comment Share on other sites More sharing options...
KiloSwiss Posted January 18, 2015 Author Report Share Posted January 18, 2015 It's great to hear about Your progress *thumbsup* You can send me the errors via PM and/or ask me directly if You need assistance or help with something. Greez KiloSwiss Link to comment Share on other sites More sharing options...
Ducky Posted January 18, 2015 Report Share Posted January 18, 2015 KiloSwiss how would I configure it for other maps Link to comment Share on other sites More sharing options...
Ducky Posted January 18, 2015 Report Share Posted January 18, 2015 This is the last thing I get in my RPT 20:17:20 "#SEM: Start AllowPlayerDamage Script" 20:17:20 "#SEM: Start Simple Epoch Missions" Then the missions don't spawn Link to comment Share on other sites More sharing options...
Ducky Posted January 18, 2015 Report Share Posted January 18, 2015 I think SEM isn't receiving the world data Link to comment Share on other sites More sharing options...
Leigham Posted January 18, 2015 Report Share Posted January 18, 2015 how long did you leave it ? missions dont spawn straight away, unless you edit it in fn_missions.sqf in the pbo, and missions dont spawn unless there is a certain amount of players on the server , I have mine set to 1 :D Link to comment Share on other sites More sharing options...
Ducky Posted January 18, 2015 Report Share Posted January 18, 2015 Yeah I had mine set to 10-15 mins and then 1 player and it didn't spawn after 20 mins Link to comment Share on other sites More sharing options...
Leigham Posted January 18, 2015 Report Share Posted January 18, 2015 if you need help join my ts, "udskies.co.uk" Link to comment Share on other sites More sharing options...
Leigham Posted January 18, 2015 Report Share Posted January 18, 2015 this is the chunk of RPT that spams :D 13:21:51 Error in expression < BIS_fnc_isPosBlacklisted)) then { if ((_pos distance _testPos) >= _minDist) the> 13:21:51 Error position: <_pos distance _testPos) >= _minDist) the> 13:21:51 Error Undefined variable in expression: _pos 13:21:51 File A3\functions_f\misc\fn_findSafePos.sqf, line 98 13:21:51 Error in expression <["_newX", "_newY", "_testPos"]; _newX = _posX + (_maxDist - (random (_maxDist * > 13:21:51 Error position: <_posX + (_maxDist - (random (_maxDist * > 13:21:51 Error Undefined variable in expression: _posx 13:21:51 File A3\functions_f\misc\fn_findSafePos.sqf, line 90 Link to comment Share on other sites More sharing options...
Havoc302 Posted January 18, 2015 Report Share Posted January 18, 2015 Revive player is not working on my server, I have only these missions and a Welcome text script on my server, does anyone know if they could be causing the revive player not to work? Not sure if it's related but mine has also stopped working reliably. I however also have other scripts running and VEMF loaded. Link to comment Share on other sites More sharing options...
Ducky Posted January 18, 2015 Report Share Posted January 18, 2015 No I have ported over to panthers and installed sem but its isn't being given the locations of the map or the world data would anyone know how I could fix this Link to comment Share on other sites More sharing options...
KiloSwiss Posted January 18, 2015 Author Report Share Posted January 18, 2015 Are You talking about Panthera Island? SEM is configured to work with every custom Island, there should be no problem at all. I will double check the code of my getWorldData function tomorrow, just to make sure everything works. @Leigham You are sending wrong data in Your arguments, or not enough arguments at all to the function BIS_fnc_findSafePos Greez KiloSwiss Link to comment Share on other sites More sharing options...
Ducky Posted January 18, 2015 Report Share Posted January 18, 2015 Cheers kiloswiss yeah panthera god damn auto correct Ducky 1 Link to comment Share on other sites More sharing options...
Leigham Posted January 18, 2015 Report Share Posted January 18, 2015 i havent edited anything in the getpos file ? just adding the players to the vic, do you think maybe spawn a fresh AI just for that mission ? Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now