machine6fd Posted December 22, 2014 Report Share Posted December 22, 2014 hey guys, I have added server side missions to my server. this is a Frankenstein of all the ones that have been posted on these forums. i don't take credit and i wont be helping anyone with issues. I've spent a few days trying to make them work and they are working.... please know that the code is sloppy... lol spent a few late nights full of coffee getting this working. there are and will be much better AI out there for you infact i think the one on the the actual AI forum looks pretty promising. But anyway thought i would share what i got working. https://www.dropbox.com/s/sslmty5tfdc3drd/a3_missionsPlus_server.pbo?dl=0 this will go in your @EpochHive\Addons folder. You will need to add this to you mission.pbo init file. so people can see the mission hint. "GlobalHint" addPublicVariableEventHandler { private ["_ogjstr"]; _ogjstr = _this select 1; hint parseText format["%1", _ogjstr]; }; again... I take no credit for any of the code. I also wont be helping with support. unless minor issues. If you have battle eye kicks search the forums there are ways to fix them yourself. gl hf *uploaded file with _unit1 setVariable [ "LASTLOGOUT_EPOCH" , diag_tickTime + 1500 ]; /// = 25min delete corrected. Pagan and MisterT 2 Link to comment Share on other sites More sharing options...
SKS.Goliath Posted December 22, 2014 Report Share Posted December 22, 2014 _unit1 setVariable["LASTLOGOUT_EPOCH",99999999]; but the AI will never be deleted Link to comment Share on other sites More sharing options...
prue420 Posted December 22, 2014 Report Share Posted December 22, 2014 Do i use the init in the download or do i make one? Link to comment Share on other sites More sharing options...
prue420 Posted December 22, 2014 Report Share Posted December 22, 2014 sks where would i put that? Link to comment Share on other sites More sharing options...
SKS.Goliath Posted December 22, 2014 Report Share Posted December 22, 2014 _unit1 setVariable["LASTLOGOUT_EPOCH",99999999]; but the AI will never be deleted 9999999 = infinitely _unit setVariable [ "LASTLOGOUT_EPOCH" , diag_tickTime + 1050 ]; /// = 17min delete Link to comment Share on other sites More sharing options...
machine6fd Posted December 22, 2014 Author Report Share Posted December 22, 2014 _unit setVariable [ "LASTLOGOUT_EPOCH" , diag_tickTime + 1050 ]; /// = 17min delete will work... forgot to remove that after testing them. Link to comment Share on other sites More sharing options...
machine6fd Posted December 22, 2014 Author Report Share Posted December 22, 2014 Do i use the init in the download or do i make one? make one in your mission pbo Link to comment Share on other sites More sharing options...
SKS.Goliath Posted December 22, 2014 Report Share Posted December 22, 2014 make one in your mission pbo ME FILES ["Check your map, There some dbags lurking around","BIS_fnc_log"] call BIS_fnc_MP; ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //Mission BEGUN message //////////////////////////////////////////////////////////////////////////////////////////////////////////////////// _ogjstr = "<t align='center' size='2.0'>EPOCH Side Missions<br/>Find the IKEA Box</t><br/>______________<br/><br/> <br/>We dropped IKEA BOX for survivors, but mad scientists group secured the location.<br/> You have our permission eliminate the threat and confiscate any property you find as payment for your trouble!"; GlobalHint = _ogjstr; publicVariable "GlobalHint"; //////////////////////////////////////////////////////////////////////////////////////////////////////////////////// _marker = createMarker ["Marker1",[9807.3,8707.2]]; _marker setMarkerType "mil_warning"; "Marker1" setMarkerText "IKEA"; "Marker1" setMarkerColor "ColorRed"; _centerpos = getmarkerpos "Marker1"; _unitGroup = createGroup RESISTANCE; _unitGroup setBehaviour "AWARE"; _unitGroup setCombatMode "RED"; for "_i" from 1 to 7 do { _unit = _unitGroup createUnit ["I_Soldier_EPOCH", _centerpos, [], 0, "FORM"]; //_unit setVariable [ "LASTLOGOUT_EPOCH" , 1060 ]; _unit setVariable [ "LASTLOGOUT_EPOCH" , diag_tickTime + 1050 ]; //_unit setVariable ["LASTLOGOUT_EPOCH" , diag_tickTime + 180]; _unit setSkill 0.6; _unit setRank "Private"; _unit enableAI "TARGET"; _unit enableAI "AUTOTARGET"; _unit enableAI "MOVE"; _unit enableAI "ANIM"; _unit enableAI "FSM"; }; []execVM "serverscripte\epoch\mission\crates\box1.sqf"; sleep 1000; ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //Mission COMPLETED message ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////// _ogjstr = "<t align='center' size='2.0'>EPOCH Missions</t><br/> ______________<br/><br/> Mission accomplished survivors!<br/> next mission starts in <br/> 16 minutes."; GlobalHint = _ogjstr; publicVariable "GlobalHint"; sleep 60; deleteMarker "Marker1"; sleep 10; []execVM "serverscripte\epoch\mission\call_missions.sqf"; Link to comment Share on other sites More sharing options...
prue420 Posted December 22, 2014 Report Share Posted December 22, 2014 Do have to have a hc because i cant get hurt from the AI shooting me? Link to comment Share on other sites More sharing options...
machine6fd Posted December 22, 2014 Author Report Share Posted December 22, 2014 Do have to have a hc because i cant get hurt from the AI shooting me? no HC, they are working on mine and killing people. their aim is crap though. you can adjust if you like. last time i had AI running they were aim hacking and killing people too easily so they are dumb'd down. Link to comment Share on other sites More sharing options...
machine6fd Posted December 22, 2014 Author Report Share Posted December 22, 2014 @SKS.Goliath not sure what you mean by posting that? language barrier? Link to comment Share on other sites More sharing options...
Jmay Onzo Posted December 22, 2014 Report Share Posted December 22, 2014 it works for me if I die first then go to the mission otherwise i take no damage, this has been a problem with missions and ai in the past as well nice work btw Link to comment Share on other sites More sharing options...
machine6fd Posted December 22, 2014 Author Report Share Posted December 22, 2014 it works for me if I die first then go to the mission otherwise i take no damage, this has been a problem with missions and ai in the past as well nice work btw just pasted code posted here together with duct tape :) Link to comment Share on other sites More sharing options...
Darth_Rogue Posted December 22, 2014 Report Share Posted December 22, 2014 What's the best way to change the map dimensions so the missions spawn inside the map on Chernarus. I'm guessing it's in this line here: _pos = [_mPos,0,-1,20,0,4000,0]call BIS_fnc_findSafePos; But I'm not sure what to edit. Ideas? brent65622 1 Link to comment Share on other sites More sharing options...
prue420 Posted December 22, 2014 Report Share Posted December 22, 2014 Ya its just not worth it to much free gear for people. And every restart the person has to die again to take damage. Link to comment Share on other sites More sharing options...
machine6fd Posted December 22, 2014 Author Report Share Posted December 22, 2014 Ya its just not worth it to much free gear for people. And every restart the person has to die again to take damage. The one coming soon will be better. just thought i'd share for those that cant use headless client. Link to comment Share on other sites More sharing options...
Atavis Posted December 22, 2014 Report Share Posted December 22, 2014 machine6fd, Come on strider and bots on me don't shoot, go around me. Also I don't take damage from bots. How to deal with it? http://www.youtube.com/watch?v=gQw0Fp1MsJk&feature=youtu.be Link to comment Share on other sites More sharing options...
Player1 Posted December 22, 2014 Report Share Posted December 22, 2014 Atavis. Video is privat. machine6fd, the Bandit Camp doenst spawn a Box. Other Missions works fine. Can you fix that? Thanks. Link to comment Share on other sites More sharing options...
Darth_Rogue Posted December 22, 2014 Report Share Posted December 22, 2014 Having the same issue as others with players taking no damage. Has to be some way to set the server as the owner of the AI units when they are spawned in. Link to comment Share on other sites More sharing options...
machine6fd Posted December 22, 2014 Author Report Share Posted December 22, 2014 Having the same issue as others with players taking no damage. Has to be some way to set the server as the owner of the AI units when they are spawned in. Headless client. There might be someway to add a script to find the ai units and tie them to the nearest client... When testing I had more than one player so didn't notice the extent of the issue. Honestly I think digging into it too much would be a waste of time as the other AI mission system will be a whole lot better and with more functionality. Link to comment Share on other sites More sharing options...
pr0dukt Posted December 22, 2014 Report Share Posted December 22, 2014 Lol good attempt. Almost got it all working. Damage is the tricky part because of the load player.sqf in the epoch server side pbo. I'd start looking around there to figure out how to bypass the AllowDamage= false from ai; for players loading into the server from restarts. ;] Link to comment Share on other sites More sharing options...
Darth_Rogue Posted December 22, 2014 Report Share Posted December 22, 2014 Headless client. There might be someway to add a script to find the ai units and tie them to the nearest client... When testing I had more than one player so didn't notice the extent of the issue. Honestly I think digging into it too much would be a waste of time as the other AI mission system will be a whole lot better and with more functionality. I had the same thought with the HC. But the HC tutorial on the forums here is for incorporating an HC with AI whose files are stored in the mission. Since the package that you posted runs server side I don't know that the HC would be effective in that case. Honestly I can't even test that theory at this point since I keep getting BE kicked when using HCs on my test server. So until I get that fixed I won't know for sure. Link to comment Share on other sites More sharing options...
machine6fd Posted December 22, 2014 Author Report Share Posted December 22, 2014 Looking at the new VEMF system that is being worked on he is making the AI basically sit idle and when a player is near they become attached to that player. Far as i can tell this is being done server side with no mission.pbo scripts perhaps he can shed more light on the idea but this is what i see in his code so far. _owner = owner ((_pos nearEntities [["Epoch_Male_F", "Epoch_Female_F"], 800]) select 0); Link to comment Share on other sites More sharing options...
pr0dukt Posted December 22, 2014 Report Share Posted December 22, 2014 You can add _ailist to public variables and define it there. Then all you need to do find out how exempt the array you set in the ailist from being cleaned up from the doppleganger code in the vehiclesimulation.fsm. Which is where all the AI problems come from. Alas with the new patch coming out and being as it removes that code completely which save you lot all a headache, I'd just hold off until patch day to pursue this. It was an annoyance getting it working the way I wanted..this new patch will make a lot of scripts much easier to execute. Link to comment Share on other sites More sharing options...
Darth_Rogue Posted December 22, 2014 Report Share Posted December 22, 2014 Alas with the new patch coming out and being as it removes that code completely which save you lot all a headache, I'd just hold off until patch day to pursue this. It was an annoyance getting it working the way I wanted..this new patch will make a lot of scripts much easier to execute. You mean the new patch will feature different cleanup code that should allow AI to spawn and stay? Am I reading you right? If so that would be huge! lol 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