BluBoi
Member-
Content Count
9 -
Joined
-
Last visited
-
Medals
Everything posted by BluBoi
-
Hey again all I'm working on a Titanfall hud script (literally just an image of the hud when in an HMCS is the idea), and I'm having issues. The main problem is that "if !(player == vehicle player) then {*insert Scripting Here*};" Hasn't been functioning at all for me, the best I've managed is tying the image to an action (opening a watch lmao). I'd post images but I don't use imgur or any such. The Vehicle Classes That I want to (but don't need to) specify it only working in are these: HMCS HMCS_501 HMCS_501DES HMCS_VW1 HMCS_VW1URB If anyone has some spare time, finding a way to have the script only trigger in certain vehicles would be nice, but not necessary. Any and all help is appreciated. Hope to bundle it into a mod when I get it working. Code so far: h = [] spawn { PICTURE = "TitanHud.paa"; with uiNamespace do { TAG_Picture = findDisplay 46 ctrlCreate ["RscPicture", -1]; TAG_Picture ctrlSetPosition [safeZoneX, safezoneY, safeZoneW, safezoneH]; TAG_Picture ctrlCommit 0; }; findDisplay 46 displayAddEventHandler ["KeyDown", { params ["_control", "_key", "_shift", "_ctrl", "_alt"]; if (_key in (ActionKeys "watch")) then { (uiNamespace getVariable "TAG_Picture") ctrlSetText (["", PICTURE] select !(currentVisionMode player > 0)); }; false }]; };
-
I know you read the title, but I do have an idea of how to actually do it. So firstly there would just be something that spawns an invisible object below a player when they press a button, maybe some variation of BIS_fnc_spawnObjects or some such If THAT works, Find some way to detect When the player is facing horizontally to a building and above ground height (def hardest part), then spawn it beneath them so they can stand on the wall Then maybe have it spawn multiple along a wall at the same height so the player can just run/walk along a wall at a height. Add in some anims and de-spawning params and it's "wallrunning" I'm asking here since I'm fairly new to scripting and realize I probably won't be able to find EVERYTHING on my own, so I'm asking people with infinitely more experience. Hopefully something cool can come out of this.
-
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 ;
-
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?
-
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
-
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.
-
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.
-
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
-
Issue with kbTell conversation scr9pting
BluBoi posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
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!