SRBuckey5266
Member-
Content Count
38 -
Joined
-
Last visited
-
Medals
Everything posted by SRBuckey5266
-
addAction doesn't work as described?
SRBuckey5266 posted a topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
player addAction["Get Message", {hint "message";}, nil, 6, True, True, "", "_this == _target"]; The ArmaA2 wiki says that the "code/filename" parameter of addAction accepts Code or a path to a .sqf/.sqs script; however, when I try to use a block of code, it doesn't seem to work? Any ideas as to why this is so? -
Why is it impossible to get Blufor to shoot armed civilians?
SRBuckey5266 posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Why would Bohemia limit us like this? Scripting should open a world of customization, and this is a huge limitation not being able to get blufor to attack armed civilians. What's with this? I also don't want to edit side relations in the init.sqf, I just want to be able to do "doTarget"/"doFire"... -
Why is it impossible to get Blufor to shoot armed civilians?
SRBuckey5266 replied to SRBuckey5266's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Did you read my post? I said I wanted a method besides something that has to do with editing the mission in init.sqf What happens if I just want a BLUFOR to attack ONE civilian? Intended to be used on mission start. Changing value during mission can cause unexpected errors in AI behavior. -
How can I check if an object is facing another object?
SRBuckey5266 posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
I can use getDir on a unit, but how can I check and see if a unit is within this units 180 degree view? Basically, what I'm asking, can I check and see if a unit is within the view of another unit? -
How can I check if an object is facing another object?
SRBuckey5266 replied to SRBuckey5266's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Thanks, this is a great help! Where did you look to find this function? I looked at the ArmA 3 functions page on the wiki, and this wasn't one of the BIS functions. Thanks again!! -
Does AI have to be in a vehicle for the vehicle to fire?
SRBuckey5266 posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Can I use "doArtilleryFire" on an empty M5 Sandstorm? I do NOT want AI. -
Impossible to change artillery firing mode from close to medium on artillery computer
SRBuckey5266 posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Why is this not an option?? -
Impossible to change artillery firing mode from close to medium on artillery computer
SRBuckey5266 replied to SRBuckey5266's topic in ARMA 3 - MISSION EDITING & SCRIPTING
What? The AI doesn't automatically change the firing distance on the MLRS, and seems to always stay at "close" distance. I want it to use a "medium" firing distance. -
How to check if a vehicle is within a marker's position?
SRBuckey5266 posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
How can I do this? I do not want to use the map editor and set a trigger. Thanks. -
Impossible to change artillery firing mode from close to medium on artillery computer
SRBuckey5266 replied to SRBuckey5266's topic in ARMA 3 - MISSION EDITING & SCRIPTING
No, via scripting -
What is the point of "bis_fnc_param"?
SRBuckey5266 posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Is it supposed to be a replacement for "_this select 0"? Are there any differences in speed? -
If there is a building that has no stairs in it, but I want to teleport to the roof....how would I go about getting the correct height? I know how to write the script, but is there a way to make the script detect the correct height to put the player at? I don't want to spawn to high and die, or spawn to low and be stuck in the building.
-
How do I draw a menu in game? Takistan Life servers, when you press 1, comes up with a menu. Any idea which scripting function allows me to get started with that? Thanks!
-
addAction doesn't work as described?
SRBuckey5266 replied to SRBuckey5266's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Already tried it. Doesn't work. -
Function isn't sleeping?
SRBuckey5266 posted a topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Any idea why my script doesn't sleep for the 7 seconds it's suppose to? da_name_of_me = name player; serialkiller = true; player addEventHandler ["Fired", { if(serialkiller) then { [] call change_name; }; }]; change_back = { hint "John Doe"; player setIdentity "John"; sleep 7; player setIdentity da_name_of_me; hint format["%1", da_name_of_me]; }; if(!serialkiller) then { player removeEventHandler ["Fired", 0]; }; -
How do you make a script global?
SRBuckey5266 posted a topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
"publicThis" addPublicVariableEventHandler {hint ((_this select 0) + " has been updated to: " + str (_this select 1))}; publicVariable "publicThis = 'test';"; I want to run code to all clients in a multiplayer server; however, the above test does not seem to work. Is there any way you can broadcast code to all? -
DIRECT channel not working (can't see others' text, nor hear them).
SRBuckey5266 posted a topic in ARMA 2 & OA - TROUBLESHOOTING
Other people can see my direct chat messages; however, I cannot hear nor see text in the direct chat. Why is this? Every other channel works perfectly fine. I've tried going into my firewall settings, checking local game cache integrity for STEAM, running the Arma 2: OA beta to make sure it's updated, and doing what the following post recommended: http://forums.bistudio.com/showthread.php?135998-Direct-chat-not-working-possible-reason-here The servers I play rely heavy on this feature, and it's hard to play without receiving other players' text. P.S I do not use a microphone (it's a piece of crud that kicks me off the internet within two minutes of turning it on, lol). -
How do you make a script global?
SRBuckey5266 replied to SRBuckey5266's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
No, it's just that no one on the server can see the hint. -
How do you make a script global?
SRBuckey5266 replied to SRBuckey5266's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Sadly that did not work. :/ I'm not sure why this is. This is what the addPublicVariableEventHandler function is suppose to do, correct? -
Getting cfgVehicle class name?
SRBuckey5266 posted a topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
http://community.bistudio.com/wiki/ArmA_2:_CfgVehicles I need a script that relies on getting the class name of the vehicle it "selects". For example, for a Kamaz, it's "Kamaz". Any idea on how, for another example, I would get the class name for a blue ural? -
Why won't the artillery guys fire?
SRBuckey5266 posted a topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
//rocket artillery _c = 0; for "_x" from 1 to _numArty do { _arty = createVehicle ["MLRS", [(_pos select 0)+(_c * 24),(_pos select 1)-86,(_pos select 2)], [], 0, "NONE"]; _driver = (group player) createUnit ["RU_Soldier_Crew", _upos, [], 0, "NONE"]; _driver moveInDriver _arty; _gunner = (group player) createUnit ["RU_Soldier_Crew", _upos, [], 0, "NONE"]; _gunner moveInGunner _arty; [_driver, _gunner] join (group player); _c = _c + 1; }; Above is a part of my code that spawns artillery men. However, whenever I command them to fire at a position.....they simply look at the target and DO NOT FIRE. Why is this? It's in multiplayer. EDIT: Nearly everytime I tell them to fire at a specificed position, they'll say "I'm on it", look at the target, and then the turret back. ("Engage" on the unit icon shows up for a split second than switches to "Ready") :/... -
Local variable not within scope of while loop
SRBuckey5266 posted a topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Why is it that anything below the OnMapSingeClick function, nothing can "see" the _runallaharkkabar variable? E.G: My while loop won't run, and the hint "true" is never displayed. _runallahakkbar = true; _start = false; _unitstk = []; numTanks = 0; numAA = 0; numTroopCarriers = 0; onMapSingleClick{ if(_shift) then { //positioning _ylength = -2350; _xlength = 0; _upos = nil; _sl = nil; //group for them all to go in _group = createGroup east; _c = 0; for "_x" from 1 to numTanks do { _tank = createVehicle ["55_TK_EP1", [(_pos select 0)+(_c * 4)+(_xlength),(_pos select 1)+(_ylength),(_pos select 2)], [], 0, "FORM"]; _driver = _group createUnit ["TK_Soldier_Crew_EP1", _pos, [], 0, "FORM"]; _driver moveInDriver _tank; _gunner = _group createUnit ["TK_Soldier_Crew_EP1", _pos, [], 0, "FORM"]; _gunner moveInGunner _tank; _commander = _group createUnit ["TK_Soldier_Crew_EP1", _pos, [], 0, "FORM"]; _commander moveInCommander _tank; _driver doMove _pos; _upos = getPos _tank; //add vehicle to units array if(count _unitstk == 0) then { _unitstk set [0, _tank]; }else{ _unitstk set [(count _unitstk + 1), _tank]; }; //the last commander created if(_x == numTanks) then { _sl = _commander; }; _c = _c + 1; }; _c = 0; for "_x" from 1 to numAA do { _aa = createVehicle ["ZSU_TK_EP1", [(_pos select 0)+(_c * 4)+(_xlength),(_pos select 1)+(_ylength)-32,(_pos select 2)], [], 0, "FORM"]; _driver = _group createUnit ["TK_Soldier_Crew_EP1", _pos, [], 0, "FORM"]; _driver moveInDriver _aa; _gunner = _group createUnit ["TK_Soldier_Crew_EP1", _pos, [], 0, "FORM"]; _gunner moveInGunner _aa; _driver doMove _pos; //add vehicle to units array if(count _unitstk == 0) then { _unitstk set [0, _aa]; }else{ _unitstk set [(count _unitstk + 1), _aa]; }; _c = _c + 1; }; _c = 0; for "_x" from 1 to numTroopCarriers do { _truck = createVehicle ["KamazOpen", [(_pos select 0)+(_c * 4)+(_xlength),(_pos select 1)+(_ylength)-24,(_pos select 2)], [], 0, "FORM"]; _driver = _group createUnit ["TK_Soldier_AT_EP1", _pos, [], 0, "FORM"]; _driver moveInDriver _truck; //fill truck with troops for "_x" from 1 to 12 do { _soldier = ""; switch (true) do { case (_x <= 6): { _soldier = "TK_Special_Forces_EP1"; }; case (_x > 6 && _x <= 10): { _soldier = "TK_Soldier_AT_EP1"; }; case (_x > 10): { _soldier = "TK_Soldier_SniperH_EP1"; }; }; _troop = _group createUnit [_soldier, [(_pos select 0)+(_c * 4)+(_xlength),(_pos select 1)+(_ylength)-32,(_pos select 2)], [], 0, "FORM"]; _troop moveInCargo _truck; }; _driver doMove _pos; //add vehicle to units array if(count _unitstk == 0) then { _unitstk set [0, _truck]; }else{ _unitstk set [(count _unitstk + 1), _truck]; }; _c = _c + 1; }; //make the squad leader the leader of group _group selectLeader (unitstk select 0); //delete marker if already set if(getMarkerColor "Squad_spawn" == "") then { deleteMarker "Squad_Spawn"; }; _marker = createMarker ["Squad_marker", _upos ]; "Squad_marker" setMarkerType "o_armor"; "Squad_marker" setMarkerSize [1, 1]; "Squad_marker" setMarkerDir 0.93884; "Squad_marker" setMarkerText "Armored Division"; "Squad_marker" setMarkerColor "ColorRed"; "Squad_marker" setMarkerPos _upos; }; _start = true; }; if(_runallahakkbar) then { hint "true"; }; while { _runallahakkbar } do { hint ""; if(_start) then { { if(!alive _x) then { hint format["%1 is down. (%2/%3) units left.", _x, (count _unitstk), ((count numAA)+(count numTroopCarriers)+(numTanks))]; //remove from units array _build = []; _i = _x; { if(_x != _i) then { if(count _build == 0) then { _build set [0, _x]; }else{ _build set [(count _build + 1), _x]; }; }; } foreach _unitstk; _unitstk = _build; }; } foreach _unitstk; if(count _unitstk > 0) then { //set new tank marker, in case original tank moving it was destroyed "Squad_marker" setMarkerPos (getPos (_unitstk select 0)); }else{ hint "Units are dead"; deleteMarker "Squad_marker"; _runallahakkbar = false; _start = false; }; }; sleep 3; }; -
Why won't the artillery guys fire?
SRBuckey5266 replied to SRBuckey5266's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
I'm manually telling them to fire on something as they are in my squad. I guess the game doesn't support it? -
Anything wrong with this block of code?
SRBuckey5266 posted a topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
{ if(!alive _x) then { //hint format["%1 is down. (%2/%3) units left.", _x, ((count units), (count numAA)+(count numTroopCarriers)+(numTanks))]; //remove from units array _build = []; _i = _x; { if(_x != _i) then { if(count _build == 0) then { _build set [0, _x]; }else{ _build set [(count _build + 1), _x]; }; }; } foreach units; units = _build; }; } foreach units; I removed this bit of code from my script, and then it magically started working again. I've been trying to hunt down the bug.... When that code block is left in, my while loop does not run at all. FULL CODE: runallahakkbar = false; sleep 5; runallahakkbar = true; start = false; units = []; numTanks = 3; //NEED AT LEAST 1 TANK numAA = 0; //include in tanks array numTroopCarriers = 0; onMapSingleClick{ if(_shift) then { //positioning _ylength = -1000; _xlength = 5000; _upos = nil; _sl = nil; //group for them all to go in _group = createGroup east; _c = 0; for "_x" from 1 to numTanks do { _tank = createVehicle ["T55_TK_EP1", [(_pos select 0)+(_c * 4)+(_xlength),(_pos select 1)+(_ylength),(_pos select 2)], [], 0, "FORM"]; _driver = _group createUnit ["TK_Soldier_Crew_EP1", _pos, [], 0, "FORM"]; _driver moveInDriver _tank; _gunner = _group createUnit ["TK_Soldier_Crew_EP1", _pos, [], 0, "FORM"]; _gunner moveInGunner _tank; _commander = _group createUnit ["TK_Soldier_Crew_EP1", _pos, [], 0, "FORM"]; _commander moveInCommander _tank; _driver doMove _pos; _upos = getPos _tank; if(count units == 0) then { units set [0, _tank]; }else{ units set [(count units + 1), _tank]; }; //the last commander created if(_x == numTanks) then { _sl = _commander; }; _c = _c + 1; }; _c = 0; for "_x" from 1 to numAA do { _aa = createVehicle ["ZSU_TK_EP1", [(_pos select 0)+(_c * 4)+(_xlength),(_pos select 1)+(_ylength)-32,(_pos select 2)], [], 0, "FORM"]; _driver = _group createUnit ["TK_Soldier_Crew_EP1", _pos, [], 0, "FORM"]; _driver moveInDriver _aa; _gunner = _group createUnit ["TK_Soldier_Crew_EP1", _pos, [], 0, "FORM"]; _gunner moveInGunner _aa; _driver doMove _pos; _c = _c + 1; }; _c = 0; for "_x" from 1 to numTroopCarriers do { _truck = createVehicle ["KamazOpen", [(_pos select 0)+(_c * 4)+(_xlength),(_pos select 1)+(_ylength)-24,(_pos select 2)], [], 0, "FORM"]; _driver = _group createUnit ["TK_Soldier_AT_EP1", _pos, [], 0, "FORM"]; _driver moveInDriver _truck; //fill truck with troops for "_x" from 1 to 12 do { _soldier = ""; switch (true) do { case (_x <= 6): { _soldier = "TK_Special_Forces_EP1"; }; case (_x > 6 && _x <= 10): { _soldier = "TK_Soldier_AT_EP1"; }; case (_x > 10): { _soldier = "TK_Soldier_SniperH_EP1"; }; }; _troop = _group createUnit [_soldier, [(_pos select 0)+(_c * 4)+(_xlength),(_pos select 1)+(_ylength)-32,(_pos select 2)], [], 0, "FORM"]; _troop moveInCargo _truck; }; _driver doMove _pos; _c = _c + 1; }; //make the squad leader the leader of group _group selectLeader _sl; _marker = createMarker ["Squad_marker", _upos ]; "Squad_marker" setMarkerType "o_armor"; "Squad_marker" setMarkerSize [1, 1]; "Squad_marker" setMarkerDir 0.93884; "Squad_marker" setMarkerText "Armored Division"; "Squad_marker" setMarkerColor "ColorRed"; "Squad_marker" setMarkerPos _upos; }; start = true; }; while { runallahakkbar } do { if(start) then { { if(!alive _x) then { //hint format["%1 is down. (%2/%3) units left.", _x, ((count units), (count numAA)+(count numTroopCarriers)+(numTanks))]; //remove from units array _build = []; _i = _x; { if(_x != _i) then { if(count _build == 0) then { _build set [0, _x]; }else{ _build set [(count _build + 1), _x]; }; }; } foreach units; units = _build; }; } foreach units; if(count units > 0) then { //set new tank marker, in case original tank moving it was destroyed "Squad_marker" setMarkerPos (getPos (units select 0)); }else{ hint "Units are dead"; deleteMarker "Squad_marker"; runallahakkbar = false; }; }; sleep 3; }; -
Nvm. Please delete.