Jump to content

BluBoi

Member
  • Content Count

    7
  • Joined

  • Last visited

  • Medals

Community Reputation

0 Neutral

About BluBoi

  • Rank
    Rookie

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. BluBoi

    Issue with script

    Apologies for not fixing everything at once, I'm just taking it error by error and looking for help when I get stuck. Any ideas on what commands I SHOULD use to get the position of a nearby enemy unit, and then make an ai move to and suppress that position?
  2. BluBoi

    Issue with script

    I tried using the hints to check the script's progress, and it looks like system chat doesn't want to work rill i get the errors fixed either. Might as well ask for pointers, as here's what I got from RPT: 10:15:16 Error in expression <enableAttack false; systemChat str _sup = allUnits selectRandom {side _x == east> 10:15:16 Error position: <= allUnits selectRandom {side _x == east> 10:15:16 Error Missing ; 10:15:16 File C:\Users\14064\Documents\Arma 3 - Other Profiles\CC%20Zeus\mpmissions\Droid%20Script%20Testing.VR\Droid.sqf..., line 37 10:15:16 Error in expression <enableAttack false; systemChat str _sup = allUnits selectRandom {side _x == east> 10:15:16 Error position: <= allUnits selectRandom {side _x == east> 10:15:16 Error Missing ; 10:15:16 File C:\Users\14064\Documents\Arma 3 - Other Profiles\CC%20Zeus\mpmissions\Droid%20Script%20Testing.VR\Droid.sqf..., line 37
  3. BluBoi

    Issue with script

    thanks a billion to you both, ill hit this fresh in the morning. The concept is to have one ai every 12 seconds both suppress an enemy position while moving towards them to FORCE them to move under fire (so engagements don't turn into shooting ranges of static targets). I'm clearly not the best but ill keep at it.
  4. BluBoi

    Issue with script

    Alright! Thanks again for responding. I've got past the syntax errors manually after digging through my 3 thousand line (im running mods) RTP, so now I think I know what I need. is there any way to select an object from an array, cause right now I've only gotten as far as selecting it as a code reference. I'm wanting to select an OPFOR unit at random. Here's the updated code. [ ] spawn { while {true} do { { _x setVariable ["HAF_spawned",true]; _x setSkill ["courage", 1.0]; _x enableAttack false; _x setCombatBehaviour "AWARE"; _unitsEast = units opfor; _obj = getPosATL _x; targets = {selectRandom _unitsEast} findNearestEnemy _obj; if (_targets > 2) then { _x setBehaviour "CARELESS"; _x suppressFor 10; _x doMove (targets); Sleep 11; _x setBehaviour "AWARE" }; } forEach (allUnits select {isNil {_x getVariable "HAF_spawned"} && side _x == WEST}); uiSleep 12; }; }; The selectrandom is the best command I could find, but I have no way to make what it spits out as an object (which is what the array is, multiple units). Right now it's just spitting it out as code (according to the RTP). Any help is appreciated, already Leagues further than I was before.
  5. BluBoi

    Issue with script

    Thanks for the feedback! I'm attempting to get the position of nearby enemy units using call BIS_fnc_enemyTargets;, changing the previous line to "_targets = _x call BIS_fnc_enemyTargets;" and adding the semi-colon after the getpos line. is this a step in the right direction? [] spawn { while {true} do { { _x setVariable ["HAF_spawned",true]; _x setSkill ["courage", 1.0]; _x enableAttack false; _x setCombatBehaviour "AWARE"; _targets = _x call BIS_fnc_enemyTargets; EmemPos = getPosATL _targets; if (_targets > 2) then { _x setBehaviour "CARELESS"; _x suppressFor 10; _x doMove (EmemPos); Sleep 11; _x setBehaviour "AWARE" }; else { _x setCombatBehaviour "AWARE"; }; } forEach (allUnits select {isNil {_x getVariable "HAF_spawned"} && side _x == WEST}); uiSleep 12; }; }; When testing this the "else {" line now is getting the semi-colon error
  6. Hello again BI forums! I come to you in a time of great need Im making an ai script but it keeps giving me an error, and it makes 0 sense. ANy help is appreciated The Script in question: [] spawn { while {true} do { { _x setVariable ["HAF_spawned",true]; _x setSkill ["courage", 1.0]; _x enableAttack false; _x setCombatBehaviour "AWARE"; _x call BIS_fnc_enemyTargets; getPosATL _targets if (_targets > 2) then { _x setBehaviour "CARELESS"; _x suppressFor 10; _x doMove (PosATL _targets); Sleep 11; _x setBehaviour "AWARE" }; else { _x setCombatBehaviour "AWARE"; }; } forEach (allUnits select {isNil {_x getVariable "HAF_spawned"} && side _x == WEST}); uiSleep 12; }; }; And the error (line 36 is the "if (_targets..." one): '...IS_fnc_enemyTargets; getPasATL _targets |#|if (_targets > 2) then { _x setBehaviou...' (FIlename and directory fo SQF), line 36 Error Missing ;
  7. Hello! I'm trying to get a conversation going using kbTell and kbWasSaid, but I keep getting a "generic error" (as in that's literally all it spits out as an error message) spat out at me here's the syntax I'm using sage1 KbTell [off,"Balcony","SageLine_1"]; waitUntil { sage1 KbWasSaid [off,"Balcony","SageLine_1"",3]; }; any and all help is appreciated!
×