Search the Community
Showing results for tags 'hideobjectglobal'.
Found 6 results
-
bis_fnc_forcecuratorinterface [Solved]Forced Zeus interface after death
rkemsley posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
In my Zeus vs Guerilla Zeus game, there are three BLUFOR Curators vs one Independent Curator. The Independent Curator wins when all of the BLUFOR Curators have died. However, the games can last quite a long time, and it can be quite boring for the dead BLUFOR Curators to sit out for the rest of the game. What I have decided is that once a BLUFOR Curator is killed, he respawns and is forced to play just in Curator mode. He is now unable to spawn more units and is only able to command BLUFOR units already on the map or control said units. I have written a short "onPlayerRespawn.sqf" script to do this (however, it is untested because I am currently at work). Wondering if anyone has any advice on a better way of doing this! Also, I have a problem now with ending the game due to the BLUFOR Curators respawning. Before, I had it so that the game ended and Independent won when all BLUFOR players were dead, which obviously won't work now! Edit: Ok, so I just got back from work and tested my script. It does work, provided that in my "description.ext" I have specified "respawnOnStart = -1;". What I am wondering is how I would then make Independent win when all BLUFOR Curators have died (now that they can respawn). Before, I had a trigger: Obviously, this will no longer work ^^ -
Hi everyone! This is a bit of a read, but I hope what I have to share is worth the read. I have come to the forums in search of help, but first I would like to share my success with everyone. I have put together an addEventHandler that turns all satchel charges into "tree cutters". I got this from PierreMGI in a 5 year old post on Armaholic forums https://www.armaholic.com/forums.php?m=posts&q=31114. It forms one of the core logistics features in my Valhalla missions. It sets damage to maximum (1) on all trees and bushes within a 15m radius of the charge, when the charge is detonated. Works on dedicated servers. Tree Cutter eventHandler. Add to initPlayerLocal.sqf && onPlayerRespawn.sqf: player addEventHandler ["fired", { if ("SatchelCharge_remote_ammo"== _this select 4) then { "Tree Cutter Charge Placed, Effective range 15m!" remoteExec ["hint"]; _charge = _this select 6; 0 = [_charge] spawn { _pad = createVehicle ["Land_HelipadEmpty_F", player, [], 0, "CAN_COLLIDE"]; _charge = [_this, 0, objNull] call BIS_fnc_param; waituntil {sleep 0.1; isNull _charge}; { _x setDamage 1 } foreach (nearestTerrainObjects [_pad,["tree","bush"],15]); deleteVehicle _pad; } } } ]; Never be at the mercy of vegetation again! Now my Problem. The above code works everywhere except Tanoa. Tanoa's trees: 1, Don't have a "ruin" model, or destroyed state that they can be put in. Even when damage set to maximum, they still stand. 2, they don't have a configure class. The dubug console command hint str(typeOf cursortarget); copyToClipboard str(typeOf cursortarget); that I got from Haleks in the post always returns "". Which according to the description in typeOf means they don't have a config class. Making them nigh impossible for me to target by classname directly. So I went with a hideObjectGlobal approach that works on locally hosted games, but not on dedicated servers. Tanoa Tree Hider eventHandler. player addEventHandler ["fired", { if ("SatchelCharge_remote_ammo"== _this select 4) then { "Tree Cutter Charge Placed, Effective range 15m!" remoteExec ["hint"]; _charge = _this select 6; 0 = [_charge] spawn { _pad = createVehicle ["Land_HelipadEmpty_F", player, [], 0, "CAN_COLLIDE"]; _charge = [_this, 0, objNull] call BIS_fnc_param; waituntil {sleep 0.1; isNull _charge}; { _x hideObjectGlobal true } foreach (nearestTerrainObjects [_pad,[],25,false]); deleteVehicle _pad; } } } ]; I am too wrapped up in my own conundrum to see the solution. Would someone please show me the corrections that need to be made in order for the Tanoa tree hider event handler to work on dedicated servers. Thank you for reading and I hope the these tree cutters help you dominate the battlefield!
- 7 replies
-
- addeventhandler
- dedicated server
-
(and 1 more)
Tagged with:
-
hidden objects mysteriously unhide after a while
b3lx posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
I have a weird problem where after hiding a massive number of map objects with hideobjectgobal through a preinit script they become unhidden after some minutes into the game. It happens when there is a high load like many spawned groups. Anybody has a clue? -
hideObjectGlobal preventing Ai targeting... (WORKAROUND FOUND!)
LSValmont posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Agent dogs with an attached invisible unit so that other Ai can attack them... The problem is... as soon as I hide their models using hideObjectGlobal the Ai no longer targets them... as the below pic shows when unhidden the Ai shoots at them just fine. This is how I create the hidden agent: vVirtualEnemy = { params ["_unit"]; _ai = createAgent ["I_Survivor_F", [0,0,0], [], 0, "CAN_COLLIDE"]; _ai setFace ""; //hideObjectGlobal _ai; _ai disableAI "ALL"; //{_ai enableAI _x} forEach ["ANIM","TEAMSWITCH","CHECKVISIBLE"]; [_ai, "Acts_AidlPsitMstpSsurWnonDnon01"] remoteExec ["switchMove", 0]; _ai enableStamina false; _ai setUnitPos "MIDDLE"; _ai disablecollisionwith _unit; _unit disablecollisionwith _ai; _ai attachTo [_unit, [0,0,0]]; _unit setVariable ["_attAi", _ai, true]; _unit addEventHandler ["Killed", {deleteVehicle ((_this # 0) getVariable "_attAi")}]; //_ai forceSpeed 2; //_ai setAnimSpeedCoef 3; [_ai] join (group _unit); _ai addRating -100000; // Make sure is renegade! _ai allowdamage false; _ai setSpeaker "NoVoice"; _ai setSkill 0; }; How can I hide the virtual unit's models yet still be targeteable by other enemy ai?- 13 replies
-
- hideobjectglobal
- hideobject
-
(and 2 more)
Tagged with:
-
hideObjectGlobal on all buildings of same type
Spatsiba posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hey! I'm trying to remove military objects on Altis using: _towers = nearestTerrainObjects[[worldSize/2,worldSize/2],[ "Land_Cargo_Tower_V2_F", "Land_Cargo_Tower_V1_F", "Land_Cargo_Tower_V3_F", "Land_HBarrier_3_F", "Land_HBarrier_5_F", "Land_HBarrier_Big_F", "Land_HBarrier_1_F", "Land_HBarrierWall_corridor_F", "Land_HBarrierWall_corner_F", "Land_HBarrierWall6_F", "Land_HBarrierTower_F", "Land_HBarrierWall4_F"],worldSize,false]; {hideObjectGlobal _x} forEach [_towers] without luck. (I know the list isn't complete with all objects but desert towers are still there). My question is: Is there even a way to do this in a mission file?- 7 replies
-
- hidobject
- hideobjectglobal
-
(and 1 more)
Tagged with:
-
How come cointainers and big hesco walls can't be hidden in Malden DLC? Is there any new way to do it?
-
- hideobjectglobal
- malden
-
(and 2 more)
Tagged with: