sprucewaine
Member-
Content Count
53 -
Joined
-
Last visited
-
Medals
Community Reputation
1 NeutralAbout sprucewaine
-
Rank
Lance Corporal
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
-
Does anyone have a working example of creating a spawn AI module via a script? Simply doing this with _pos being defined, doesn't seem to do anything. (createGroup sideLogic) createUnit ["ModuleSpawnAI_F",_pos,[],0,"NONE"];
-
Creating Sectors by Script.
sprucewaine replied to sprucewaine's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Upon retrying with a different map (stratis), i am still only getting one sector from your script. Would there be a mod that might affect anything? I got an ACE IF3 CBA setup. -
a.i. Tactical Combat Link - TypeX
sprucewaine replied to snkman's topic in ARMA 3 - ADDONS & MODS: COMPLETE
Hey, I love the mod. So glad to ditch alive, Alive was a great mod but it tried to do too many things, which made it contrast with vanilla features destroying the feel of the game. (Opinion, lol i am amazed at ALIVE still and people should still utilize it. I think the mod and alive are compatible as well, Best of both worlds) With caching and unit spawning by arma 3, and your mod.... making a lively world now flawlessly blends into the vanilla game. Couldn't thank you enough. On the side note, do you know what i could do about morale and retreating? Are you eventually going to implement that? Your mod makes the AI so responsive, that in zeus i was just appalled by the amount of dead bodies everywhere. The helicopters are a bit suicidal, and will even just hover almost like they are waiting to get shot down, I think i had to tell the pilot to land both times in zeus. Sometimes when they try to land, i think its way too close to the action. Are little birds and Chinooks treated the same? because both as a transport would probably require different approaches to dropping troops off in the field. I can see big helicopters landing troops near the action, but small ones should land much farther, and give the small amount passengers that they have a chance to approach the action in a clever/sneaky way. (I was playing in arma 3 development mode on the new map; I haven't tested the mod by it self on a standard map) Few ideas that you are free to ignore. It would be cool if dead bodies and wrecks were taken into consideration, making the AI avoid any areas with massive amounts of em. Squads probably shouldn't fight till the last man, squads should kinda have "health". If you spawn a 6 player squad and it gets down to 2 players, I wouldn't blame the squad for dismissing it self, wandering away from the enemy, and then eventually joining another squad later. I kinda wish there was a sentry / guard / cavalry escalation. Hetman had something like this. I just like the idea of the AI utilizing Scout units to get a "feel" for the whole map, they should be sneaky and not engage unless fired at (snipers take one or three shots at a squad, and then run into the forrests). Then the guards come in and will utilize the information gathered to move fronts or plan attacks. Everything else is just there for support. Of course the reason I'm telling you this is because AI mods don't work well together, so its best to just pick one. Anyway I'm sure what ever direction you decided to go in will be worthwhile, Looking forward to seeing future updates! -
Zeus editing costs with RHS + limit factions in zeus.
sprucewaine replied to Mr H.'s topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hey so ill give you a few tips of what I've tried to do with faction specific missions. If you work with configs, it can make your life a lot easier. I was trying to pull load outs for the re spawn inventory screen, and i manage to pull it off. configs = [ (configFile >> "CfgGroups" >> "Indep" >> "LIB_US_ARMY" >> "Infantry"), 1, false ] call BIS_fnc_returnChildren select {inheritsFrom _x isEqualTo (configFile >> "Man")}; loadouts = []; {loadouts pushBack getText (_x >> 'vehicle')} forEach configs; publicVariable "loadouts"; { [resistance,[_x]] call BIS_fnc_addRespawnInventory; } forEach loadouts; So you have your config entry, how deep the function is going to dig to pull things, and then that boolean is to make sure you only get the very last entry. Then you have it grabbing the actual cfgvehicle name. And then i used a foreach to apply to the loadouts. Anyway you could use this same method to pull all sorts of things, and organize em. Perhaps even sort out the "MAN" array by rank, and have the rank define the costs, so corporals would cost more. On vehicles you can look at number seats, so a quad bike would be cheap, but a truck would be expensive. Sorry that I'm not proficient enough to actually work all this out, but i hope this helps. If you want, you can also do all your costs by hand. [ getAssignedCuratorLogic player, ["ModuleFlareWhite_F",0.02,"ModuleFlareYellow_F",0.02,"ModuleFlareGreen_F",0.02]] call BIS_fnc_curatorObjectRegisteredTable; To individually set costs. Just keep adding to that array with CFG Vehicle, then the price. Cya around! btw if u do the last suggestion, if u add all the vehicle names of the same group, the groups should appear. You need all the vehicle names priced in the group, and for Iron front u need to include the winter units to get access to spawning the grouped units... for what ever reason. IIRC , they might of fixed it. -
Creating Sectors by Script.
sprucewaine replied to sprucewaine's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Gotcha, yeah ill try with other maps later, ATM i am doing the WW2 maps from iron front mod. I was going to be working with the base game maps and dlc maps eventually so, this will come in handy regardless. Thanks for the help. -
Creating Sectors by Script.
sprucewaine replied to sprucewaine's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I was not able to get that one to work, still only spawns one in the middle. "bis_o65 waiting" - the chat log, what ever that means. -
Creating Sectors by Script.
sprucewaine replied to sprucewaine's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Nvm i figured it out. Here is finished product. halfWorldSize = (worldSize / 2); allLocations = nearestLocations [[halfWorldSize,halfWorldSize,0], ["NameVillage","HistoricalSite","NameCityCapital","NameCity"], halfWorldSize]; { _pos = locationPosition _x; //Create the sector logic _logic = (createGroup sideLogic) createUnit ["ModuleSector_F",_pos,[],0,"NONE"]; //Default setting, which are optional _logic setVariable ["DefaultOwner","-1"]; _logic setVariable ["OnOwnerChange",""]; _logic setVariable ["OwnerLimit","0"]; _logic setVariable ["ScoreReward","0"]; _logic setVariable ["TaskOwner","3"]; //Set the sides for the sector _logic setVariable ["sides",[ east, west ]]; //A size for the trigger _trgSize = 500; //Set the trigger size on the sector _logic setVariable [ "size", _trgSize ]; //Make the module update its trigger [_logic] call BIS_fnc_moduleSector; //Unfortunately the sector has not been written to also update its marker so.. //Get the modules trigger _trg = ( _logic getVariable "areas" ) select 0; //Get the triggers marker _mrk = ( _trg getVariable "markers" ) select 0; //Update the markers size _mrk setMarkerSize [ _trgSize, _trgSize ]; } forEach allLocations; Yeah i apologize deeply for just taking code like that, and not understanding it all that well. -
I copied larrow's code and tried running it through this setup. halfWorldSize = (worldSize / 2); allLocations = nearestLocations [[halfWorldSize,halfWorldSize,0], ["NameVillage","HistoricalSite","NameCityCapital","NameCity"], halfWorldSize]; { _pos = locationPosition _x; //Create the sector logic _logic = (createGroup sideLogic) createUnit ["ModuleSector_F",_pos,[],0,"NONE"]; //Default setting, which are optional _logic setVariable ["DefaultOwner","-1"]; _logic setVariable ["OnOwnerChange",""]; _logic setVariable ["OwnerLimit","0"]; _logic setVariable ["ScoreReward","0"]; _logic setVariable ["TaskOwner","3"]; //Set the sides for the sector _logic setVariable ["sides",[ east, west ]]; //Wait until sector is initialised waitUntil { !isNil { _logic getVariable [ "finalized", nil ] } && { !( _logic getVariable [ "finalized", true ] ) } }; //A size for the trigger _trgSize = 500; //Set the trigger size on the sector _logic setVariable [ "size", _trgSize ]; //Make the module update its trigger [ _logic, [], true, "area" ] call BIS_fnc_moduleSector; //Unfortunately the sector has not been written to also update its marker so.. //Get the modules trigger _trg = ( _logic getVariable "areas" ) select 0; //Get the triggers marker _mrk = ( _trg getVariable "markers" ) select 0; //Update the markers size _mrk setMarkerSize [ _trgSize, _trgSize ]; } forEach allLocations; But it only creates one sector. I don't know why its not working. More info on what I'm trying to do, i really like the idea of a scripted mission given how versatile it will be, just to drag the scripts over to any map. Once i get sectors on all the location spots, ill be trying to hook up the spawn ai modules.
-
sprucewaine started following Larrow
-
I am pretty sure that there is still a group limit attached to that. Its like 288 or something now, bumped from 144.....
-
How would you go about caching units only to be deleted later, but doing it all locally? Ive set up a nice script that populates towns with random patrols, now i just need a way for the patrols to get deleted once the player leaves the area. HNK_fnc_createVehPatrols does nothing, thats for later once i figure out how to delete the spawned units. :P Also i ment to type selectRandom instead of floor random.
-
Getting AI to land Chopper
sprucewaine replied to sprucewaine's topic in ARMA 3 - MISSION EDITING & SCRIPTING
You are right about me reading the wiki wrong, i didn't expect it wanting the vehicle instead of the driver. -
Getting AI to land Chopper
sprucewaine replied to sprucewaine's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Welp, so apparently telling the leader of the group to land does nothing. You must tell the actual helicopter to land. so by adding a "vehicle this" to the waypointstatement, i managed to get it to work. :( half a day gone. Learning to script out everything so that you don't have to use the editor is an amazing and wroth while endeavor. You have the potential to create a live universe that can spawn it self when needed, and delete itself when not. If you do it correctly, it won't even matter what map its on, you could just copy and paste the scripts into any map and it will work. -
Getting AI to land Chopper
sprucewaine replied to sprucewaine's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Its not searching, its just hovering. The command works pretty well, but i haven't gotten it to work on a way point statement might be the issue. Although the way point statement works fine with any other command. -
Getting AI to land Chopper
sprucewaine replied to sprucewaine's topic in ARMA 3 - MISSION EDITING & SCRIPTING
The do stop did not work, perhaps i did it wrong. I did both doStop units _veh, and doStop _veh. edit *I made a mistake and put _veh instead of this, but i tried this, and it still didn't work?* thanks for the suggestions on removing the event handler. -
I want the crew to stay in the helicopter, but i don't know how to get it to land in any other way but this. player addEventHandler ["Fired", { params ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile", "_gunner"]; if (_ammo isEqualTo "SmokeShell") then { _unit removeEventHandler ["Fired", 0]; _pos = [getPos _projectile, 500, 500] call BIS_fnc_findSafePos; _veh = createVehicle ["B_CTRG_Heli_Transport_01_tropic_F", _pos, [], 0, "FLY"]; _veh allowdamage false; createVehicleCrew _veh; {myCurator addCuratorEditableObjects [[_x],true ];}forEach units group _veh; //debug _wp = group _veh addWaypoint [position _projectile, 0]; _wp setWaypointType "GETOUT"; _veh addEventHandler ["GetIn", { params ["_vehicle", "_role", "_unit", "_turret"]; [tsk,"SUCCEEDED"] call BIS_fnc_taskSetState; [tsk] call BIS_fnc_deleteTask; call selectRandom [HNK_fnc_createTask_HVT]; {deleteVehicle _x}forEach crew _vehicle; deleteVehicle _vehicle; }]; }; }]; Keep in mind, ive spent the whole day trying out setWaypointstatement, and trying utilizing what the wiki example gave. _helicopter move (getPos _destination); sleep 3; while { ( (alive _helicopter) && !(unitReady _helicopter) ) } do { sleep 1; }; if (alive _helicopter) then { _helicopter land "LAND"; }; And the AI will just hover over where it is suppose to land. Also if you know how to add a waitUntil {speed _projectile == 0}, much appreciated because i keep getting generic error in any form of implementation i choose.