Jump to content

nms

Member
  • Content Count

    3
  • Joined

  • Last visited

  • Medals

Community Reputation

0 Neutral

About nms

  • Rank
    Rookie
  1. I just ran into a similar problem. If you are using the scripted version you could try editing the following file "VCOMAI_ArtilleryCalled.sqf" -> replacing target pos (getPos _Enemy) getHideFrom _Enemy like this: private _enemyPos = _Unit getHideFrom _Enemy; if ((_enemyPos isEqualTo [0,0,0])) exitWith {}; And then replace all other occurrences of (getPos _Enemy) with _enemyPos. I just started testing this change, so I'm not sure if it will brake stuff or not, but it seems to work. getHideFrom returns the Position where object (_Unit in this case) believes the enemy to be.
  2. Hi Zenophon. I have been playing around with the new cache functions and there doing wonders for my framerate on a large Tanoa mission. I have encountered one problem, often the first call to Zen_Cache will take more than 120 seconds. I have tracked this down to the 2.line below (in Zen_Cache.sqf): Zen_Cache_Group_Array pushBack (createGroup _x); _group = [[0,0,0], _x, 0, 1] call Zen_SpawnInfantry; (units _group) join (Zen_Cache_Group_Array select _forEachIndex); 0 = [(units _group)] call _F_Cache; I did a quick proof of concept where I changed the _F_SideToIndex into _F_SideToGroup: //Function used by _F_SideToGroup to create group leader private _F_CreateDummyGroupLeader = { params ["_class","_group"]; _class createUnit [[0,0,0], _group, "", 0, "COLONEL"]; [(units _group)] call _F_Cache; }; _F_SideToGroup = { (switch (_this select 0) do { case west: { if (isNil "WEST_GROUP") then { WEST_GROUP = createGroup west; ["B_Soldier_02_f", WEST_GROUP] call _F_CreateDummyGroupLeader; publicVariable "WEST_GROUP"; }; WEST_GROUP; }; case east: { if (isNil "EAST_GROUP") then { EAST_GROUP = createGroup east; ["O_G_Soldier_F", EAST_GROUP] call _F_CreateDummyGroupLeader; publicVariable "EAST_GROUP"; }; EAST_GROUP; }; case resistance: { if (isNil "RESISTENCE_GROUP") then { RESISTENCE_GROUP = createGroup east; ["I_G_Soldier_F", RESISTENCE_GROUP] call _F_CreateDummyGroupLeader; publicVariable "RESISTENCE_GROUP"; }; RESISTENCE_GROUP; }; case civilian: { if (isNil "CIVILLIAN_GROUP") then { CIVILLIAN_GROUP = createGroup east; ["C_man_1", CIVILLIAN_GROUP] call _F_CreateDummyGroupLeader; publicVariable "CIVILLIAN_GROUP"; }; CIVILLIAN_GROUP; }; default { (-1) } }) }; And then just use "_unitsGrouped join ([side _unit] call _F_SideToGroup);" when caching units. Performance of the the initial call to Zen_Cache is significantly improved, the biggest downside is the hard dependency on the class names for each side.
  3. Hi tpw, I have been using the mod for some time now to make maps come to life. Lately I have been integrating the script version in a mission(unreleased stuff mostly for educational purposes so far). In the mission I have made some minor changes to the script which might interest others: 1. Using _civ setSpeaker "NoVoice" when a civ (in civs, crowd or cars) is spawned. This seems to reduce/eliminate civs yelling out orders and observations. 2. In order to enable custom behaviour/actions on created civs I added the following when civs are created(in civs, crowd and cars): if (!(isNil "tpw_on_civ_spawned")) then { [_civ] call tpw_on_civ_spawned; }; By adding tpw_on_civ_spawned function mission makers can then add custom actions or behaviour. A similar solution could also be used for vehicles. E.g. setting damage or adding items to car cargo and so on. 3. Enable custom handling of civs injured or killed by adding the following to the end of tpw_civ_fnc_casualty (same principal as for spawned civs): if (!(isNil "tpw_on_civ_casualty")) then { [_civ, _shooter] call tpw_on_civ_casualty; }; Im also a bit curious about this part at the end of tpw_core.sqf, why can't the core script just terminate? // DUMMY LOOP SO SCRIPT DOESN'T TERMINATE while {true} do { sleep 10; }; I this related to the addon version somehow (the addon needs to keep running) or is there something else I'm not seeing?
×