-
Content Count
4313 -
Joined
-
Last visited
-
Medals
Posts posted by Grumpy Old Man
-
-
2 hours ago, gc8 said:With
_cam camSetPos (visiblePosition _man);There's also jitter
Because you're setting the camera position every 0.5 seconds, of course it's not gonna look good.
Try using an eachFrame eventhandler to set the camera position.
Cheers
-
1
-
-
3 hours ago, HazJ said:ffff this game. Thank you! Knew it was something simple. Just need to decide now whether to sleep or drink more coffee and press on. Hmm...

Alternative syntaxes can catch one off guard, didn't know that the command "units" accepts objects as well until recently...
Cheers
-
2
-
1
-
-
8 hours ago, HazJ said:Or why not just generate a mass array of all required vehicles in first place then use it later on in mission. Saves spawning, hiding, deleting, etc... Then write some function with passable argument (STRING) that returns info for that classname. Similar to @davidoss's method except the data is created before. You could use his function to generate the array in first place though.
What he said, if data is needed and it'll remain static (vehicle sizes don't change spontaneously) just use a function to go through all vehicles once and store those sizes in an array.
Might work just fine doing this once upon mission start in preInit or postInit.
On a sidenote, neither boundingBox nor boundingBoxReal are useful for exact measurements, depending on object they can be pretty generous:

