#arma3_scripting
1 messages ยท Page 772 of 1
just remoteExec the function
getpos
[thisTrigger,thisList]call_onAct;
_onActis not defined
_thisList
_thisTrigger
not defined in AAFRB1Action_1
also AAFRB1Action_1 is a local function. no need to use a global var for it
Is it possible to somehow disable the ability to aim missiles at vehicles?
class CfgSounds
{
class bigmixDAY
{
name = "bigmixDAY";
sound[] = {"sounds\bigmixDAY.ogg", 3,1};
titles[] = {0,""};
};
class fallback
{
name = "clu_falling_back";
sound[] = {"clu_falling_back.ogg", 4,1};
titles[] = {0,""};
};
class halftrack
{
name = "clu_watch_out_halftracks";
sound[] = {"sounds\clu_watch_out_halftracks.ogg", 4,1};
titles[] = {0,""};
};
};
is this correct?
the fallback one doesnt work. but halftrack plays before it (if that matters)
the bottom one doesnt seem to be working
Ugh, I posted an incomplete version, I was mucking around a lot with it.
AAFRB1Action_1 did have a params ["_thisTrigger","_thisList"] line, missed it in the posted version. Similar with NearestEntities, though now I'm wondering if I did make that mistake in my other models - my functioning version uses the correct nearEntities :x
I've been remoteExecing my chatlog function because that was the only way I'd been able to get it to work, but you're right - now I have it properly registered, I should see about cleaning that up. A big problem I had was with MP compatibility, and remoteexecing it to every machine at least solved that, if bluntly.
Wouldn't _onAct be AAFRB1Action_1? It's the third params list, and third in the called array.
And yeah - everything in AAFRB1Action_1 would be changed up if I could get this working, since the additional trigger would use the same IntelTrg function.
A big problem I had was with MP compatibility, and remoteexecing it to every machine at least solved that, if bluntly.
I didn't say don't remoteExec it
I said remoteExec the function
not spawn
Wouldn't _onAct be AAFRB1Action_1?
no
it's not defined
the trigger statement is being executed elsewhere
not in the current scope
it doesn't see your local vars
I don't get it. which one doesn't work? the middle or bottom one?
the config itself looks correct. but your paths may not be
the bottom one wont play
try restarting the game
should
https://community.bistudio.com/wiki/Arma_3:_Event_Handlers#HitPart
be added to all players if they are all going to shoot at a single object?
While you can add "HitPart" handler to a remote unit, the respective addEventHandler command must be executed on the shooter's PC and will only fire on shooter's PC as well. The event will not fire if the shooter is not local
yes
so I should remote execute spawn it correct?
[[], {
//EH
}]remoteexec ["spawn",0];
```?
I'm spawning it because I will also add other EHs
if you're going to do that:
[_obj, ["HitPart", {myEHCode}]] remoteExec ["addEventHandler", 0];
but just make a function instead
I will only spawn it once, is a function needed in this case?
oh, thing is I'm doing it on public zeus
its not a "mission" set up
i swapped the sounds around, and they both worked. but for some reason that bottom one will not play ๐ฆ
wdym swapped them around? swapped what?
the names of the sounds. i added bottom to middle and vis versa
does anybody know how to spawn 20-30 troops with a trigger, im making an open world campaign and I want an abush to happen on base after returning
in that case it's fine. but I don't think they allow you to remoteExec call and spawn.
name doesn't matter
in some cases they do
you can use BIS_fnc_spawnGroup
class halftrack
{
name = "clu_watch_out_halftracks";
sound[] = {"sounds\clu_watch_out_halftracks.ogg", 4,1};
titles[] = {0,""};
};
};
it looks fine to me ๐ฆ
well yes
it looks fine
but name doesn't matter
only the class name is important (and the sound itself must be correct ofc)
yea they are fine in the triggers
Make sure what ever is in "" where sounds [] is in correct folder and spelled correclty.
and do you play it as _obj say3D "halftrack"?
no its some guy shouting
I'm asking how you play it...
is it possible to put an MP4/video on screen I had a cool idea for an intro but im unsure on if its possible
playSound "halftrack";
.ogv is possible, without sound though
it should work 
can I overlap sound with playSound?
perhaps, but desync may ensue
all i want is a neat edited intro over my tutorial
@coarse dragon DM me your folder setup
hey gentlemen and ladies scriptwriters, does anyone have any idea how to force AI b turned on the IRlaser on the rifle not only when it is in ACTION. player action ["IRLaserOn", player]; doesn't work for AI ๐ฆ
AI can only do that in combat mode
and it can not be forced, for example in safe mode?
no, it can only be forced in combat mode
OK thank you for your answer
to force that use enableIRLasers (set the unit to Combat mode first)
unit enableIRLasers true
I know. and the player can even be in safe mode but I can't do it in ai. thanks for reply
oh, maybe that FSM can be fixed to obey the allowCrewInImmobile setting
I wonder if you can put them in combat mode, turn on the laser, disable FSM then switch them back to safe.
where are the OGV files?
nope. didn't fix it ๐ข
aw
where do I put OGVs to use them with bis_fnc_playvideo
anywhere in mission folder
disableAI "all" does keep their lasers on, but even enabling ANIM turns them off again, so that's pretty useless :P
Tried that yesterday, nope
Even if you do disableAI "all"
They still jump
yeah I know
for now I made a ticket:
https://feedback.bistudio.com/T165584
That right there is why you are the best boss
well since you're interested you can subscribe to attract more attention to it ๐
already done
https://community.bistudio.com/wiki/Arma_3:_Event_Handlers#HitPart
does the _projectile parameter return a live round?
like can I for example teleport it?
maybe. or maybe not
depends
on what?
does it consider the laser a projectile for example?
no I meant laser marker
no it's not a projectile
because I'm confused on what you mean by "depends", so I thought you meant the laser
no I mean what happens to the projectile
e.g. if the EH triggers by explosions the projectile may already be dead
or if the bullet doesn't pass thru the unit
not sure about this one
what I need is a direct hit anyways
if what I said ^ is correct maybe not
but I guess yes
I guess I will just try it then
I think projectiles die on the next frame
in an unscheduled environment it can't catch it before dying?
it can. that's what I meant
Hello, is there a list or smthing with all the roles and icon units can have? Been trying to look it up, but no "list" of them came up
you mean like grenadier and stuff?
well like this for example
icon = "iconManAT"; role = "MissileSpecialist"
well you can write a script to give you all of them
_iconsAndRoles = createHashmap;
toString {
getNumber (_x >> "scope") == 2 && getText(_x >> "simulation") == "soldier" && {
_iconsAndRoles set [[getText(_x >> "icon"), getText(_x >> "role")], _x];
}
} configClasses (configFile >> "CfgVehicles");
oof, I was hoping there was a list somewhere on the wiki already and I am just blind lol
list of all vanilla ones
if you just want the icons you can find them in configFile >> "CfgVehicleIcons"
โค๏ธ
Thank uu
Sooo i have a question, but some context is needed.
Im working on a mission where players are doing a training exercise. For the sake of inmersion i'm making them use actual blue magazines, BFAs and that stuff. One mod in particular has dummy blue rockets, which are aesthetic and what im looking for, as they are actual dummies and wont explode.
So far so good, but I want the players to use them against UGVs.
Is there any way of disabling the UGV's simulation when that very specific ammo type hits it? I know it has something to do with eventhandlers but I dont know how I'd go about it.
I want the players to use them against UGVs.
disabling the UGV's simulation when that very specific ammo type hits it?
I don't get what you mean. do you want the damage or not?
the rockets deal no damage. All I need is the UGV's simulation to be turned off when the rocket hits it
i figured it would be the easiest way to simulate a kill.
without actually blowing it up
i mean, it would be cool if the turret looked down after getting hit to give players feedback, but its not necessary
this addEventHandler ["HitPart", {
params ["_veh"];
[_veh, false] remoteExec ["enableSimulationGlobal", 2];
}];
wouldnt i need to specify the ammo type somewhere?
as im reading it, that would trigger when it gets hit by anything
I only want to disable the simulation when the actual rocket hits it
I don't know why you want to disable simulation after it's hit anyway 
objects with disabled simulation still take damage
you can just disable it from the start of the game
what?
okay im not getting the point across
UGVs are protecting certain objectives
since its a training mission I wanted to give them dummy rockets
when the dummy rocket hits the UGV, their simulation gets disabled to simulate a kill
I could do something like remove its ammo and fuel and switch its side to civilian or something like that, but disabling its simulation is faster and simpler, no?
well you never mentioned this part
I imagine the UGV can only be killed by your training rockets too, yes?
yes
as in no damage with other projectiles?
I dont know how effective 5.56 is against vanilla stompers, but I dont think it can knock the turret off anyways
this addEventHandler ["HandleDamage", {
params ["_veh", "", "_damage", "", "_projectile"];
if (typeOf _projectile == "myAmmoClass") then {
[_veh, false] remoteExec ["enableSimulationGlobal", 2];
_damage;
} else {
0
};
}];
lockCameraTo
but won't work with simulation disabled
yeah it would have to fire before the sim gets disabled
if all you need is pretend the UGV is dead you don't need to disable simulation
its pretend to a degree
if the sim doesnt get disabled then its gonna rip them a new one ๐
er... or several
i just dont wanna blow it up because 1) I have cool dummy rockets and 2) if I used real ones I'd have to remove enemy infantry cover of the objective
and I dont trust the players not to use "real" rockets against other targets. By forcing them to use dummies I can get away with a lot more stuff
no
you can just disable their AI
would that be easier?
since you want the turret to aim yes
im gonna try disabling the sim first
there:
this addEventHandler ["HandleDamage", {
params ["_veh", "", "_damage", "", "_projectile"];
if (_projectile == "") then {
if (simulationEnabled _veh && scriptDone(_veh getVariable ["my_handle", scriptNull])) then {
{
_x disableAI "target";
_x disableAI "autotarget";
_x disableAI "CHECKVISIBLE";
_x doWatch objNull;
private _unit = _x;
_x targets [] apply {_unit forgetTarget _x};
} forEach crew _veh;
_veh lockCameraTo [getPosWorld _veh vectorAdd (_veh weaponDirection (_veh currentWeaponTurret (_veh unitTurret gunner _veh)) vectorMultiply 10 vectorAdd [0,0,-10]), _veh unitTurret gunner _veh, false];
_handle = [_veh] spawn {
params ["_veh"];
sleep 3;
[_veh, false] remoteExec ["enableSimulationGlobal", 2];
};
_veh setVariable ["my_handle", _handle];
};
};
0;
}];
it also disables simulation
oh
btw you might want to copy the code again
I just fixed a couple of bugs
right
question, what does this line exactly? do I need to give the ugv a variable name?
_veh setVariable ["my_handle", _handle];
makes sure the spawned code is unique
also I changed another thing too
did you replace the ammo?
yes
ACE arsenal
oh.
use config viewer to find the ammo name
right, brb
it does
but may not work on an object with active AI
I've only managed to make it work on simple objects
iirc even empty vehicles don't work
Yes
It was very annoying for me trying to figure out how it works
Only to turn out that it usually doesn't
@little raptor used the ammo this time, still doesnt seem to work
where did you get the ammo from?
then I guess it's as you said
it might be the round itself whats the problem. When it hits it turns into smoke and it bounces off. I might have to change it to the smoke shell instead and see if it works
well just add an empty event handler to it to see which one works
this addEventHandler ["HandleDamage", {systemChat _thisEvent}];
this addEventHandler ["HitPart", {systemChat _thisEvent}];
see which one(s) work
first one returned "handledamage" when hit in the rear
then it does work
hm
now get the ammo name
this addEventHandler ["HandleDamage", {copyToClipboard str (_this#4)}];
that did not return anything
then it's not taking damage by the projectile
probably due to "fall" (impact) damage and stuff
Since the rocket doesnt do damage its probably not triggering the actual handler for the disable sim thing since it needs a damage threshold iirc
thats frustrating
well you can "simulate" it yourself then
you have to add a FiredMan event handler to all players
then when they fire something, trace the projectile
hold on hold on
adding "" to the eventhandler worked
gonna check if regular bullets trigger it too
im gonna guess adding "" is gonna make any projectile trigger it
no
no
only impact damage
i meeeean teechnically its one way of disabling it
damn Ill take it!
kind of janky but what the players dont know, cant hurt them

also just checked
with the "" shooting the drone triggers it
hmmmm
i just shot it with a rifle and it triggered tho
not yet
alright
I also updated the code so that the turret looks down where it was
it was looking at front before
alrighty, thanks!
I asked a question yesterday about teleporting. Currently im doing remoteExec, 2, for a script and inside of that is player setPos ([x,y,z]); but its only teleporting the host, no matter who uses the action.
because the player object is evaluated where the command is executed
not on other clients
So would this have the same effect on a dedicated server?
What I mean is, would it not teleport any player as its not on other clients?
Sure, I'll have to be 5 minutes though. Sorry
In TpOut:
player setPos ([10158.6,12341.5,37.6614]);```
In action:
```sqf
this addAction ["Leave the Base", "remoteExec ['LouisTag_fnc_TpOut',2]"];```
Description.ext is set up correctly too, in case that's needed
isn't 2 just the server?
didn't you say you wanted to teleport whoever executed the action?
Yes, I suppose 2 is the wrong one then ๐
you can use an object there
you don't need remoteExec at all
factual
Right, see I've just gotten into that habit I guess haha
so just sqf this addAction ["Leave the Base", "player setPos ([23337.4,18406.5,0]);"]; would work better?
Is that instead of the second set of "?
Awesome, cheers! :)
is there any way I can disable AI until I enter a trigger so AI far away don't react to stuff and move about
disableAI
sadly it didn't
deletevehicle does nothing to the projectile
what was it supposed to do?
it just deletes it on the next frame
the tank
still gets damaged
so I don't think its deleted
and the rocket explodes too
all of what you said is happening in the current frame
so it deletes it after it detonates is what you are saying
yes. and stop pinging me with every message
sorry
I'm not really good at vectors so,
is there a way to reverse the course (movement) of an object using velocity and setVelocity ?
if a missile is travelling east for example, it gets reversed to west
https://forums.bohemia.net/forums/topic/212885-vectordir-and-vectorup-complete-guide/ this is a good read for vectors. Also you could get the vectorDir and just reverse the direction.
_v = velocity _obj;
_obj setVectorDir (vectorNormalized _v vectorMultiply -1);
_obj setVelocity (_v vectorMultiply -1);
does this account if it flies upwards/downwards?
i shot a rocket upwards, and it got reversed but still flew upwards instead of downwards
changing -1 to 1 at the second line fixed it
thanks
wat?
it was correct already
_v = velocity _obj;
_obj setVectorDir (vectorNormalized _v vectorMultiply 1);
_obj setVelocity (_v vectorMultiply -1);
vectorMultiply 1
``` is redundant
it was not behaving like I expected, because if a rocekt travels upwards towards east it should be reversed to west downwards
instead it was doing west upwards
Arma 3 when they hit you with that 1 dollar store rocket
is it a modded projectile?
then reverse the dir:
_v = velocity _obj;
_obj setVectorDir (vectorDir _obj vectorMultiply -1);
_obj setVelocity (_v vectorMultiply -1);
my code should've worked as it was but meh

that behavior probably has to do with it being a guided missile rather than a dumb rocket
will try this out, many thanks
didn't lock tho
or put vectorUp there to be sure:
_v = velocity _obj;
_obj setVectorDirAndUp [vectorDir _obj vectorMultiply -1, vectorUp _obj];
_obj setVelocity (_v vectorMultiply -1);
vectorDir works weird sometimes
yes I know the feeling, very appreciated didn't expect this much help out of such a trivial thing, many thanks again
i just wanted to kill the rocket shooter with their rockets basically
maaws projectile is easier to manipulate in my experience
setMissileTarget might work with a pcml projectile
thing is they will be firing at a flying submarine, so they will basically expend everything on the map to kill it
the plot thickens
I can't control what they use but the script seems to work so far
hey guys, i am looking for a way to delete an AI unit once they hit their waypoint or once they walk into a trigger near their waypoint which ever is easier. I have found a few sources on youtube but they all are in relation to deleting a vehicle.
Yeah its deleteVehicle
oh well im dumb
i kept thinking that would equate to an actual vehicle
Vehicle can be an object or a unit or an actual vehicle
You can delete a rock you spawned with deleteVehicle
You can imagine it as any object that can be simulated
Projectiles, units, props, vehicles etc
ok awesome thank you
would https://community.bistudio.com/wiki/lineIntersectsSurfaces work if I executed only on server? From what I tried it didnt seem to work for me when I tried to see if a line between player and a vehicle was intersecting. Works fine if I do it client side
share your code
@little raptor yo man so other players cannot see my vehicle
Then it's a local vehicle
I was thinking why the remoteExec doesn't show any error if the function it tries to call is invalid/inexistant
the remoteExec sender cannot know that
the remoteExecuter should be able to know though
yep
Would be useful for debugging if you have both instances on the same PC
client & server
bis_fnc_garage_center = nil;
bis_fnc_arsenal_center = nil;
["Open", true] call BIS_fnc_garage;
if (missionNamespace getVariable ["my_garageEH", -1] != -1) exitWith {};
my_garageEH = [missionNamespace, "garageClosed", {
player hideObject false;
isNil {
_newObj = createVehicle [typeOf BIS_fnc_garage_center, [0,0,0]];
deleteVehicle BIS_fnc_garage_center;
BIS_fnc_garage_center = _newObj;
BIS_fnc_garage_center setVehiclePosition [player modelToWorld [0, sizeOf typeOf BIS_fnc_garage_center, 0], [], 0, "NONE"];
BIS_fnc_garage_center allowDamage true;
};
}] call BIS_fnc_addScriptedEventHandler;
[missionNamespace, "garageOpended", {
player hideObject true;
}] call BIS_fnc_addScriptedEventHandler
this should convert the object to global
I don't think that's just remotexec. You can literally run [] call nil and SQF won't throw an error.
Feels like it probably should though.
depends where you run it
[] spawn {
0 call nil; // does it throw?
};
hmm
It's not just scheduled/unscheduled, it actually cares whether it's remote executed or not for throwing errors?
Very new to scripting, How would I get the small decontamination shower to turn on / off on a trigger?
apparently so, I don't remember greatly
this would require the use of https://community.bistudio.com/wiki/Arma_3:_CBRN#Decon_Showers scripts ๐
okay, thank you
Nope , tested in debug console
dang
I'm trying to get a player (the first player in a trigger) to say3D something upon activating a trigger in a dedicated server setting.
When run from the debug console, player say3D "mysound" works.
But if write that same expression in a script file, and run the script as:
execVM "say3Dscriptfile.sqf"
-In a trigger onActivation field, nothing happens. Not even an RPT error. Note that this is still locally in Eden mission preview.
I've gone ahead and also tried passing the first entry in thisList to a global variable, then referencing it in the script:
say3Dplayer= thisList select 0;
And in "say3Dscriptfile.sqf":
say3Dplayer say3D "mysound"
It works. But that method is not only sloppy, it also generates unnecessary network traffic.
So how would I pass a reference to the activating player to a script file?
you can write arguments with execVM
(thisList select 0) execVM "script.sqf"
then the player is passed as _this
Yeah, you're right that the BIKI says this. I should've added that I tried that suggestion before the write up, and got this in my RPT:
....>
Error 1 elements provided, 2 expected```
send the code
Sure. It'll have different variable names.
Thank you for that.
I had a typo in my trigger onActivation field:
(thistList select 0) execVM "script.sqf";
Didn't give an error. But did show up when I copypasted it into this textbox.
writing in-game is a little rough unless you're really good with the syntax
can I ask why you're loading a whole sqf file? Is there more than just say3D?
Two reasons.
Firstly I am trying to make this local and dedicated server proof. Again, I only want 1 player to say this line; not all players. So I'm trying to select the activating player.
Secondly, this is a dialogue. So there's a suspension (sleep), before an AI character does a say3D.
=================
(Deleted question: solved by simply copying another group and editing variable names. Will never know the typo)
Hi folks. Been away from A3 for a few years. What's the premium patrol script to use? Is it still Kronzky
Or UPSMON?
how do I make triggers only work when they need too, i wanna set up a trigger when leaving a building but youโd have to trigger it to enter the building in the first place
is there anyway I can make a trigger only work if youโve activated another trigger?
maybe like making it appear after a task is complete etc
this one is easy - use the "on deactivation" field ๐
i just wanna make a basic trigger that activates a voice line when I leave my tent
yes?
was responding to leopards comment
is there anyway I can make it only work when I need to though, because the player can activate it at anytime and I only want it to work after this quest not anytime you enter the tent
im really new to A3 scripting so sorry if these questions are rly self explanatory for most people
By default, triggers delete themselves when activated. So, just make sure you don't check the "repeatable" box by accident :).
We all started somewhere
if I remoteExec two function on the server
will that run two different instances of code?
yes, why not 
if one of the functions contain sleep in it, will that affect the other function execution?
(delay remoteExec)
https://community.bistudio.com/wiki/remoteExec
remoteExec is scheduled
it does not "wait for the code to run", it's as if you spawned the function (which it does)
so when
myFun1 = {
//has sleep in its code
};
myFun2 = {
//doesn't have sleep in it
};
[]remoteExec ["myFun1",0];
[]remoteExec ["myFun2",0];
[]remoteExec ["myFun2",0]; will not get delayed because of myFun1 remoteExec right?
yep
thanks
also:
[]remoteExec ["myFun1",0];
// =
[] remoteExec ["myFun1"];
// =
remoteExec ["myFun1"];
I'm aware but thanks again
ok as long as you know ๐ ๐
how to attach task to convoy
i wnat the marker on the map to always be on the convoy
or so the marker to a hvt mission always stays on the HVT
I guess by setting the task destination to the object itself
https://www.youtube.com/watch?time_continue=133&v=JnCqml1OPQE&feature=emb_logo here is a good example.
tysm bro
also whats the current way to do colab projects
currently ive been sending my friend the mission folder
is there an easier way of doing it
github
or merge missions
I'm trying to create an array of all units of a certain classname. But I'm getting stuck on syntax.
Using Syntax 6 of select:
tank_array select ({typeOf _x == "tank_classname"} forEach units west);
without the foreach
typeOf takes objects, not arrays.
what is tank_array?
Hehe. This is tied to my previous question. I want players to get a 'retreat' task and sound when they unexpectedly meet tanks.
It's a Zeus scenario, so I can't give each tank a variable name beforehand.
So I want an array of all the tanks in the mission that refreshes.
With the specific classnames, my current (not working) array expression is:
panzer_array = [];
panzer_array select ({typeOf _x == "LIB_DAK_FlakPanzerIV_Wirbelwind_DLV"} forEach units west);
// this will have to be repeated for different class names of tank, or parent class
Right. So I am trying to use the boolean syntax (syntax 6) of select, as specified on the BIKI.
this syntax filters a filled array
private _result = vehicles select { typeOf _x == "LIB_DAK_FlakPanzerIV_Wirbelwind_DLV" };
Got that. I am trying to filter the array units west.
OK will try your suggestion.
Ah, I see now. Thank you.
Are player fired projectiles local to the player that fired them?
..depends
IIRC bullet-type projectiles have a local copy generated for everyone, while the larger projectiles are global objects. Haven't figured it out entirely though.
Hits for bullet-type projectiles are probably assessed locally, so the remote copies are just for effects/sound.
if you havent figured this out you can use triggerActivated in your trigger condition
(triggerActivated previousTrigger) && this
this condition will stop the trigger from activating until previousTrigger has been activated
that trigger condition box is what tells your trigger when to activate, this representing the settings you selected with the dropdown menus, which is why it just says this by default
I'm facing another problem with this, when this is executed on the server, it seems to not affect player fired projectiles
because projectiles are local
as John said
I tried doing
_v = velocity _obj;
[[_obj,_v],{
params ["_obj","_v"];
if (local _obj) then {
_obj setVectorDirAndUp [vectorDir _obj vectorMultiply -1, vectorUp _obj];
_obj setVelocity (_v vectorMultiply -1);
};
}] remoteExec ["call",0];
but its kind of slowing other things
is there a better workaround?
Install the handler locally wherever you want it to apply.
if (isServer) then
{
private _allTerrainObjects = nearestTerrainObjects
[
[worldSize / 2, worldSize / 2],
[],
worldSize * sqrt 2 / 2,
false
];
{ _x hideObjectGlobal true } forEach _allTerrainObjects;
};
How can i get rid of everything but rocks trees and roads in this way?
yeah
Well
That's what I thought too
I will just install it locally in everyone on the server
A little loop can't hurt
script become wonky it became local
apologies for the inconveniences
Is there any way for me to get VectorUp from the players camera?
Currently im getting the standard direction with "getCameraViewDirection", but I'm using attachTo and I need VectorUp in order to use the setVectorDirAndUp command.
Edit:
I think I found a solution using BIS_fnc_vectorDirAndUpRelative
I have managed to get this to work (mostly) when placed on an item to use as a deployable respawn position. [this, ["Deploy Respawn",{[west, pack, "Camp"] call BIS_fnc_addRespawnPosition;},nil,1.5,true,false,"","",3,false,""]] remoteExec ["addAction",0,this]; Is there any way to set the module position to the PACK once called? Currently the module displays off the pack position, but allows spawning at the pack. Thanks
Does anyone know how to get a DLL loaded ? I try to test a dll but i get this message " 03/06/2022 05:25:27 - Blocked loading of file 'C:\Program Files (x86)\Steam\steamapps\common\Arma 3\test_x64.dll'
you can just do "HOUSE"
might try without battleeye
i tried to disable battleye and restart the game but it's still not working
hmm enable file patching maybe?
file patching ?
just tried it's still not working
hmm, i dont know then im not well informed on dll's
On Bohemia's website they say we have to whitelist a DLL in order to use it and to do so we have to contact battleye support. But come on i can't contact battleye for a test dll that isn't even finished
-init="name_of_dll"callextension"" saw this maybe it helps
also tried and it doesn't work
Did you make the dll?
Does it export all necessary functions?
Just read the message
Blocked loading of file
BattlEye blocked it
Finally gonna have some free time to get back to tinkering with some coding later today t_t
Referencing my function above, im thinking of ways to pass _onAct to the trigger, since I was told they're in a different scope.
Would it be something like setting a global variable to _onAct, then creating the trigger with the global variable called?
And if so, does the trigger store that information, or would changing the variable by calling more instances of the function change the effect of previously created triggers?
And yes, looking at cleaning up my spawned Chatlog function, though thinking it through I may just have to put a spawn inside the function - it relies on BIS_fnc_EXP_camp_playSubtitles, which memory serves only works in a scheduled environment :x
this is my dll:
using System.Text;
using System.Runtime.InteropServices;
using RGiesecke.DllExport;
namespace testdll
{
public class Class1
{
#if WIN64
[DllExport("RVExtensionVersion", CallingConvention = CallingConvention.Winapi)]
#else
[DllExport("_RVExtensionVersion@8", CallingConvention = CallingConvention.Winapi)]
#endif
public static void RvExtensionVersion(StringBuilder output, int outputSize)
{
output.Append("Test-Extension v1.0");
}
#if WIN64
[DllExport("RVExtension", CallingConvention = CallingConvention.Winapi)]
#else
[DllExport("_RVExtension@12", CallingConvention = CallingConvention.Winapi)]
#endif
public static void RvExtension(StringBuilder output, int outputSize,
[MarshalAs(UnmanagedType.LPStr)] string function)
{
output.Append(function);
}
#if WIN64
[DllExport("RVExtensionArgs", CallingConvention = CallingConvention.Winapi)]
#else
[DllExport("_RVExtensionArgs@20", CallingConvention = CallingConvention.Winapi)]
#endif
public static int RvExtensionArgs(StringBuilder output, int outputSize,
[MarshalAs(UnmanagedType.LPStr)] string function,
[MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.LPStr, SizeParamIndex = 4)] string[] args, int argCount)
{
foreach (var arg in args)
{
output.Append(arg);
}
return 0;
}
}
}
nothing fancy
and it's blocked by battleye
please, avoid wall of code (use pastebin or smthg)
sorry
As others said disable battleEye then
i already tried to disable battleye it's still not working
Then you haven't disabled it 
on Bohemia's page i can read : "Since 1.46, client extensions need to be whitelisted in order to get loaded.". Does it mean i can only test my dll on a server ?
There is an option in the game launcher in the bttleye section to disable it. This is what i did
If it still says blocked, then battleye is still on
it doesn't say anything anymore but the extension is still not working
does it say any other error now?
no i even checked the RPT and nothing written. The game is acting exactly like there was no dll
wdym? did you even call the extension?
your extension is simply supposed to print out whatever you send to it as args
i copy and pasted bohemia's example it's supposed to return the name of the called function
yes, and?
i use ("test" callExtension "test")
and it returns an empty string
that syntax doesn't return anything
read the wiki...
oh wait it does 
then no clue 
yes it returns the nameof the function
- stop pinging me
- I meant the
callExtensionsyntax - use the other syntax. it tells you if the extension failed
i used ("test" callExtension ["test", ["bla","bla"]]) and it returns ["",-1,0]
your extension wasn't loaded then
This is what i thought at first but then why does battleye says "Blocking loading of file" ? I also tried to copy the dll in a mod folder to if the game would load it with the mod but i get the same result
I also created a dedicated server to try but still doesn't work
why do you test on a server? just test normally in single player for now
why does battleye says "Blocking loading of file"
if it says blocked loading then battleEye is still on for some reason
post the rpt
Arma generates a .rpt log file each time it's run, which contains a lot of information like the loaded mods, or any errors that appear, this log file can be very useful for troubleshooting problems.
To get to your RPT files press Windows+R and enter %localappdata%/Arma 3
Additionally see the wiki page for more info: https://community.bistudio.com/wiki/Crash_Files
To share an rpt log here, please use a website like https://sqfbin.com/ to upload the full log, that way the people helping you can take a look at it and try to figure out the problem you're having together with you.
Note: RPT logs can hold personal information relevant to your system, the game or others.
Yes this is what i was doing but on Bohemia's website i can read "Since 1.46 client extensions need to be whitelisted in order to get loaded.". So i tried it on a server to make sure. Battleye doesn't say anything anymore it disabled. I was just saying it says "Blocked loading of file" when i activate it
I don't know why i can share the RPT file on this channel to show you but it doesn't say anything about the DLL, exactly like the DLL didn't exist
i sent you a dm with the rpt file
I solved the problem ! Finallyyy! The problem is coming from my misunderstanding of Visual Studio 2022. I was trying to create a project based on .Net and Standard .Net. You must create a project based on .Net Framework and select Framework 3.5 in the project properties to have it working ! A Superior Framework Will not work.
Anyone familiar with the basics of scripting, kindly DM me if you have a minute or two. I could use a hand with... like.. the most basic thing.
well, please tell us here? ๐
So I wrote this script, which in theory should work. The only problem is, uh... Idk how to tell you this... ||I still don't know how to include script files into a gamemode lol||.
Not specifically, will do now, but every guide I went through goes through the steps of using MSVS, which I really don't want to use, instead I use a basic text editor.
Much appreciated. I haven't actually seen that part of the page before. So now I have a script inside my mission, what's next? Do I have to load the script manually somewhere in the editor? Or does the game automatically load it when the mission starts?
either use execVM or define functions in description.ext, the latter being more efficient if it's being called multiple times
here are files you can put in mission root that the game will consistently execute
and don't you worry about not knowing things, for this channel is here to help!
Learning welcome ๐
for example you can write execVM "yourScript.sqf" in initServer.sqf for the server to run yourScript.sqf on mission init
or you can define a function and call yourTag_fnc_yourFunction in, say, a trigger
Im using this command "BIS_fnc_vectorDirAndUpRelative" but "vectorUp" isnt changing, its stuck at 0,0,1. Anyone have any idea whats wrong?
Much appreciated, really. And will do.
Where do I find initServer.sqf? Do I create it myself?
yes
you create the file next to mission.sqm
the game will automatically check for it and execute whatever instructions your write in it
So the init file will only loadup other scripts/funcs I made, correct?
you can write whatever sqf code you want in there
but execVM is the command to load and execute a separate file
Hol' up... can I just dump all my scripts in initServer.sqf? ๐คฃ
I'm only asking if it's possible, not if it's a good idea.
yes it's possible, just not clean
Is there any limit for how many scripts I can include in a single mission?
your RAM ๐
you can load as many scripts as you want, sqf is just inefficient so you want to limit it to whatever you need
Are you suggesting there's an alternative to sqf? ๐
My hardware can barely run A3 on crutches... Reforger would probably send my PC into cerebral palsy.
One last question, bear with me please... what is binarisation? Do I want it? Do I need it? What difference does it make?
converting files to computer-talk so it loads faster
afaik the tool for that is more for addon config, though mission.sqm is also binarized by default
So... faster loading when playing at the cost of slightly longer saving time when editing? Right? Wrong?
it just means you can't read and write the file in a text editor
you can uncheck it and manually configure the sqm but yes, in a mission file I believe only the sqm would be binarized
Now that begs the question... what can I edit in the .sqm file that I can't edit in the in-game editor?
most commonly removing dependencies I think
If you made the mission with an addon loaded and change your mind about the mission requiring it
also ctrl+f to replace classnames of items
yw
any idea how to figure out why my mission gets stuck in the loading screen? Like, after i hit start on a dedi it sits in the map screen endlessly
this is really odd. is there a way to skip the map screen?
If its the respawn screen your talking about but it doesnt give a spot to respawn and there arent any buttons. Sometimes pressing Enter fixes it
no thats not it
before the briefing screen that you have to click 'continue' on
im talking about the loading screen that shows the map thats being loaded
endless loop in init.sqf or function with postInit=1 or something like that
@little raptor what does postInit=1 do?
I mean in cfgFunctions
it runs the function at post init, as the name says
but if you have an endless loop in there the loading screen will never finish
[[],{
if (missionNamespace getVariable "Sheild") then {
with uiNamespace do {
SHEILDText = (uiNamespace getVariable "FightDisplay") ctrlCreate ["RscStructuredText", 3453];
SHEILDText ctrlSetPosition [0.436131 * safezoneW + safezoneX, 0.0842 * safezoneH + safezoneY, 0.133918 * safezoneW, 0.033 * safezoneH];
SHEILDText ctrlSetStructuredText parseText (format ["<t size='1' font='PuristaBold' valign='middle' align='center' shadow='2' color='#E8302E'>sheild %1:%2</t>", 3,"00"]);
SHEILDText ctrlCommit 0;
};
};
}] remoteExec ["spawn",0,_Veh];
I'm having problems with this, basically prior to this there is another remoteExec JIP that creates a screen using cutRsc, when its executed by itself it creates the screen normally, but once I remoteExec JIP the example provided here (which is me trying to add another element to the screen after a certain event occurs) both this JIP and the other JIP that creates the screen doesn't work, why is that?
is shield even defined?
missionNamespace getVariable "Sheild"
just useshield. what's the point of writing it like that?
yes its defined
missionNamespace setVariable ["Sheild", true ,true];
_Veh = missionNamespace getVariable "Sub";
this is in another JIP:
with uinamespace do {
"someLayer" cutRsc ["RscTitleDisplayEmpty", "PLAIN"];
FightDisplay = uiNamespace getVariable "RscTitleDisplayEmpty";
};
I notice capital letters better when going through the code
There isn't a numerical hard limit but be aware of file size. Having a lot of long script files, custom textures, custom sound files etc. in a mission file can make it take a long time for players to download the mission file from the server. My usual guideline for a multiplayer mission is to keep the total file size below 4mb to avoid unreasonable download times.
Yes but if you want to get a mission namespace variable, and you don't need the default fallback functionality from the alt syntax, you don't need getVariable, you can just reference the global variable name
yes true
do you guys know any solutions to this?
Use a function?
Also not sure why you're JIPing on a variable that doesn't seem to be related to the functionality.
is there a script i can run that gives me all of the textures of the current uniform im wearing
open debug console and put player getObjectTextures in the Watch tab, it will show you texture paths and selections of the uniform you wear
basically there is supposed to be a gui element
that only appears after an event occurs
so I want it so that when that even't occurs , if players join in progress they can also see the gui element
function? what is the difference ?
or what is the advantage to be more precise
its a count down
you don't send the code through the network, just the function's name and arguments
and the function is protected, so i cant send code over the network to hack your function
and its "compiled" or sth iirc, not just interpreted at runtime.
whatever "compiled" means in a dynamic environment
well I'm not able to access the mission files sadly
I thought it had benefit to stop the weird thing going on with JIP
if I could make it a function I would already have, so much easier to deal with
instead I have to create a large tablet of code that does everything
wat? I mean no need for getVariable
Hello there, just to make sure that I understand it correctly:
https://community.bistudio.com/wiki/setMarkerColor needs to be executed only by the server and the change get's broadcasted to every client right? So no need to change it locally for everyone.
If I change it on a client, it still does get broadcasted to everyone too, is that correct?
In principle, yes
I don't really like the "in principle", but the "yes" makes me calmer now.
Running something like this on every connected client is probably not the correct way of doing it 
Warning, shitty code:
||```sqf
"Zone4Capturing" addpublicVariableEventHandler {
private _tmp = missionnamespace getVariable "Zone4Capturing";
private _tmp2 = missionnamespace getVariable "Zone4Captured";
if (!_tmp2) then {
if (_tmp) then {
hint "Zone 4 is being captured";
"zone4" setMarkerColor "ColorWhite";
"zone4" setMarkerBrush "Cross";
} else {
hint "Zone 4 capturing interrupted";
"zone4" setMarkerColor "ColorRed";
"zone4" setMarkerBrush "Solid";
};
};
};
But I'll move all of this to the function checking if capture is happening and add fancy flashing, as it get's executed every second anyway.
Yeah just change that stuff on the server and broadcast the hints.
Thanks for the help!
Will experiment and hopefully get it working correctly now.
Note that missionnamespace getVariable "Zone4Capturing" is by default equivalent to Zone4Capturing
What do I put in the debug console to take a picture of a specific class name?
Like, I put in a class name and it takes a picture of that model
Nvm, I'm dumb
Was looking at the wrong spot
Is there a way to take an editor preview of weapons?
Through the editorPreview debug command?
That does make sense, never occurred to me, thanks for the tip
Misunderstanding on my part, but have you got any idea why the problem I explained happens?
Its becoming quite chronic to say the least
Do you know if your JIPs are not firing at all or just not working?
I think I will better send the code, my explanation is kinda foggy
that's a debugging question not a code question.
Like you can narrow down what you're looking at a lot if you can answer it.
Yeah I already have it narrowed down
Its a 5 line issue
But you explain it clearly I need the entire code shown
1 minute
Its basically something conflicting with the other when it shouldn't
this is placed in init's field of an object so that it can be used in zeus
from line 27 to 44 is the main GUI creation (works with JIP)
after the submarine take a certain amount of hits
line 206 to 215 should create a new element on the already existing display earlier
I'm trying to make JIP
but problem is
when its JIP is turned on
it stops this one from working? this won't JIP run when the second thing activates
(NOTE: First JIP works if second JIP is not triggered, it ONLY stops working once the second one triggers)
that's the problem I'm not understanding, why is it stopping the first JIP from working?
You know init statements run globally, right?
That's not the case in zeus as far as I'm aware
In Zeus objects with init, run the init locally
Locally on the Zeus who placed them
So that's not the issue
Ok I think this code is gonna drive me madder than the necronomicon
but it looks like you have three remoteExecs with the same JIP ID?
There are two remoteExec ["spawn",0,_Sub]; in here and then the whole pile of shit is actually remoteExec'd with the same object as ID.
JIP IDs have to be unique otherwise they replace each other.
If you JIP with an object as ID then it has to be the only JIP using that object as ID.
Or a text string you construct or whatever
Can't use the same object twice for two remoteExec?
correct, unless you want the last one to replace the first in the JIP queue.
Damn
Thing is
I wanted it to stop executing once the object doesn't exist
But that can be solved easily
Using isNull
How can I fix that sir?
The JID
I agree, its the worst indentation I have made to date lol
Looking at your code so far I'm sure you'll figure out some abominable solution
Why? Isn't there any suggestion you can give me of what to put in JIP parameter?
Note that you can clear JIPs manually with a poorly-documented remoteExec syntax.
Send please
remoteExec ["", "MY_JIP_ID"]; // the "MY_JIP_ID" order is removed from the JIP queue
Damn
so you can create three JIPs with arbitrary IDs, and then remove them all in an EntityKilled hander or whatever.
Like literally "my stupid ID 1" "my stupid ID 2" etc
strings
Lol
It accepts many things.
My bad its 6am here
Yeah I k ow that, but i thought string was limited only to netids
You can put true in there and it'll even make you a unique ID, but given the structure here that's probably not too helpful.
Yeah lets just make it a string
I will try your solution and hopefully get it working
Thanks
anyone got a garage script thats global and other players can see and you can use skins
I believe a fired event handler will always be executed on the next frame
which is after the weapon fires and the projectile travels a little bit
What does it mean when an AI squad name has the word (Remote) in its name? In the editor, I get the name Alpha 1-1 but the same squad on a dedicated server is called Alpha 1-1 (Remote)
can someone confirm that the 82mm Flare is not working? it doesnt spawn for me at all.
createVehicle ["Flare_82mm_AMOS_White",getPosWorld player];
it is broken and has been since 2015 I think. position player will spawn the projectile model under your unit and it dissapears quickly.
No. It fires exactly when the weapon has fired (projectile created)
No. You have to override the fire key
it does spawn
wtf. with that code?
aaaah okay. yeah it returned something but i couldnt see anything
@spark turret
yeah, it literllay doesnt work for me with that exact code.
gonna check which branch im on
triggerAmmo doesn't work on perf/stable with flare rounds
well it only works on dev branch
it does:
#perf_prof_branch message
ofc everyone must have the perf branch for it to work
yeah its fine, ill just skip that flare. the 40mm ones work as intended/expected.
thanks for the insight tho ๐
playSound3D ["\a3\Sounds_F_tacops\SFX\Missions\heli_alarm_bluefor_quieter.wss", player];
seems like I can't play this sound, what is the issue?
How can I keep people from firing by overriding the fire key?
Not sure which channel to put this in as it crosses multiple parts,
Does anybody know if you can change the skybox of a mission per player during a live mission?
so one person can see one skybox while another sees a different one
Intended purpose: Having two "places" you can teleport between having different skyboxes depending one which one you are at.
https://pmc.editing.wiki/doku.php?id=arma3:changing-skybox
I've found this sofar but not sure if it's the only way (or even if it can be done mid mission) as this seems to be more based on setting up your own map configs
there is no issue
no.
tho you can make an object and use that as "skybox", but it will be weird a bit
unfortunate but thanks
can time be client independent?
ahh okay
appreciate the help anyway. I'll just have to use postprocessing to play with the views a bit
actually while you are here any suggestions for postprocessing to make it feel different, but not overpowering?
different how?
Initially I was thinking just a colour shift. and that works fine. Just I'm bad at choosing colours
it is not playing, is there a reason why?
it plays for me

but basically I want it to feel like a different world. But just by altering the colours/feel
color correction & ChromAberration for the win
haven't looked into chromAberration yet thanks
its basically separation of the spectra colors of white light
instead of white you will see red, green and blue depending on how high you tune it
Since Arma 2.10 the leading slash in file path will be ignored.
remove the leading slash
damn, thanks lol
also try a slight touch of wet distortion, but it will look really weird
Yeah I'm trying to remain with colours identifiable, but the world as a whole look shifted weird. (Like a different set of elements in the air)
yeah
as they will be in it an extended period of time. So don't want to piss them off
you might as well
add ash or snow or something similar
basically particles flying
can't say for sure
I just know rain kills our frames typically
I'll certainly give it a try thanks a lot
Actually last thing can weather be per client?
or I assume the server syncs it again every now and then
no
Yeah just checked on the forums they are all server executed ๐ฆ
if you execute them on client
it will eventually sync with the server
so yeah nope
can we detect the sync? and counteract it?
or would that just be a seizure inducing mess
I took a look. Seems no there is no simple way to detect weather changes without an infinite loop and those are never fun.
your only option is to play with ppEffects and particles
yeah shame, but can probably make something cool out of it
if you want to make things darker or brighter you can also mess with setAperture
Ahh thankyou
Thanks ๐
damn, spent 15 minutes trying to figure out why the damn guided rocket just yeets above the target.
setMissileTargetPos takes ATL, not ASL -.-
no, it takes AGL
always happens to me when I scoop up the biki not reading the most important stuff in it lol
Its agl in one format and asl in the other :^) according to biki
Yep (unfortunately)
How come AI groups in a dedicated server have the word REMOTE appended to their names? Local testing does not cause this.
For example, I get Alpha 1-1 when printing an AI group in a listen server but if I run the same command on a dedicated server, it is Alpha 1-1 REMOTE
Because the group isn't local to the dedicated server.
If it is local, then it won't have REMOTE on it.
Odd that would happen, where would it be local to if there are no headless clients?
the dedicated server?
If it is local to the server then it wouldn't have the word REMOTE appended
Hello there, I am trying to edit a gunner screen that is present inside a vehicle. It has thermal enabled by default and I want to disable it.
I found in the config that the renderTarget name is "rendertarget4", so I am trying to execute in the vehicle init box.
"rendertarget4" setPiPEffect [0];
But it does not take effect, I have yet to try the BIS_fnc_PIP, but was hoping I could figure out why `setPiPEffect [0];" does not work, any ideas?
@cold mica Well, you didn't say where you were testing from, but if a group is local to the server then it'll say REMOTE on the client, and if a group is local to the client then it'll say REMOTE on the server.
won't work, but you can disable TI imaging with a scripting command ๐
There's actually nothing special about headless clients. You can spawn hundreds of AIs on normal clients if you want to.
I would do that, sadly that also doesn't work
Trust me, that was the first thing I tried. Actually this is run on all vehicles in the mission...
Disables the one you have while "in turret", but the PiP screen is still TI
official vehicle?
ACR_A3 mod
(Czech Army mod, "editing" the Dingo 2)
I don't need to turn it into normal camera, I can just "criple" it, make it black and show nothing, any ideas?
Can you try on a vanilla vehicle, see if it happens?
the disableTIEquipment works on most vehicles, even modded ones. But there are few ones on which it just simply does not work. RHS (I think) Humvee with TOW is one of these for example.
What do you want me to try on vanilla vehicle?
if the PiP thing lost TI as well
if not, it might be a game issue
if it does, it's a mod issue (you can report on their feedback tracker)
Oh, yeah, I know that works on vanilla and most modded ones.
But just on few it does not sadly. 
I am currently trying to "replace" the PiP in the car. I've got two objects in the world, let's call them camm and targ
Can I replace the screen in the vehicle with something like
["rendertarget4",[getpos camm, targ], this, true] call BIS_fnc_PIP;
given that rendertarget4 is the correct one, at least according to my config finds.
This somehow results in the player having a small screen in the right GPS position with the image and I have no idea why. Would be happy if you got any insight that you can share.
Even though this is executed in the vehicle init box 
I'll report it, hopefully something can be done on their end, but I kinda need this for Thursday, so I doubt there will be a fix soon enough
.
I don't know this function very much, the wiki must know more than I do about it
Thanks for the help, sadly the wiki for this function is as brief as it can be
try opening the function in the func viewer, it may reveal some things?
Will try, thanks for the idea
that's how this function works
it opens a tablet at the right bottom of the screen
I see, sad it's not documented. But I guess no ideas on how I could fix my problem, right? 
It's a Dingo from Czech Army mode, but it should work the same.
No need to replace it per say, "cripling" it is enough
cripple?
you don't want it to work?
just let it blank, black.
If I can get it working, that would be awesome, but crippling it also works, as you can right click and go into the "fullscreen" mode
idk I would say attach an object to the back of the vehicle
in the spot of the camera
to block it
lol
this is the screen. Getting it to be normal/color mode is awesome, letting it blank also works https://i.imgur.com/Jc7LdR0.png
damn
though about it, but
#1 Ugly... PvP mission and 
#2 It rotates. And I still need the "fullscreen" version to work
well
thing is
I don't think you can replace cockpit textures
I hope I'm wrong but I tried doing so before
Veterans rise up
I still got time until Thursday. Worst case scenario, I hope I could create a mod that changes it. But I've never experimented with this. Also forcing 120 ppl to download it is... Bad
I'll wait for a normal time and hopefully someone will be able to help me
I've been having some trouble getting BIS_fnc_fireSupportVirtual to work. Specifically, it didn't work on DS in the same circumstances as it did work in local MP [*note: executed on server only], and in some cases it seems to create an endless loop of incoming shell whistle sounds even after the barrage has ended. Curious if anyone has any insights (or at least the same experience).
In unscheduled environment, is the command setUnitLoadout "waiting" for all the stuff to be set on player before going to next instructions?
It does that even in scheduled environment
Oops, meant to put that in config editing
deleted for you
you can, but don't use that function
just create a camera and use rendertarget4 directly as the cameraEffect's r2t
e.g. this will give you a 3rd person camera:
_cam = "camera" camCreate [0,0,0];
_r2t = "rendertarget4";
_cam cameraEffect ["terminate", "back", _r2t];
_cam cameraEffect ["Internal", "Back", _r2t];
boundingBoxReal vehicle player params ["_c1", "_c2"];
_cam attachTo [vehicle player, [0,_c1#1,_c2#2]];
_cam camSetTarget vehicle player;
_cam camCommit 0;
if you want to make it black, just put a black object in front of the camera:
_cam = "camera" camCreate [0,0,1e4];
_cam setPosWorld [0,0,1e4];
_r2t = "rendertarget4";
_cam cameraEffect ["terminate", "back", _r2t];
_cam cameraEffect ["Internal", "Back", _r2t];
_obj = createSimpleObject ["UserTexture10m_F", [0,0,0]];
_obj setPosWorld [0,1,1e4];
_obj setObjectTexture [0, "#(argb,8,8,3)color(0,0,0,1)"]
privaaate
and why terminate then internal?
because there's a bug that causes duplicate r2ts to fail
you have to "delete" the old one (using "terminate")
not sure if the bug triggers in that case, but better safe than sorry
hmm actually if it fails you will get a black texture. maybe that way is easier! ๐
How to add a blacklist to a zone in ALIVE via a script?
@little raptor thank you! I'll try it soon.
Thankies! Never played too much with PiP
Henlo i got an issue on an server and wanted to know if i belive right that it is executed on a global scope via chained execVMs
[] execVM "file" chain
init.sqf > init_client.sqf
shortcut_init.sqf
// Weapon to the back
(findDisplay 46) displayAddEventHandler ["KeyDown", {
if (_this select 1 == (actionKeys 'User10') select 0) then { [] execVM "addons\KEY\user1.sqf" };
}];
Final user1.sqf
// Weapon to the back
if (player getVariable ["GRLIB_action_inuse", false]) exitWith {};
if (currentWeapon player != "") then {
player setVariable ["GRLIB_action_inuse", true];
player action ['SWITCHWEAPON',player,player,-1];
uIsleep 3;
player setVariable ["GRLIB_action_inuse", false];
};
How to make "File patching allowed: Yes"?
I am not sure if init.sqf is on the global scope.
wat?
https://community.bistudio.com/wiki/Arma_3:_Startup_Parameters
Via Startup Params or Server Config files
thx
You should only run something like that in a Test enviroment.
ik
Hi Guys I have a question. I am using flak script from flyinpenguin for tigris and it works code here:
https://pastebin.com/qLWNn9QC
but I tried to convert this so tigris dosent shoot but the German FlackPz from GM DLC code here:
https://pastebin.com/5QwVMm1W
Vehicle fires but it dosent create any explostion around air vehicle any help would be nice.
Nvm i got it to work ty guys.
I'm looking for a way to script in a splash screen that displays the mission name and author when triggered by a trigger in the editor - Anyone know how to do this who could show me/walk me through how to script it?
Bare in mind that I have never scripted before, have next to no knowledge of it, and require extremely simple and precise instructions.
Thank you in advance!
you mean it's supposed to work with any mission? or a mission you're making?
Just for the one mission I'm making
I saw the splash screen options in the trigger UI selection menu but they don't seem to work, or I'm doing them incorrectly.
well you can make one of them yourself
since all you want is a splash screen it's very easy
open GUI editor
2500 hours of mission making and I STILL don't know how to do it
place all GUI elements where you want them to be
play a mission in 3den
there's a button called GUI or something when you pause the game
or EDITOR
not sure what it was called
Okay, one sec while I hop in
Oh my damn I found it
What should I do now? I have the grid up on screen
right click and select what you want to put
Okay, I've put down a text thing, how do I add text to it?
right click on it
Right click, got it
to resize it hold Alt
Okay
also you might want to use the SafeZone position format
so people with different resolutions and UI sizes see stuff the way you see them
well at least for text
pictures might get stretched
well there are several things you should do:
- press
Ctrl+Shift+Sand type some random name. it'll copy some code to clipboard - go to the mission folder, make a file with
.hppformat, e.g.myTitle.hpp - paste the stuff into it
- put this code above it:
class RscTitles
{
class myTitle
{
idd = -1;
duration = 5;
fadeIn = 0;
fadeOut = 0;
onLoad = "";
onUnLoad = "";
class Controls {
and at the bottom just put:
};
};
};
- look for
class XXX : YYYstuff. then putimport YYY;at the top of the file for each uniqueYYYs.
e.g. for this:
class Ctrl1 : RscPicture
put:
import RscPicture;
at the top of the file. (only one RscPicture should be imported)
- in your mission's
description.ext, type:
#import "myTitle.hpp"
once you're done, you can open the "splash screen" using this code:
("myMissionSplash" call BIS_fnc_rscLayer) cutRsc ["myTitle", "PLAIN"];
it'll disappear after 5 seconds
there are other (and easier) ways to do this but they need scripting and you said you've never scripted before...
Okay, thanks.
Another question I have is how to get those UI options in the trigger menus to actually work
idk. I've never used them. let me check
Also my mission doesn't have a description.ext
make one
Okay I have
Where do I put this code in a trigger?
Putting it in the On Activation box causes an error
Got it
Haha fun
After all that I get "Preprocessor failed with error - Invalid file name(empty filename)
While trying to save
well like said put some random name
Ah gotcha
I didn't say leave it empty
I left it at myMissionSplash instead of replacing it with the name of the title I made
they don't seem to work.
you can show them manually tho. e.g.:
("myMissionSplash" call BIS_fnc_rscLayer) cutRsc ["SplashArma3", "PLAIN"];
Any way to get them to work? I know they work in the campaign because I've seen them, but honestly yeah that would be great
And then I see the next message
So how do I make them work on their own without the myMissionSplash part? That's fundementally what I'm trying to get to work
use the code I showed you above
myMissionSplash is just a random layer name
Gotcha so can I just leave that as is and it'll still display?
it works without any of the stuff I told you here
you can just try it rn
yes
That'd be awesome. I notice there's multiple, one for Apex, one for regular, one thats the bohemia logo, copyright and tagline
I'm wanting to show the arma 3 one, and then the tagline afterwards
Preferably the regular arma 3 one (Which I assume is the code you already sent)
well if you want something really simple you don't need to make your own title
you can just try this for example:
[] spawn {
("myMissionSplash" call BIS_fnc_rscLayer) cutRsc ["SplashArma3", "PLAIN", 1];
sleep 2;
("myMissionSplash" call BIS_fnc_rscLayer) cutFadeOut 1;
sleep 2;
("myMissionSplash" call BIS_fnc_rscLayer) cutRsc ["SplashTagline", "PLAIN"];
sleep 2;
("myMissionSplash" call BIS_fnc_rscLayer) cutFadeOut 1;
sleep 2;
("myMissionSplash" call BIS_fnc_rscLayer) cutText ["Mission by LucyTheFluffyBunny", "PLAIN", 1];
sleep 3;
("myMissionSplash" call BIS_fnc_rscLayer) cutFadeOut 1;
};
That'd be awesome, but I'm wanting to plop it down on a trigger for sure
well you can
Tweet
just throw it in a trigger and see for yourself
This code being present in my script is making addons no longer be recognized in my game. For example under controls > configure addons becomes greyed out. Keybinds I also have set up to the mod stop working. I have no idea whats wrong with it, any help is appreciated :)
JCF_fn_FlashlightIntensityIncrease =
{
if (jLightState == true) then
{
if (jLightIntensity < 50) then
{
jLight setLightIntensity (jLightIntensity = jLightIntensity + 10)
systemChat (format ["%1", jLightIntensity]);
};
};
};
jLight setLightIntensity (jLightIntensity = jLightIntensity + 10)
systemChat (format ["%1", jLightIntensity]);
this is completely wrong
jLightState == true
just writejLightState
Whats completely wrong with it? Im trying to make the number increase by 10 every time
= doesn't return anything. and you can't wrap it in ()
you're also missing ;
ah I think the ; is probably whats breaking it
Whats the correct way of going about it?
jLightIntensity = jLightIntensity + 10;
jLight setLightIntensity jLightIntensity;
systemChat (format ["%1", jLightIntensity]);
if (jLightIntensity < 50) then
{
jLight setLightIntensity jLightIntensity;
jLightIntensity = jLightIntensity + 10;
systemChat (format ["%1", jLightIntensity]);
};
``` you can't do it all in one line
Oh ok, unfortuante thats the way its set up. Thanks for the help!
Damn I was worried it might not work, are Lights created with the "Reflectors" class inaccessible through sqf scripting? I made a light, simple p3d containing 2 points to use for position and direction, gave it a config and all that fun stuff. Now im trying to modify some of its variables after the fact with sqf, in this case its intensity... Is this just not possible?
After some more testing, im thinking it is indeed impossible through the method im attempting
there is #lightpoint and #reflector
#lightpoint can be created through script but #reflector cant right? It looks like I can change #lightpoint freely using commands like setLightIntensity and setLightColor, but I cant do the same with #reflectors, is that correct?
Ughh, that being said it looks like the wiki contains some things for reflectors, like setLightConePars. It seems that parameters are either "lightReflector" or just "light"
I cant find any other uses for "lightReflector" other than that page though
Reflectors can be created through script
Use #lightreflector in the same way you would use #lightpoint
This is a relatively new addition (2.0something) so it's not terribly well-documented yet.
Known working example I had on hand:
obj_light1 = "#lightreflector" createVehicleLocal getPosATL o_wall_1;
obj_light1 setLightDayLight true;
obj_light1 setLightConePars [360,360,360];
obj_light1 setLightColor [0.3,0,0];
obj_light1 setLightIntensity 2000;
obj_light1 setLightAmbient [0,0,0];
obj_light1 setDir 31;
obj_light1 setLightAttenuation [2,0,0,5,2,3.5];```
Huh, so new Discord's sqf highlighter doesn't know about setLightConePars
but BIKI's does ๐
@hallow mortar Thankyou for that, ill look into it as a cleaner alternative to what I've already done!
Does it decide which direction its pointing with setDir or does it determine that piece another way?
I used setDir because it was convenient for me but you can also use the vector direction commands
In terms of positioning, direction etc it's just a tiny invisible object. The only magic part is the light properties
apparently configfile is an undefined variable even though other examples on the wiki show that it is fine do i just define it with private = or am i doing something else wrong?
_weaponPool = "getText (_X >> 'author') isEqualTo 'Community Upgrade Project'" configClasses (conifigFile >> "cfgweapons");
wiki example
_configs = "true" configClasses (configFile >> "CfgVehicles");
conifigFile
you have a typo.
hi stupid, I'm dad!
does anyone have a garage script that lets you spawn vehicles that are global with skins
https://sqfbin.com/legiquduwigadutimazo
I'm placing this in an init of an object that I will spawn in zeus, when I first use the action, the texture of the laptop changes to that of the camera as I wanted, and the action text becomes "turn off screen" too, but when I press the action again to turn off the screen, it does beep but neither the texture nor the action text changes, why is that?
init object = run on server + every player
_also please use https://sqfbin.com/_
I'm placing this in an init of an object that I will spawn in zeus
So it doesn't behave like that, it will instead execute locally on the zeus that placed it
Done it
also, you are using LaptopOn which is a global variable - you will only have one PC I hope (you should use setVariable on it)
yes its one only
also, actionIDs are local, so it's tricky
how I would do:
- add two actions on remoteExec to everyone and joining
- set their condition depending on the getVariable on the laptop
- make the actions use setVariable global
damn, why can't we be more elegant
