Jump to content

Grim5667

Member
  • Content Count

    17
  • Joined

  • Last visited

  • Medals

Community Reputation

3 Neutral

About Grim5667

  • Rank
    Private First Class
  1. Grim5667

    co10 Escape

    thanks not sure what the problem was since the server is hosted by hosthavoc but a quick reset of server fixed it.
  2. Grim5667

    co10 Escape

    Hey so I seem to be unable to load an Esseker map for your framework since apperently I'm missing mods yet i think i have all the mods. Heres the output
  3. No still doesn't work. GRM_fnc_mortarAutoReveal = { params ["_mortar"]; while {alive _mortar AND canFire _mortar AND count crew _mortar > 0} do { _enemySides = side _mortar call BIS_fnc_enemySides; _mag = currentMagazine _mortar; _nearby = (getposatl _mortar nearEntities 4000) select {side _mortar knowsAbout _x > 3 AND side _x in _enemySides AND _mortar getArtilleryETA [getposatl _x,_mag] > 0 AND getPosATL _x inRangeOfArtillery [[_mortar], _mag]}; //no enemies found which are in range and have a firing solution, skip and wait if (count _nearby > 0) then { _rounds = 4; _rndTarget = selectRandom _nearby; _targetPos = getPosATL _rndTarget; (effectiveCommander _mortar) commandArtilleryFire [_targetPos,_mag,_rounds]; systemchat format ["%1 targets: %2",effectivecommander _mortar,count _nearby]; sleep _rounds * 6;//give enough time to fire all rounds, then start over }; sleep (3 + random 3); }; }; now targetKnowledge select 1; Would be great because it is either true or false and I could use that in a if statement like, GRM_fnc_mortarAutoReveal = { params ["_mortar"]; while {alive _mortar AND canFire _mortar AND count crew _mortar > 0} do { _enemySides = side _mortar call BIS_fnc_enemySides; _mag = currentMagazine _mortar; _nearby = (getposatl _mortar nearEntities 4000) select {side _mortar knowsAbout _x > 3 AND side _x in _enemySides AND _mortar getArtilleryETA [getposatl _x,_mag] > 0 AND getPosATL _x inRangeOfArtillery [[_mortar], _mag]}; //no enemies found which are in range and have a firing solution, skip and wait if (count _nearby > 0) then { _rndTarget = selectRandom _nearby; _targetPos = getPosATL _rndTarget; _targetKnowledge = (_east targetKnowledge _rndTarget) select 1; if (_targetKnowledge isEqualTo true) then { _rounds = 1; (effectiveCommander _mortar) commandArtilleryFire [_targetPos,_mag,_rounds]; systemchat format ["%1 targets: %2",effectivecommander _mortar,count _nearby]; sleep 15; //give enough time to fire all rounds, then start over }; }; sleep (3 + random 3); }; }; because this is all in a while statement too but for it to work I would need to get the whole of the EAST side as an object for targetKnowledge to work. If that is possible then it might work as as soon as it turns false it stops working or would that then need to be a while statement? What are your thoughts on this? The knowAbout doesn't seem to work. If it's 1,2 or 3 it always knows where I am but if it's 4 it never knows where i am and therefore will never fire and hence why the targetKnowledge is best for this. But I could make this a little smaller so instead of an if statement I could replace the "Side _mortar knowsAbout _x > 3" with "(_east targetKnowledge _x) select 1 AND..." and _east equals to the east side as an object.
  4. @Grumpy Old Man Now that just fires on me and i havent even been seen by enemies. As soon as code execute it starts firing on me and i'm going to guess is that it selects random from the _nearby and doesnt have anything stopping it from choosing me. Maybe an if statement checking if _nearby is known by _mortor and if so fire upon but as soon as it doesnt know about the player it stops firing? Something like this while {alive _mortar AND canFire _mortar AND count crew _mortar > 0} do { _enemySides = side _mortar call BIS_fnc_enemySides; _mag = currentMagazine _mortar; _nearby = (getposatl _mortar nearEntities 4000) select {side _x in _enemySides AND _mortar getArtilleryETA [getposatl _x,_mag] > 0 AND getPosATL _x inRangeOfArtillery [[_mortar], _mag]}; _targetKnowledge = (_mortar targetKnowledge _nearby) select 3; // No enemies found which are in range and have a firing solution, skip and wait if (count _nearby > 0) then { _rounds = 2; _rndTarget = selectRandom _nearby; if (_targetKnowledge > 20 && _targetKnowledge < 66.148) then { _targetPos = getPosATL _rndTarget; (effectiveCommander _mortar) commandArtilleryFire [_targetPos,_mag,_rounds]; [west, "HQ"] sidechat "Mortors Inbound!! Get to Cover!"; sleep _rounds * 6; // Give enough time to fire all rounds, then start over }; }; sleep (3 + random 3); }; }; But this doesnt work as it expecting a bool on line 9 which is "_targetKnowledge = ..."
  5. But wouldnt that still be overridden by the knowsabout from earlier? also tt still wont stop firing at me even when ive moved posiotion about 1km and now that the little bit of code was added it fires no where near my character is.
  6. Yeah sorry i meant "this works but is there a way to make it so it doesnt constantly fire on me even when im out of sight?" There is an error showing up with that code saying "Error #: Type Object, expected Array" any reason why? This is what i have currently:
  7. This almost works except it constantly fires upon me even if im somewhat hidden. Any way to fix this?
  8. Hey, I have had a look around but I probs haven't looked hard enough to find a script that spawns a OPFOR mortor team that fires upon BLUFOR when other OPFOR see bluefor. I have nothing yet so any help would be very helpful
  9. That wouldnt work because that means the action would show on the civs
  10. Hey is there a way to have the action show up on AAF too?
  11. Ahh thank you so much. This is just what I wanted.
  12. Ahh ok will be more descriptive next time. The script is to "search" the OPFOR units for possibly intel and it can return with No Intel found or Intel found. Ok ty will check if this works. Edit: After a couple minutes with the code it works but it constantly shows the Search which i dont want and it would just stack up and if you did removeAllActions Player; It would still stack up on the enemies so I put it removeAllActions allUnits; . Which did work but would always show a search and would also show search twice when looking at the OPFOR unit.
  13. Ok i believe they are spawned in through script. All OPFOR will be spawned in at once. Maybe there a way to place down a invis marker that can grab the nearest units?
  14. Hey I have looked for a script that adds an action to the OPFOR unit everytime one of them spawns but could not find one. Would someone be willing to help to create one? I am new to scripting btw.
  15. Grim5667

    co10 Escape

    ahh yes thanks. Though servers crashes everytime I leave or die? EDIT:oh nvm just realised im an idiot abd messed something up Oh is it supposed to restart everytime i leave or die?
×