The inner cube is boundingBoxReal, outter cube is boundingBox...
Depending on how precise you need the size to be you'd be better off making a scanner function using lineIntersects or something...
Cheers
-
2
-
-
7 hours ago, Wiki said:Yes, so using a Rhino when there is no MBT is quite a solution...
But in combat, the Rhino has more chance to get destroyed than an MBT.
Facing an MBT, the Rhino will lose 90% of the time:
Same canon : no advantage
Weaker (usually 1 hit and it's destroyed) : disadvantage
A little bit faster : advantage but with a decent gunner in the MBT, speed is no use.
So, why name it tank buster if it will lose 90% of the time in combat?
Not sure what you'd expect? Maybe your concept of a mobile gun platform is skewed, they're simply not designed to take on tanks in a direct engagement.
The list of things that can survive a 1:1 with a MBT is pretty thin, even MBT vs MBT is usually decided by who gets the first hit.
The tank busting comes from firing terrain following, laser guided missiles with UAV or Laser designator support from beyond visual range.
Cheers
-
1
-
-
1 hour ago, Mr H. said:Thank you for your answer but that won't work for what I'm trying to do, the goal being to develop a simple composition grabber/ spawner. The idea was that I would for instance create a nice composition with animated characters, the animation would be coded in the characters' init field, this would mean that when I grab a composition I'd also grab whatever code they have and reexecute it when I spawn the composition, for any given composition, quickly and without reassigning scripts. (Which is what I'm doing so far and is rather tedious).
Don't see why this wouldn't work.
You set a variable in the objects init field, just modify the grabber function to also read the variable and store it in the array generated by the grabber, then use it when spawning the composition.
Cheers
-
On 11/17/2018 at 4:15 AM, Wiki said:Hello guys.
So, I make this poll to have your opinion.
Do you think the Rhino MSG is really useful?
IMHO, not very much:
barely faster than MBT, much more fragile, same canon as an MBT.
What do you think?
Try doing anything with a MBT on Tanoa.
Cheers
-
-
Quote["_actionIdx"],Remove the quotation marks.
Cheers
-
1
-
-
1 hour ago, LEXA_vole said:Hello guys,
I just want to make an aircraft shot down by flak with triggers. And I want to make it blow in mid air and lit the aircraft so it will look terryfing.
Thanks for helping me.Check this out:
Cheers
-
1
-
-
On 10/18/2018 at 10:30 PM, SSgt I. Ramos said:1. Open GOM with aircraft nearby
2. Load the pylons with any bomb (GBU, Cluster, etc)
3. Save your loadout as a preset
4. Load the preset to the aircraft
5. Enter the aircraft and attempt to select Next Weapon or Switch to Weapons Group 4 and notice you cannot switch to bombs (Key bindings can be found in options)
Couldn't really look into this yet, might find some time this weekend.
3 hours ago, colinel said:So I have your loadout manager all installed and working, but there's one thing I'm really concerned about.
It seems that there is music coming out from the object that I have the Edit Aircraft Loadout menu from.
I looked all throughout the scripts for the loadout manager, but couldn't find anything related to the music.
The music gets increasingly louder and goes for further distances, and is disrupting gameplay for some. Where would I go to disable this music without deleting the external Loadout Editor?There's no playMusic command in any of the files related to the loadout scripts.
The only sounds being played are interaction sounds when using the menu buttons and installing stuff on pylons.
You might have copied the objects from the demo mission in your own mission, one of those uses ambient music, take a look at the object init fields.
Cheers
-
Replace this line:
_toHandle = units player select {!(_x getVariable ["TAG_fnc_isAutoMedic",false])};with this:
_toHandle = units player select {!(_x getVariable ["TAG_fnc_isAutoMedic",false]) AND !isPlayer _x};Cheers
-
1
-
-
1 hour ago, Weapon-Fetish said:Hi all sorry im again :D
I would Give a unit a init over this trigger below when he join my group.
The Condition of the trigger are :
({alive _x} count units mygroup) < 2
And in on Activation i would give the group member this in the init :
dummy = [this, units (group this)] execVM "automedic.sqf";
This is for a script that force ACE 3 Ais to revive me . I know i can normally set :dummy = this ............. in the init field of my group member BUT the group member existing not before , i recuit them with the Ravage recuit script and want to give them the init when he joining me.
Its that possible to make that over this Way ? I only found ways to spawn units with a init but nothing over joing player goup .
Tanks again for Reading and hopfully try to help me ! :)
You can run a small loop to check for new members and run the automedic script on them once, like this:
//initPlayerLocal.sqf _automedic = [] spawn { TAG_fnc_addAutoMedic = true; while {TAG_fnc_addAutoMedic} do { _toHandle = units player select {!(_x getVariable ["TAG_fnc_isAutoMedic",false])};//will select units that are not already automedics { [_x, units player] execVM "automedic.sqf";//turn unit into autoMedic _x setVariable ["TAG_fnc_isAutoMedic",true];//set a flag to mark the unit as autoMedic so it will only be added once } forEach _toHandle; sleep 5; }; };This will add the automedic to all units that aren't already designated automedics, every 5 seconds. If you want to stop the loop from adding automedic functionality simply set TAG_fnc_addAutoMedic to false.
Cheers
-
1
-
-
3 hours ago, Comrade Cheeki Breeki said:I've been trying to make a sequence where you fly in on a helicopter with your squad, land, the pilot and copilot wait for you and your squad to get out, and then they continue. I have a "LAND" waypoint and invisible helipad making the landing simple, and the next waypoint is a "MOVE" waypoint that takes the helicopter out of sight and deletes it. However, in its current state, the helicopter will land and then immediately take off again and proceed to the next waypoint. I understand why this happens, but the issue I am stuck on is how to check if the units are inside the vehicle or not. I know you would have to put it in the Condition section of the land waypoint, but I don't know what to put there. I tried listing off every unit and making it
if (unit !in helo_intro) then {true} else {false};(unit being the unit specified, just have that repeated a bunch) but apparently !in isn't valid. I thought about making an array that contained the units that were outside the helicopter, and as each one exited they were added to the array, and then it would check if everyone in the squad was in that array before returning true, but I don't even know where to begin with that. I would really appreciate some help.
As @beno_83au stated, the exclamation mark is in the wrong spot.
To check if a group is inside/outside a vehicle:
crew _chopper arrayIntersect units _infGroup isEqualTo [];//returns true if all units of the group are outside the chopper count (units _infGroup select {_x in crew _chopper}) isEqualTo count units _infGroup;//returns true if all units of the group are insideCheers
-
3
-
-
34 minutes ago, Salty Bear said:I'm having the same problem.
Also, once the helo lands so that my team and I can get out, instead of waiting on the ground for the Condition in its Land waypoint to be fulfilled, it immediately takes off and hovers dozens of meters above the ground - so there's no way for me to get back in later. Why doesn't the AI stay landed?
As far as I recall this behavior broke some time ago, this snippet usually worked fine, this is now no longer the case:
_test = [] spawn { _chopper = chopper; _infGroup = group player; doStop _chopper; _chopper land "Get In"; waitUntil {crew _chopper arrayIntersect units _infGroup isEqualTo []};//players group left the chopper driver _chopper sideChat "Group left, ready to board"; waitUntil {count (units _infGroup select {_x in crew _chopper}) isEqualTo count units _infGroup};//players group boarded the chopper driver _chopper sideChat "Group boarded, RTB"; _chopper land "NONE"; _chopper move [0,0,0]; };Choppers usually take off after some units leave/board at random, never figured out what's needed to override this behavior, life's too short for trying to fix AI, heh.
Cheers
-
3 hours ago, tourist said:THX @ Play3r for the thread and THX @ GOM for the code - works also fine if you (for whatever reason) want to check if players kill animals.
One thing jumped to my mind though: is it possible to check just for a certain class of civilians or animals? Like, you can kill rabbits but will get punished for killing goats? Or you can kill civs (and then hush it up "He had an IED, we solemnly swear!"), but NOT the IDAP personnel and get punished for that if you do it?
Sure is, just change the isKindOf check to the classname you want.
Other than that you can use setVariable to set a flag on an object, and use getVariable inside the EntityKilled EH to check if a killed unit was flagged and act accordingly:
//object init field this setVariable ["TAG_fnc_HVT",true]; //initServer.sqf addMissionEventHandler ["EntityKilled",{ params ["_killed", "_killer", "_instigator"]; if (_killed getVariable ["TAG_fnc_HVT",false]) exitWith {"EveryoneLost" call BIS_fnc_endMissionServer}; }];Depending on how you plan to implement it it's probably better to add individual EHs for checking certain objects only:
//HVT object init field this addEventhandler ["Killed",{"EveryoneLost" call BIS_fnc_endMissionServer}];Cheers
-
1
-
-
2 hours ago, Play3r said:I am using Bangabob's COS and i do not know how many Civillian that there is on the map, so all i want is that if you kill ONLY ONE you have failed the mission.
Something like this:
//initServer.sqf in mission root addMissionEventHandler ["EntityKilled",{ params ["_killed", "_killer", "_instigator"]; if (typeOf _killed isKindOf "CAManBase" AND side group _killed isequalTo civilian) exitWith {"EveryoneLost" call BIS_fnc_endMissionServer}; }];addMissionEventHandler#EntityKilled
You need to check for side group, since killed units are automatically side civilian, yet still remain in their group for a short time.
Cheers
-
5
-
-
All AI can do when inside a plane on the ground is follow the taxi waypoints as defined in the map config (and even that's at least a 50% chance for disaster).
Cheers
-
1
-
1
-
-
30 minutes ago, TCGM said:Tested ... This is the error that appeared.
'...ns\ShootAsRichTexan.VR\init.sqf" Player |#|addAction ["<t color='#FF0000'>Shoot as ...' Error Type Bool, Espected String File X:\XXXX\missions\ShootAsRichTexan.VR\init.sqf, line 1
Where init.sqf is the file with the addAction code that you sent me. Thank you. Next test?
@Spatsiba forgot the quotation marks.
This should do the trick:
//only show if current weapon is the handgun //downside: will also show if no weapon equipped and no weapon in handgun slot and also if player is inside a vehicle player addAction ["<t color='#FF0000'>Shoot as Rich Texan</t>", "AirShoot.sqf", nil, 1.5, true, true, "", "currentWeapon _target isEqualTo handgunWeapon _target"]; //only show if on foot and the current weapon is handgun and the player isn't unarmed player addAction ["<t color='#FF0000'>Shoot as Rich Texan</t>", "AirShoot.sqf", nil, 1.5, true, true, "", "objectParent _target isEqualTo objNull AND currentWeapon _target isEqualTo handgunWeapon _target AND handgunWeapon _target !=''"];
Might want to use the second example if you want to play an animation (just guessing), so players won't be able to play animations inside vehicles (FFV slots).
Cheers
-
1
-
1
-
-
8 minutes ago, handlebar said:So the script does not run when a task is completed.
It works to add tickets, when calling the funtion in the debug command it works no problem. I have the call fnc in the init.sqf but I no longer believe that to be correct. GOM, perhaps you could lend me an idea as to wear to put this.
Thanks!
The function runs where you call it.
Since the init.sqf runs at mission start in SP and on every connecting player in MP you might want to run the check in the last line some place else.
Cheers
-
3 hours ago, Grim5667 said:@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 = ..."
You can add knowsAbout to the _nearby selection, as posted earlier in this thread.
Cheers
-
Ah, I remember that one:
Cheers
-
1
-
-
Unless you're running into performance issues and removing your scripts solves those issues, I wouldn't worry about it.
Usually having one check for the player unit is preferable vs. adding actions to all units.
alive _target && _target distance _this < 5 && getDammage _target > 0;//0.0022ms when returning false _target = test; _return = false; _units = allUnits select {alive _x && _x distance _target < 5 && ([visiblePosition _target, getDir _target, 60, visiblePosition _x] call BIS_fnc_inAngleSector) && (getDammage _x > 0)}; if (count _units > 0) then {_unit = _units select 0; _target setVariable ['target', _unit]; _return = true } else { _return =false }; _return //0.002ms when returning falseCheers
-
2
-
-
Could be related to distance, if within audible range you'd hear the unit itself speaking, if further away he's using the squelching radio.
There was also a bug (maybe still is) that you'll hear direct audio and radio at the same time...
Cheers
-
48 minutes ago, redburn said:32/5000
I could do this in the init.sqf?
//init.sqf if (!local isServer) exitWith {onPlayerConnected "updates.sqf"};
In updates.sqf
//updates.sqf publicVariable "publicTime"; publicVariable "penaTiempo"; publicVariable "objetivoPrimario"; publicVariable "objetivoSecundario"; publicVariable "objetivoTarea"; publicVariable "bonoBandera"; publicVariable "civilesFinal"; publicVariable "vehEnemigoFinal"; publicVariable "PuntajeFinal"; //Misiones publicVariable "objetivoPrimarioOne"; publicVariable "objetivoPrimarioDos"; //Objetivo Secundario publicVariable "objetivoSecundario"; //Tareas publicVariable "objetivoTareaUno"; publicVariable "objetivoTareaDos"; publicVariable "objetivoTareaTres"; //Vehículos neutralizados publicVariable "vehAliadoFinalUno"; publicVariable "vehAliadoFinalDos"; publicVariable "vehAliadoFinalTres"; //Otros publicVariable "FAM_granDamage"; publicVariable "FAM_ambushEnemy"; publicVariable "FAM_libres"; publicVariable "FAM_DeadCivilianCount"; publicVariable "FAM_DeadPlayerCount"; publicVariable "FAM_DeadPEnemyCount";I could be doing it right?
Do you know what publicVariable does? Doesn't seem like it, or rather you seem confused about its usage (in this case).
Does every client need to have access to all those variables? The more you cut down on network traffic, the better.
If you simply want to handle civilian/friendly kills for every side you can do it exclusively on the server, no need to broadcast any variable at all.
Cheers
-
1
-
Smooth camera
in ARMA 3 - MISSION EDITING & SCRIPTING
Posted
Always nice to post your final solution, so others might benefit instead of opening another thread to the same/similar problem.
Cheers