#arma3_scripting
1 messages Β· Page 129 of 1
You need to put the Reference in the config in a different spot ye
Rather than putting it at the base level you put it in class RscTitles
thanks. Is there some info in getting the controls inside the rsc?
FindDisplay doesnt seem to work for titles according to wiki and ive been trying to get the info from controls in the resource
I can say that if more and more hashmaps are passed into functions or hashmap objects become a more used thing, createhashmap will become just as widely used as objnull for params validation and such. Is it performance hindering? Is it more work than creating a 0 when validating numbers, etc.. ? I guess that would be the most widely used version of empty createhashmap for most people, I would think. So far in my projects, I have not seen it cause issue. Interesting question though.
@kindred zephyr The Antistasi status bar does it by setting a UI namespace var for the display with an onLoad EH.
I don't know if there are more reasonable ways.
A similar method is described by Kronzky in the findDisplay wiki.
Hey all, I'm currently working on a cinematic and trying to spawn an explosion. I see this code being recommended but I don't know how to use it.
To spawn
bomb = "Bo_GBU12_LGB" createVehicle (getMarkerPos "bombmrk");
and
To Detonate
bomb setDamage1
From what i understand bombmrk is the props/variable name where the bomb should spawn, and the detonate function is set to the trigger
but I don't know where the bomb variable goes or what it belongs to
Does anyone have a suggestion on spawning a simple explosion?
In this example, "bombmrk" is not a variable name, it's the name of a marker, hence it being a "string" and using getMarkerPos. However, if you don't want to use a marker, you could replace it with getPosATL and an object reference, or with a specific ATL position.
The bomb variable is being created to contain a reference to the bomb object itself. You might want to use a more unique name to avoid conflicts, but otherwise you don't need to do much with it.
In fact, you might not need to use it, or triggerAmmo, at all. Bombs have contact fuzes and will detonate instantly when they touch the ground or an object.
Is that a vanilla bomb? If theyre using a script they found online it may be using a modded bomb.
hey, I have a script that shows enemy units on the map, how can I overwrite it to show friendly ones? [] spawn {
while {true} do {
{ if(!isPlayer _x && side _x != playerSide) then { player reveal [_x,4] } }forEach allUnits;
sleep 60;
}
};
It has the same performance as objNull, both just create a empty value.
It is more work than creating a 0 yes. because number constants are created at compiletime, not runtime
Change the != to == π
ths so much mate , i will try now
it works perfectly, thank you very much and best regards
0 spawn {
while {true} do {
{
player reveal [_x,4];
} forEach (units playerSide) select {!isPlayer _x};
sleep 60;
};
};
Or just do it to units that is player side and are not player and you can select only alive ones if you want
OK I understand. Thank you too π
It's a vanilla bomb.
Yeah, I was trying to do that but the picture I need to update doesnt really let me to.
I assumed it was due my relative path to the addon but im loading other images in other non-titles controls just fine without any issue.
Is there any limitation to controls set in titles?
Asking since setting the picture control with a default image works, but just not changing it when my script launches. Im almost sure it's an issue with getting the control itself and nothing more.
:D
i need to write some documentation and stuff before i make the github public
obviously ive only written those three wrappers so far
:D
need to figure out how to make a bunch of them into macros or something
float random(float max_) {
game_value max = functions.new_scalar(max_);
game_value rand_val = functions.invoke_raw_unary(client::__sqf::unary__random__scalar_nan__ret__scalar_nan, &max);
functions.free_value(&max);
float rand = ((game_data_number *)rand_val.data)->number;
functions.free_value(&rand_val);
return rand;
}
object player() {
game_value player_obj = functions.invoke_raw_nular(client::__sqf::nular__player__ret__object);
return std::make_shared<object_ptr>(player_obj);
}
void side_chat(object obj_, const std::string &message_) {
game_value message = functions.new_string(message_.c_str());
functions.invoke_raw_binary(client::__sqf::binary__sidechat__object_array__string__ret__nothing, &obj_->rv_obj, &message);
functions.free_value(&message);
}
those are how simple the wrappers are though
but yea, memory is being freed perfectly, multiple threads (ran 300 threads at once earlier in testing with no races/deadlocks)
good shit
Hey guys, just wanted to know how I would set a variable to an object in game, this is a preplaced object.
you mean like editorPlacedObjNameHere setVariable ["someVar", 777];
so I would do something like
land_ChaosStar1 SetVariable ["_chaos", chaos];
would this mean the item named land_chaosStar1 would have the variable name of chaos? or would it be _chaos
_ is only if you are declaring local variable in script
Would be valid there too. unusual but would be fine to use
so remove that
I see, so am I able to just have chaos and chaos and that wont cause problems? I assume
yea you can code like that if you wish but no need to have it
yes
thank you, but in a script I would refer to it as _chaos, correct?
nope you get the variable with the getVariable command
private _theChaosVar = land_ChaosStar1 getVariable "chaos";
ahhhhh yes this is all coming together, thank you heaps im just so close to getting the variable stuff, thank you for letting me know
yw
Niiice.
Sorry mate, just a one last question
im putting this in a game logic, right?
hmm okay, im just getting an undefined variable in expression error is all, I put it in a game logic too and did the code provided - I just changed _theChaosVar to just _chaos
hard to say without the full error message
This isn't right and doesn't address the original problem
There's been a misunderstanding
How do you mean
GC8 is trying to show you how to use setVariable to store a variable in the object's namespace. You want to set the object's global variable name. These are different things
If you have an Editor-placed object, you can open its Attributes and change its variable name in the appropriate field at the top
You then refer to that name in scripts
Sorry if I didn't explain what I was after properly, im trying to understand how to do this specific thing and i've only got it barely working just this part seems to get me messed up
Create a uinamespace variable of the display to access later in the init of the display
From my gatherings, it dosent look like you need to load it with arma 3 extstentions, can i run it from another dll?
When I tried to do it this way I was getting a type object, expected array error is all
I thought if I gave it a variable name it would fix this issue
When you set the variable name in the Editor Attributes, you are giving it a variable name, and that variable contains an Object reference
If you did that and got a wrong type error, then the problem was probably wrong syntax for the command you tried to use it with
I see, ill try doing more research then and if I get stuck ill come back, sorry for the fuckabout - thank you @proven charm for trying to help
hope you get it sorted
alright, Thanks.
Do you perchance know if titles can use then onLoad Events when defining them or should they be added as independent eventHandlers?
titles can have onLoad/onUnload in the config
^
you have to load dlls through my dll
Note that unscheduled onLoad is always a bit weird because it fires before the controls are created.
Hence people often spawn it for the probably-one-frame delay.
yeah, i was trying to give it half a second of headstart in order to spawn the script required to run
Pretty damn cool!
So I have a onPlayerRespawn sqf that does the moveOut command when a player respawns. In testing it works in sp/mp but when testing it in the dedicated server it does not. Is there something extra that I'm missing to make it work on the dedicated server?
Is there a way to enable the underwater sound filter on things that aren't actually underwater?
no
Is there a way to enable a custom sound filter on a player by script?
no
....Is there any way to make gunshots sound muffled with a script
without actually being underwater
You can pull the sound files, modify them, then make a new (or mod original) rifle/ammo/mag that uses those sounds in mod
No, sorry... Ugh, this feels impossible.
Nah just a lot of work lol
No I mean it's only supposed to activate while they're "outside" aka in space.
I'll just skip it.
Different question... You can override parts of CfgWorlds in the description.ext, but is there any listing of what parts you can do this to and what parts you can't?
The ones listed on the wiki page for description.ext are what you can change. You can't really modify much without making your own version of the map in world builder and configs.
The modifications in the description file are mainly just for presentation
As part of an addon, could one essentially duplicate a world and only change a few things about it?
For instance, a copy of the same map with all of the town names changed.
Yes
You can even patch maps already there to change their originals
You can also change all the locations/names by script too btw
We did that for fapovo because one of the locations had a slur in it - wait what
you can??
Standby for pastebin
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
ignore the script_component thing, I just use CBA framework for most of my stuff, but it looks like I don't use it in this function
You mean moveOut on the old unit/corpse? I'd expect it to work. moveOut requires the unit to be local but I think player corpses stay player-local until moved.
I have it current were a player spawns inside a 1 man Vic and have the moveOut to kick them out the vehicle on spawn so it frees up the space for other to spawn.
All testing works in sp/mp but when spawning using the mission on the dedicated server it does not kick me out
Are you kicking out the old unit/corpse or not?
Because that sounds like you're trying to kick out a completely different player?
im not sure. the only thing in my respawnsqf is moveout player;
If you literally use player then it's probably moving out the new player unit
Oh, that's what you want to do....I think?
Is that ot what i want though? When aplayer spawns intot he vic to kick them out and the repeat if another player sapwns into it?
Yea exactly whena player spawns i want it to kickthem out and free up the vic to be able to spawn in agian
Then possibly it's doing the opposite of what I said
To be certain, find and use the specific reference to the new unit, which is available in onPlayerRespawn.sqf's params https://community.bistudio.com/wiki/Event_Scripts#onPlayerRespawn.sqf
hmm. My recollection is that player is the new unit at the point of onPlayerRespawn, and it's also local. So I'm not sure why it'd break.
Maybe if the player being moved into the vehicle happens afterwards.
Sounds like diag_log debugging time anyway.
That's been my experience too, but I think it's worth attempting a fix based on that because there aren't a lot of other options
thanks for the info will dig into it more
how do you even get the map data into buldozer?
Sorted my issue seems it was a network delay on dedicated server what fixed it was adding a small delay before executign sqf
network delay of what though...
its probably a execute next frame kinda thing
yeah thanks to both. All is working as expected now.
Does anyone know what this line actually means from the getTextureInfo page? "Multiply the pixel values by pixelW and pixelH to get screen coordinates."
the wording seems to imply a coordinate on the screen, but the value they seem to be suggesting to multiply by pixelW is the resolution of the texture? that doesnt sound right...
For what purpose?
wiki seems to be making an assumption there.
Texels are texels, just ignore it.
I thought I might be able to use it to get the on screen location of the texture, but that seemed a little outlandish given the purpose of the command, thought id ask anyway though
yeah it's not gonna do anything like that.
You don't happen to know of any way to do something like that? Or get the color of a 3d point?
ie, I shoot a ray at a wall, and get the color of that point, not the avg color of the whole texture
Hm
Thats annoying, I'll keep looking for a method to achieve something similar though
They meant UI coordinates, to display the texture pixel perfectly on UI without scaling.
Ah, thankyou
hmm. Is there even an SQF command to sample the colour of an image at a point?
Nope
I wonder if you could split the image into parts using ui2texture and then get the colors of those parts perhaps
I don't think ui2texture calculates average color
Thats a good point
wait, yes I think you can calculate the avg color of a texture made with ui2texture, I think I've done it before
ya.. that gets the average texture, and I believe it works for textures created with ui2tex
I feel like if you know what parts to split it into then that defeats the point of reading the colour, so you're probably trying to do something weirder than I imagined.
huh, although I suppose you could use ui2texture to do a single-pixel sample. What a horrible idea.
In short terms I wanted to find a way to sort of convert a 3d position into a texture coordinate. A unfortunate way I thought of was to use a color grid on the uv and then get the colors at 3d points to find the corresponding uv location
If you know where the object is in 3d space then you can just do the projection yourself.
Oh? How so?
Can't. Also there might be multiple
Can't
If you know the object it's orientation and UV mapping. You could calculate which pixel of a texture is there. But there's no way to fetch pixel of texture
You can't. It returns background color
Sounds similar to what I was doing with in-world 3D UI
You have a plane in the world. With a texture stretched from corner to corner.
You can raytrace to find what position you're aiming at.
You know where the top left corner is and which orientation the plane is.
Using that you can calculate the X/Y of the ray trace hit, in percent of the plane.
The U/V coordinates.
Like 50%/50% is right in middle.
Then if you know texture size, you can multiply by the percentage to get pixel coordinates.
Tadaa mouse cursor on a texture controlled by where you're aiming
Helloh I need help again
I just wanted to do a neat little detail of a guy standing on the road looping an animation pointing to the road the players have to take ("Acts_JetsMarshallingRight_loop")
I hath failed π
I joinked this from the internet which made sense to me
this switchMove "Acts_JetsMarshallingRight_loop";
this addEventHandler [ "AnimDone", {
params[ "_unit", "_anim" ];
if ( _anim == "Acts_JetsMarshallingRight_loop" ) then {
this playMove "Acts_JetsMarshallingRight_loop";
};
}];
this disableAI "ANIM";
However it dont work, it plays once and then never again for the entirety of the rest of the mission π
Interestingly when I try executing it on the unit as zeus it does work, but then it throws an error about switchMove getting an array(??) but thats propably some behind the scenes magic problems I dont understand
Any chance you smart peeps can fix it for me π
π ?
this , you have in eh this, should be _unit
_this there in the EH is an array, and params defines what you need - _unit
Yee no worky with _unit either though
Hm then, make sure your EH is actually working
this switchMove "Acts_JetsMarshallingRight_loop";
this addEventHandler [ "AnimDone", {
params[ "_unit", "_anim" ];
if ( _anim == "Acts_JetsMarshallingRight_loop" ) then {
_unit playMove "Acts_JetsMarshallingRight_loop";
};
}];
this disableAI "ANIM";
Tried adding a hint to the EH but it doesnt fire either
switchMove doesn't "start" the move (at least not the main syntax; the second one does)
so it never gets "done"
this switchMove "Acts_JetsMarshallingRight_loop";
this playMoveNow "Acts_JetsMarshallingRight_loop";
this addEventHandler [ "AnimDone", {
params[ "_unit", "_anim" ];
if ( _anim == "Acts_JetsMarshallingRight_loop" ) then {
_unit playMoveNow "Acts_JetsMarshallingRight_loop";
};
}];
this disableAI "ANIM";
this is also stated on the wiki page for switchMove
I love arma 3 scripting, always so straightforward and intuitive π
But still no luck I think
what if you add a switchMove in the EH too?
this switchMove "Acts_JetsMarshallingRight_loop";
this playMoveNow "Acts_JetsMarshallingRight_loop";
this addEventHandler [ "AnimDone", {
params[ "_unit", "_anim" ];
if ( _anim == "Acts_JetsMarshallingRight_loop" ) then {
_unit playMoveNow "Acts_JetsMarshallingRight_loop";
_unit switchMove "Acts_JetsMarshallingRight_loop";
};
}];
this disableAI "ANIM";
switch comes before play
"Oh I'll add a cool little immersive guy pointing down the road" I thought
"I'm sure it wont take long to make, propably a command or two" I thought π
NΓΆp
just do disableAI "ALL" instead of ANIM
He's still standing there, menacingly!
can you try it via debug console while mission is running to see if it works at all?
(use the variable name of the unit isntead of this)
tbh since dev console works I might just start it that way at mission start and delete him if the script acts up π
they're supposed to drive past him like once
You could use serverInit,
And if needed remoteexec anims ,
initServer.sqf Executed only on server when mission is started. See Initialisation Order for details about when exactly the script is executed.
just add some delay
this spawn {
_this switchMove "Acts_JetsMarshallingRight_loop";
_this playMoveNow "Acts_JetsMarshallingRight_loop";
_this addEventHandler [ "AnimDone", {
params[ "_unit", "_anim" ];
if ( _anim == "Acts_JetsMarshallingRight_loop" ) then {
_unit switchMove "Acts_JetsMarshallingRight_loop";
_unit playMoveNow "Acts_JetsMarshallingRight_loop";
};
}];
_this disableAI "ANIM";
}
It works 
thanku <3
You get another one of my big smart coder man stars β
Hi, I could use some help.
I got a helicopter with an agent as pilot. I want to make it move to and hover over a certain object.
I'm using setDestination to make it move there but I can't figure out how to actually make it stop and over over the object.
How can I do this?
what planningMode did you use? it has a few https://community.bistudio.com/wiki/setDestination
vehicle planned
This is what I'm trying rn.
Limiting speed doesn't help, different planning modes don't make a difference, the hint "stopped" shows when I use VEHICLE PLANNED but it still doesn't stop.
It just circles around the object every time.
_heli = createVehicle ["B_CTRG_Heli_Transport_01_sand_F", getPos this, [], 0, "FLY"];
_agent = createAgent ["B_Helipilot_F", getPos this, [], 0, "NONE"];
_agent moveInDriver _heli;
_heli limitSpeed 50;
_agent setDestination [getPos box, "VEHICLE PLANNED", false];
[_agent] spawn { params ["_agent"];
waitUntil{ moveToCompleted _agent};
doStop _agent;
hint "stopped";
};```
("this" is a logic object and "box" is the object I want it to hover above)
with move waypoint you could probably make the heli move towards the WP but not precisely above it (don't know if thats good enough for you)
unfortunately hovering above the object is exactly what I'm trying to achieve
well if you put invisible landing pad there the heli can land on that but idk about hover...
I guess that'll be my solution if I can't make it hover
Unfortunately, vehicle AI in Arma is simply not capable of being perfectly precise outside of some very specific circumstances.
There are a couple of alternate modes for the land command (and in 2.18, landAt) that allegedly cause the helo to enter a low-level hover over the chosen pad, so that might be useful for you. However, until the landAt alt syntax arrives, there's no way to force the AI to choose a particular pad, so if there are several nearby it's an exercise in hoping they choose the right one on their own.
Well, maybe it works in the future then. I'll play around with speed limits. Maybe that'll deliver satisfying results.
Thanks anyway for trying to help.
If it's singleplayer you could record your own path and play it.
with https://community.bistudio.com/wiki/BIS_fnc_typeText
how do i position the text to where i want it on screen? don't know how i put in the posX/Y cordinates
the wiki example 2 shows
Not singleplayer and I want to be able to adapt it to different objects, so that's also not an option.
This is a satisfying solution so far if anyone's interested.
_heli = createVehicle ["B_CTRG_Heli_Transport_01_sand_F", getPos this, [], 0, "FLY"];
_agent = createAgent ["B_Helipilot_F", getPos this, [], 0, "NONE"];
_agent moveInDriver _heli;
_agent setDestination [getPos box, "VEHICLE PLANNED", false];
[_agent] spawn {
params ["_agent"];
waitUntil{ sleep 0.1; vehicle _agent distance2D box < (speed vehicle _agent) * 2;};
hint "hitting brakes";
vehicle _agent limitSpeed 15;
waitUntil{ sleep 0.1; vehicle _agent distance2D box < 5;};
hint "decending";
vehicle _agent limitSpeed 0;
vehicle _agent flyInHeight [10, true];
};```
Only the flyInHeight doesn't seem to work.
maybe locality issue? are you running on dedi?
probably not since you create the heli in same script
maybe limitSpeed prevents flyInHeight from working
Just testing it in the editor.
Setting the height to 5 or 7 worked for some reason. I haven't tried setting it to anything higher than 10.
I wanted it to go a bit lower than the regular flying height but considering that the script I have now makes it hover only close to the object and not right above it, any tree or building in the area becomes a risk. So I'll just leave it at the standard height.
cool
This sounds like it only works for a plane with a simple uv unwrap, wouldnt work for something like a cube though, or something you dont know the uv unwrap for
looking for some performance increase using event handlers, where I am checking if player enter some area ( player inArea "marker" ). I usually do some loop, while/waitUntill with player inArea "marker" and some sleep time. Wondering if using AnimDone is a good idea for this or some nice alternative, other than loop.
If you are looking for more precision, do your check in unscheduled space with either a trigger, each frame handler, or cba wait until and execute system.
Performance won't be an issue with your one line of code in either space.
I don't need to check position that often, so trigger ( 0.5s ) or each frame is out of option, as I usually do loop with 1+ seconds.
CBA is nice, but looking for missions with dependency
Yes.
Cube is easy, create 6 planes. tadaa.
I wanted to do it with a character model πππ
Maybe I am imagining that, but wasn't there a function to turn a number representing a month into the localized month name?
str_3den_attributes_date_month7_text is July
pretty easy to make yourself with one format
in Reforger yes, afaik, but not in A3?
I know. Just thought there was one already.
Oh I see now, it's even month<Number>...well that's too easy. I am not used to that π
Hello gents. I am trying to hide an object locally for just only one particular player in MP via the remoteExec function, but it doesn't seem to work.
[s1,false] remoteExec ["hideObject",player2,false];
Someone maybe has an advice? Cheers.
where do you run it from?
The object is already hidden via // s1 hideObject true
And it should unhide it for player2
It's in a trigger
With Any Player present activation
print s1 and player2 to see if they're defined at all
I don't know how to print those, but i can assure they are both defined in the object attributes
systemChat str [s1, player2]
The remoteExec which should unhide the object (a green VR arrow marker) works also, but it does unhide the object for every player slot that i am trying to test.
As it should unhide it only for player2, at least that's what i am trying to achieve π
if you want to hide it shouldnt you pass true to the hideObject command
I am sorry, i've meant i need to unhide it. It's already hidden.
To avoid further confusion:
oh ok
The object (s1) is already hidden via // s1 hideObject true;
now i have a trigger which calls // [s1,false] remoteExec ["hideObject",player2,false];
on activation
and it does work in this way, that it unhides the object (s1) but for everyone
I am trying to achieve, that the object (s1) unhides only locally for player2
what you wrote should only unhide it locally.
is there anything else that could affect the object?
also what kind of object is it?
where do you run this?
^^^^ could be timing
This is the object which i am trying to hide, a simple green VR arrow:
I am running this in a 10x10 trigger which activates on any player present.
well that's the issue then
oh
How could it be run properly? I am sorry for such obvious questions, but i am fairly new to arma scripting.
I need more details. what are you trying to do exactly?
I have some interactions on a crashed vehicle, which i want to highlight with a green VR arrow for particular, specialized player slots.
So that the arrow is hidden, till a particular player object (player2) is in proximity, so it unhides, but only for him locally, so that others don't see it.
I don't know if that makes sense
if the object is hidden by default, why do you run s1 hideObject true via a trigger tho?
my bad once again, i apologize
s1 hideObject true; is run in the object init
only remoteExec to unhide the object is run via the trigger
it should be correct then
tho you don't really write the var name in the init field of objects. you write this instead
also you can just uncheck the Show Model (iirc) option in special state
how do you test this?
I wanted to attach a lamp to inside of a car to simulate interior lighting, but the vehicle does not move anymore apparently due to collision? which I though is disabled when attaching an object. What do?
disableCollisionWith does not work when I set it between all three objects (driver, car, lamp) so I guess it's tied to physx but that's all I figured out
nvm once it's above the driver it's all good, even if within the vehicle boundaries. 
Does setText not work anymore?
private _nearestCity = nearestLocation [getPos player, "nameCity"];
systemChat str _nearestCity;
systemChat str text _nearestCity;
_nearestCity setText "Test City";```
Stays the same after running the command.
If it's not a location you created in script then you may need to clone it with createLocation first.
Hmm.
terrain locations aren't directly editable.
Just tested it once again on dedicated server and it works. I really appreciate all the help!
You can delete old location and create new location on the position example code:
private _pos = getPos player;
private _locationToChange = nearestLocation [_pos, "nameCity"];
deleteLocation _locationToChange;
private _newLocation = createLocation ["NameVillage", _pos, 100, 100];
_newLocation setText "Player Town";
Yeah, I got it working
Could one theoretcly make something float in the air/ float forward in the air smoothly?
Given a completely open interpretation of "something", yes.
Something that would fall otherwise
If it's a physX object then you can either attach it to something invisible or disable simulation on it.
That would work for keeping it still, but moving it forward while still looking smooth wouldnt work with that
Well, the attach one does. Disabling simulation can mess with network updates, yes.
If the question is "Is there a method that isn't a pain in the arse" then probably no.
Im fine with pain the arse, I need it to mainly work with scripted movement
eachFrame handler + setVelocityTransformation would probably work too.
Would using CBA keybinds then applying the frame eventhandler while the key is down, be viable
I do this for a thing, it is.
Though mostly because I was too lazy to figure out a better way.
This may be somehwat of a complicated task perhaps, and dont know if its possible, but:
Making only certain players get Infinite Stamina/No Fatigue (ACE3), during mission.
I'd guess it's roughly that the players would be in 1 group, and then work with that somehow, if its possible?
To disable fatigue for whole player group you could do something like this: { _x enableFatigue false; } foreach (units player); (run on client)
this does not disable ACE fatigue
oh ace... havent used that my self
well dig up the ace stamina functions and do the same as above π
but this does for every player, no?
just one player, but you can make all players run that code with remoteExec for example
if you want it for players and not AIs you can simply run fatigue enable for each player in client start up scripts
each player that is supposed to have it, having to run remoteexec is not the thing i'm looking for
then just put the code in https://community.bistudio.com/wiki/Event_Scripts#initPlayerLocal.sqf, should do the trick
but that does for all players that join mission?
yes
so its not the thing im looking for
put if conditions there...
and with those, how i do it so that only the certain players get it, steamids?
yeah i think one way commonly used is https://community.bistudio.com/wiki/getPlayerUID
// disable fatigue
};```
something like that
where those numbers are player ids
hmm, thanks, will try that out
And see info of fatieque
"When the player dies enableFatigue is set to true after the respawn"
I have an "reloaded "EH in onPlayerRespawn.sqf file. Inside of it I have piece of code, which requires to be run server side, as it's an write operation on inidb2 ini file.
params ["_unit", "_weapon", "_muzzle", "_newMagazine", "_oldMagazine"];
...
dnt_ammoCount = dnt_ammoCount - 1;
publicVariable "dnt_ammoCount"; //This is broadcasted fine
_inidbi = ["new","Quartermasters_logbook"] call OO_INIDBI;
["write", ["Supply count", "Ammo", dnt_ammoCount]] call _inidbi; // This one isn't
...
I understand, as both event file and EH are local the operation is only done on client but I need this writing operation to happen after this EH fires. Any ideas how to go around it? Tried remoteExec but to no effect
I'm currently trying to create a custom supply drop with ACE Rearm enabled using "ace_rearm_fnc_makeSource". But I'm running in to trouble getting it to work as it should on a dedicated server. The option doesn't show up "live" for connected clients. But if you back out to lobby and load back in again, the option now shows.
I've been trying to solve this for several weeks now, with no luck. If anyone has any ideas on this, I would really appreciate it.
My starting point was to simply put this line in the "Crate Init" field of the supply drop support module: [_this, 1200] call ace_rearm_fnc_makeSource;Works fine when testing through the editor, but doesn't work on a dedicated server.
I've tried running it using remoteExec, remoteExecCall, BIS_fnc_MP.
Suspected for a while that there might a locality issue with the '_this' variable, and tried this to make sure it gets recognized. Also in combination with the above methods.private _vehSupplyBox = _this; _vehSupplyBox setVehicleVarName "VehSupplyBox"; VehSupplyBox = _vehSupplyBox; publicVariable "VehSupplyBox"; [VehSupplyBox,1200] call ace_rearm_fnc_makeSource;
Running it through the debug console has the same result.
You can run that only on server.
Try this Give variable name to that object in Eden something like: VehSupplyBox
And in your mission Folder create InitServer.sqf
And in there put this:
[VehSupplyBox,1200] call ace_rearm_fnc_makeSource;
Yes. I've been running it on the server using both remoteExec and BIS_fnc_MP. The problem is that clients need to reinit to make the option show up for them when the function is run mid mission. It works without issue when run before any client has joined the game. But that can't be done on a object that doesn't exist at mission start, like the supply drop crates.
How do you remoteExec ?
And where are you calling the script from ?
If you are calling from the Zeus you would do something like this:
private _veh = _this;
[_veh,1200] remoteExec ["ace_rearm_fnc_makeSource",[0,-2] select isDedicated];
I've tested serveral different ways. The most basic one being [_this,1200] remoteExec ["ace_rearm_fnc_makeSource",2];
This one had the exact same effect. The Ace Interaction option doesn't show up until you exit to lobby and rejoin.
I've used the crate init field on the supply drop module, debug console, as well as through Zeus.
Try this with debug console while looking at the object.
private _veh = cursorTarget;
[_veh,1200] remoteExec ["ace_rearm_fnc_makeSource",2];
Every place, and every way I run it. The option doesn't appear until you reinit.
Myb its becouse this line that is stopping and you need to re init the settings:
https://github.com/acemod/ACE3/blob/f1488c9c88b393dab227969c3d95b03e2d5794d1/addons/rearm/functions/fnc_makeSource.sqf#L22
Any idea on how to do that without exiting to lobby? I did look through that, but it's a bit too advanced for me to understand it completely.
Same effect. Nothing until you rejoin.
Dont know but you could ask in Ace discord why is that happening they should know more how to help you becouse its about ace mod question.
Yeah, that's the first place I tried. https://discord.com/channels/976165959041679380/1210646913242759178 Not getting any responses any more though.
try this myb dont know then:
private _veh = _this;
[_veh ,1200] remoteExecCall ["ace_rearm_fnc_makeSource",2];
If this dosent work then its the fnc that is preventing and you need to reinit the settings to be able to see it.
Same result.
Alright, thank you for the help!
How can I automatically go from a objectsGrabber output to a objectsMapper input? My problem is that objectsGrabber appends a header multiline comment with various debug information, and objectsMapper just wants the array that comes after the comment in objectsGrabber. I tried using compile to translate between objectsGrabber's string output to code, but that doesn't seem to support comments.
TLDR: I have a string that contains a multiline comment and an array, how do I strip the comment from the string and return only the array
Might work:
_string select [(_string find "*/") + 2];
Do you have any example code on what you have and how would you like to have it in end array ?
well, you'd need to parse the array afterwards I guess.
I don't know how picky parseSimpleArray is.
You could skip the comment stripping and just run call compile on the whole thing, I guess. Depends how much you trust it.
Would this work in his case ?
private _file = "scripts\Info.sqf";
call compile preprocessFileLineNumbers _file;
output from objectsGrabber
"/*Grab data:
Mission: tas_ricky_the-graveyard-of-empires_v11
World: takistan
Anchor position: [4686.19, 9504.07]
Area size: 10
Using orientation of objects: yes
*/
[
[""Land_Pillow_F"",[-0.231934,-1.67676,3.05176e-005],34.4123,1,0,[-0.97433,-2.78492],"""","""",true,false]
]"
end goal is to have the following as just an array:
[
[""Land_Pillow_F"",[-0.231934,-1.67676,3.05176e-005],34.4123,1,0,[-0.97433,-2.78492],"""","""",true,false]
]
compile results in an unsupported character error
lemme go rerun it to get exact error
call compile "/* test */ 1 + 1" results in "unsupported number in expression"
call compile "1 + 1" results in 2
unfortunately, preprocessFileLineNumbers is not doable afaik since this is all stored via ingame variables and I can't manually edit files as it has to be automated
yeah, thats an issue
Use the find/select method then. Assuming that the data format is consistent it should be fine.
alrighty, checking that
Might need a second one to chop to the first bracket afterwards.
forgot about the wonders of select for strings
In theory you could rewrite the whole preprocessor in SQF. I don't know if anyone's done that :P
now that would be something lmao
You can just trim the string with select i guess something like this:
"japa is the man!" select [8] // output: the man!
yep, currently using the select [start,end] syntax
can engine actions (ie inputActions) be monitored without having to loop or the only actual way to do it is with custom eventHandlers in vanilla A3?
... adding any find command seems to break the script completely. For example, I added the following near the middle of my code:
private _rawObjectdata = [_position, _radius, true] call BIS_fnc_objectsGrabber;
private _start = (_rawObjectdata find "*/") + 2;
private _end = (_rawObjectdata find ']"');
Whenever I execute the function this is in, none of my debug print statements appear (even those at the very start before anything else) and the script never completes until I exit the mission (at which point I can see my debug prints and etc in my logs).
I have no idea what's going on.
You don't need to find the end.
btw, you're not actually using BIS_fnc_objectsGrabber to string-process it immediately, are you?
You're right, there was an extra " due to some debug printouts so I thought it was encased in ".
What do you mean by this?
I mean if you just want an array of nearby objects then there are better methods.
My usage case is that I need to save and then at a later time precisely re-create objects within 10 meters of a given position, with their relative distances unchanged. I assumed objectsGrabber/Mapper would be the best tool to use given the relative positions part.
Why are you processing the string in that case though?
oh, objectsMapper doesn't just take the string?
weird
i will say, the header string with all the information is pretty useful for when you're doing it manually
just not good for automatic stuff like what I'm trying to do
Why do your examples always put the thing into a new private variable first, even if it was already a private variable or didn't need to be a variable at all?
Why not just call compile preprocessfilelinenumbers "scripts\info.sqf"; ?
IDK i guess habbit. And also you never know when down the line if you are writing a fnc you are gonna need it.
it's a good practice to have, I think in some of my old script files I still have random local variables starting with a _ that I never added private to
and its more readable
if something breaks and you need to make debug prints of each step, segmenting it like that saves a lot of time
Making things private isn't what I'm getting at. I understand the purpose of that and why most variables should be private. And I understand the reason to declare variables all at once early on. What I'm questioning is assigning things to private variables that were already a private variable (private _vehicle = _this? Just use _this) or were already readable and should never be used again (if you need that file path more than once in the same file, you should've made a function). That's just adding a redundant private _blah = ... line, particularly in a simple example where a new player might think the private line was important to how it works.
i cannot seem to get a script running using init.sqf and i cannot figure out why, first time using init.sqf and all that, im specifically trying to get a script folder working called SCCLoot-0.5 thats on the forums. if anyone could assist me that'd be dandy
Well primarly i use it so i can read it better code example:
private _unitsCheck = allUnits select {alive _x and typeOf _x == 'UK3CB_ADE_O_TL'};
private _areaCenter = [0,0,0];
private _unitsINArea = _unitsCheck inAreaArray [_areaCenter, 200, 200, 200, false, 200];
private _unitsClosesToCenter = _unitsInArea apply {[_areaCenter distanceSqr _x,_x]};
_unitsClosesToCenter sort true;
private _closesUnit = (_unitsClosesToCenter select 0) param [1,objNull];
//Above or Below
_unitsCheck = allUnits select {alive _x and typeOf _x == 'UK3CB_ADE_O_TL'};
_areaCenter = [0,0,0];
_unitsINArea = _unitsCheck inAreaArray [_areaCenter, 200, 200, 200, false, 200];
_unitsClosesToCenter = _unitsInArea apply {[_areaCenter distanceSqr _x,_x]};
_unitsClosesToCenter sort true;
_closesUnit = (_unitsClosesToCenter select 0) param [1,objNull];
Also i had couple of instances where it wouldnt read especialy in Init of a object for soem reasoun this wouldnt run until you declare it in a variable:
[this,25] spawn {
params ["_vehicle","_maxSpeed"];
};
//
private _veh = this;
[_veh ,25] spawn {
params ["_vehicle","_maxSpeed"];
};
Sure if you could paste the code so we can see what is the problem and if you could explain a bit more what is not working.
so im using https://github.com/samscodeco/SCCLoot and the instructions for it to work are just "paste [] execVM "SCCLoot\lootInit.sqf"; in the init.sqf, so i downloaded VS code, made the sqf file and inserted the line.
you might have missed the "Place the 'SCCLoot' folder inside the root mission directory." point
is this the correct location then
or have I misunderstood where root mission directory is
open that SCCLoot folder, I think the one you are actually supposed to place in your mission is within it
In that case, remove the -0.5 from the folder name
You can see in the piece of code you pasted, the file path it's looking for has a folder called "SCCLoot" specifically
Yea what Nikko said remove -0.5 from the foler and it should work.
i actually had a facepalm moment
like i know how to code
and i missed that
thanks so much
It happends π
cheers
userActionsEventHandlers its a very powerful and straight forward alternative for people who are looking to listen to player controlled events, both engine and custom
i have a new dillemma
this appears but there is neither of these undefined expressions are in the code
One does not debug with showScriptErrors. Instead, find the RPT file and look for the first error in there.
client/localhost? Users/[username]/AppData/Local/Arma 3
!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.
No, running the mission in Eden is fine.
RPTs aren't per-mission, they're created each time you start Arma and log events whenever they occur.
Unless you have -noLogs set, which obviously you shouldn't.
10:25:14 Error in expression <
scclootDefault = [
["ACE_CableTie",90]
["ACE_Chemlight_Orange",75]
[" ",75]
[" >
10:25:14 Error position: <["ACE_Chemlight_Orange",75]
[" ",75]
[" >
10:25:14 Error Missing ]
10:25:14 File C:\Users\Myles\Documents\Arma 3 - Other Profiles\Matress%20\missions\Prototype_Survivalist.Stratis\SCCLoot\Config\lootTables.sqf..., line 10
10:25:14 Error in expression <
scclootDefault = [
["ACE_CableTie",90]
["ACE_Chemlight_Orange",75]
[" ",75]
[" >
10:25:14 Error position: <["ACE_Chemlight_Orange",75]
[" ",75]
[" >
10:25:14 Error Missing ]
10:25:14 File C:\Users\Myles\Documents\Arma 3 - Other Profiles\Matress%20\missions\Prototype_Survivalist.Stratis\SCCLoot\Config\lootTables.sqf..., line 10
10:25:14 Error in expression <tIndustrial;
};
case 3: {
_lootArray = scclootMilitary;
};
case 4: {
_lootArra>
10:25:14 Error position: <scclootMilitary;
};
case 4: {
_lootArra>
10:25:14 Error Undefined variable in expression: scclootmilitary
10:25:14 File C:\Users\Myles\Documents\Arma 3 - Other Profiles\Matress%20\missions\Prototype_Survivalist.Stratis\SCCLoot\System\lootSpawn.sqf..., line 58
10:25:14 Error in expression < {
_lootArray = scclootDefault;
};
};
_lootArray;
};
while {scclootEnableSpa>
10:25:14 Error position: <_lootArray;
};
while {scclootEnableSpa>
10:25:14 Error Undefined variable in expression: _lootarray
10:25:14 File C:\Users\Myles\Documents\Arma 3 - Other Profiles\Matress%20\missions\Prototype_Survivalist.Stratis\SCCLoot\System\lootSpawn.sqf..., line 75
10:25:14 Error in expression <tIndustrial;
};
case 3: {
_lootArray = scclootMilitary;
};
case 4: {
_lootArra>
10:25:14 Error position: <scclootMilitary;
};
case 4: {
_lootArra>
There's a syntax error in your loot table definitions
Array elements must be separated by , - even when those elements are themselves arrays
Because those arrays are wrong, the loot tables aren't being defined, and this is causing a cascade of errors as various things try to use the loot tables and fail
Example:
scclootDefault = [
["ACE_CableTie",90]
["ACE_Chemlight_Orange",75]
];```
should be:
```sqf
scclootDefault = [
["ACE_CableTie",90],
["ACE_Chemlight_Orange",75]
];```
OK thanks
thats
dear god a lot of commas incoming
its 20 minutes pre-op, you saved my ass
thank you
Someone how to know how to put animation of environmental soldiers?
full vanila no mod
Hey fellas,
I'm trying to obtain the angle in degrees between 2 vectors that are usually opposite to each other. However I'm getting some weird results, could anyone give me a pointer in what could be going wrong?
_VecPosBeg = _unit weaponDirection (currentWeapon _unit);
systemChat format ["Weapon direction Vector: %1", _VecPosBeg];
_unitDirectionRelativeToCheck = _VecPosBeg vectorFromTo (eyeDirection _enemy);
systemChat (format ["Current calculated vector: %1", _unitDirectionRelativeToCheck]);
systemChat (format ["Current enemy direction vector: %1", eyeDirection _enemy]);
_dot = _VecPosBeg vectorDotProduct _unitDirectionRelativeToCheck;
_mag1 = vectorMagnitude _VecPosBeg ;
_mag2 = vectorMagnitude _unitDirectionRelativeToCheck;
_calc = _dot / (_mag1 * _mag2);
_unitDirectionRelativeToCheck = (aCos _calc);
//_unitDirectionRelativeToCheck = _VecPosBeg vectorCos _unitDirectionRelativeToCheck;
//_unitDirectionRelativeToCheck = (aCos _unitDirectionRelativeToCheck);
systemChat (format ["Calculated angle between units is: %1deg", _unitDirectionRelativeToCheck]);
if (_unitDirectionRelativeToCheck < 200 && _unitDirectionRelativeToCheck > 160) then
{
systemChat (format ["Unit %1 is within the threshold", _enemy]);
};
Are you sure you mean eyeDirection? This doesn't make a lot of sense to me.
_flashLightPosBeg is undefined anyway, so I don't know what you're trying to do regardless.
oh whoops, incorrect naming, that variable mentioned is _vectorPosBeg
but yes, its eyeDirection****
What is?
the script does what's its intended, I just have this really weird results when doing looping checks and getting close and personal with units, I suppose it could be that is a 3d calculation instead of a 2d vector
for example, getting 90deg when standing behind the unit being checked
I still have no idea what's intended. Feels more likely that it's giving you plausible results by blind luck most of the time :P
the vector calculated is used to know if the units are or not within certain cone of a weapon
what's that got to do with eyeDirection?
basically, i want to know if the unit is looking at the weapon
You want to check the position of the weapon against the eyePos and eyeDirection of a unit then?
But there's no calculation here for the weapon position or the enemy unit position.
doesnt direction vectors have a position in space already?
Perhaps that is what im missing, but if they share [0,0,0] in space, wouldnt I still be able to calculate the direction difference of the vectors?
What are you exactly trying to do
As Iβm a bit confused from reading the script what your intention is
I have a timer script that runs in a remoteExecuted server only trigger but the problem is that it doesn't run syncron for all, there is always a delay of a few seconds, any way to prevent the delay?
example:
[] spawn
{
//_para_timer = player getVariable ["para_timer", objNull];
//ctrlDelete _para_timer;
//missionNamespace setVariable ["timerRunning", false, true];
private _para_timer = findDisplay 46 ctrlCreate ["RscStructuredText", -1];
player setVariable ["para_timer", _para_timer, true];
_para_timer ctrlSetPosition [safezoneX + 0.471 * safezoneW, safezoneY + 0.08 * safezoneH, 1 * safezoneW, 1 * safezoneH];
_para_timer ctrlSetTextColor [1, 1, 1, 1];
_para_timer ctrlSetFont "LCD14";
_para_timer ctrlShow true;
_para_timer ctrlCommit 0;
_para_timer ctrlSetStructuredText parseText format ["<t align='left' size='2' shadow='2'>15:00</t>"];
_duration = 900;
_countdownEndTime = time + _duration;
missionNamespace setVariable ["timerRunning", true, true];
while {(missionNamespace getVariable ["timerRunning", true])} do
{
private _remainingTime = _countdownEndTime - time;
private _timerText = [_remainingTime, "MM:SS", false] call BIS_fnc_secondsToString;
_para_timer ctrlSetStructuredText parseText format ["<t align='left' size='2' shadow='2'>%1</t>", _timerText];
if (_remainingTime <= 0) then
{
missionNamespace setVariable ["remainingTime", 0, true];
_para_timer ctrlSetStructuredText parseText format ["<t align='left' size='2' shadow='2'>00:00</t>"];
break;
};
sleep 1;
};
};
Create the UI on all clients and calculate remaining time only on the server and broadcast it to the clients.
Send countdown end time from the server, use serverTime instead of time, it is a timer that is syncronized between all clients
i think there maybe bug in [_off,"SIT"] call BIS_fnc_ambientAnim; because every time I do that the _off's group icon appears on the map and not even clearGroupIcons is able to remove that group icon from the map
little sleep (atleast sec) after BIS_fnc_ambientAnim before calling clearGroupIcons seems to fix it
I was able to repro it in another mission but havent been able to fix it for my project, for some reason
i cannot find where in a script im using sets if an item the script spawns in is being simulated, as all items are spawning as not simulated and thus players cannot pick them up
could it possibly be a mission setting?
You could do something like this:
Para_fnc_Timer = {
params ["_timer"];
private _para_timer = findDisplay 46 ctrlCreate ["RscStructuredText", -1];
_para_timer ctrlSetPosition [safezoneX + 0.471 * safezoneW, safezoneY + 0.08 * safezoneH, 1 * safezoneW, 1 * safezoneH];
_para_timer ctrlSetTextColor [1, 1, 1, 1];
_para_timer ctrlSetFont "LCD14";
_para_timer ctrlShow true;
_para_timer ctrlCommit 0;
_para_timer ctrlSetStructuredText parseText format ["<t align='left' size='2' shadow='2'>15:00</t>"];
Para_endTime = ([ time, serverTime ] select isMultiplayer ) + _timer;
publicVariable "Para_endTime";
while{ ( [ time, serverTime ] select isMultiplayer ) < Para_endTime } do {
private _timeLeft = Para_endTime - ( [ time, serverTime ] select isMultiplayer );
_para_timer ctrlSetStructuredText parseText format ["<t size='3' align='center'>%1</t>",[(_timeLeft/3600),"HH:MM:SS"] call BIS_fnc_timetostring];
_para_timer ctrlCommit 0;
sleep 1;
};
_para_timer ctrlSetStructuredText parseText format ["<t color='#FFFFFF' size='1.5' align='center'>Timer Finished!!!</t>"];
_para_timer ctrlCommit 0;
sleep 5;
ctrlDelete _para_timer;
};
[900] remoteExec ["Para_fnc_Timer",[0,-2] select isDedicated,true];
This is also wrong, is client lags for few seconds, they'll also be delayed by these few seconds
Also that JIP flag, each JIP will start the countdown all over
You need to broadcast target time serverTime + 900
Isnt that this line:
Para_endTime = ([ time, serverTime ] select isMultiplayer ) + _timer;
publicVariable "Para_endTime";```
oh just noticed it
You RE the server to do the timer when it should be the server broadcasting the timer to everyone
I think original post was RE'ing the function on everyone's client once server only trigger is triggered
Fellas, is there a way to call an array? for example :
_posATL = _Arraye modelToWorld [0,10,0];
this is how ive done the array:
private _Arraye = ["part_0", "part_1", "part_2", "part_3", "part_4", "part_5", "part_6", "part_7", "part_8", "part_9", "part_10", "part_11", "part_12", "part_13", "part_14", "part_15"];
they are objects placed in eden editor
{
private _posATL = _x modelToWorld [0,10,0];
} foreach _Arraye;
Also that array that you have is array of strings not objects.
To be array of objects remove "".
And give variable names to objects ofc.
Thank you for that, ill give it a try
Can I just ask, what is _x ?
Foreach is a loop and _x represents a value in the array each loop. You can take a look of how foreach works here:
https://community.bistudio.com/wiki/forEach
Ahhh i see I see, thank you heaps for that
Question to run Timer on Server would it be something like this ?
Para_ServerTimer = {
params["_timer"];
Para_endTime = ([ time, serverTime ] select isMultiplayer ) + _timer;
publicVariable "Para_endTime";
while{ ( [ time, serverTime ] select isMultiplayer ) < Para_endTime } do {
Para_Time = Para_endTime - ( [ time, serverTime ] select isMultiplayer );
publicVariable "Para_Time";
sleep 1;
};
};
private _handle = 0 spawn {
[900] remoteExec ["Para_ServerTimer",2];
private _para_timer = findDisplay 46 ctrlCreate ["RscStructuredText", -1];
_para_timer ctrlSetPosition [safezoneX + 0.471 * safezoneW, safezoneY + 0.08 * safezoneH, 1 * safezoneW, 1 * safezoneH];
_para_timer ctrlSetTextColor [1, 1, 1, 1];
_para_timer ctrlSetFont "LCD14";
_para_timer ctrlShow true;
_para_timer ctrlCommit 0;
while {( [ time, serverTime ] select isMultiplayer ) < Para_endTime} do {
_para_timer ctrlSetStructuredText parseText format ["<t size='3' align='center'>%1</t>",[(Para_Time/3600),"HH:MM:SS"] call BIS_fnc_timetostring];
_para_timer ctrlCommit 0;
sleep 1;
};
_para_timer ctrlSetStructuredText parseText format ["<t color='#FFFFFF' size='1.5' align='center'>Timer Finished!!!</t>"];
_para_timer ctrlCommit 0;
sleep 5;
ctrlDelete _para_timer;
};
No
Thanks for the help on that Legion, now I have another error π¦
Its just saying Undefined variable in expression: _posatl
_ps1 = "#particlesource" createVehicleLocal _posATL;
_ps1 setParticleParams [["\A3\data_f\cl_exp", 1, 0, 1], "", "Billboard", 1, 2.5, [0, 0, 0], [0, 0, 0], 13, 10, 7.6, 0, [75, 125, 150, 125, 100], [[0.1, 0, 0.2, 1]], [0.08], 1, 0, "", "", _ps1];
_ps1 setParticleRandom [0, [10, 10, 0], [0.25, 0.25, 0], 0, 1.5, [0, 0, 0, 0], 0, 0];
_ps1 setDropInterval 0.05;
Im not sure why, the arraye looks right, maybe is it to do with how particles are made?
Can you show full script ?
enableCamShake true;
addCamShake [2.5, 4, 40];
enableCamShake true;
private _Arraye = [part_0, part_1, part_2, part_3, part_4, part_5, part_6, part_7, part_8, part_9, part_10, part_11, part_12, part_13, part_14, part_15];
{
private _posATL = _x modelToWorld [0,10,0];
} foreach _Arraye;
_ps1 = "#particlesource" createVehicleLocal _posATL;
_ps1 setParticleParams [["\A3\data_f\cl_exp", 1, 0, 1], "", "Billboard", 1, 2.5, [0, 0, 0], [0, 0, 0], 13, 10, 7.6, 0, [75, 125, 150, 125, 100], [[0.1, 0, 0.2, 1]], [0.08], 1, 0, "", "", _ps1];
_ps1 setParticleRandom [0, [10, 10, 0], [0.25, 0.25, 0], 0, 1.5, [0, 0, 0, 0], 0, 0];
_ps1 setDropInterval 0.05;
_ps1 = "#particlesource" createVehicleLocal _posATL;
_ps1 setParticleParams [["\A3\data_f\blesk2", 16, 10, 32], "", "Spaceobject", 1, 1, [0, 0, 0], [0, 0, 0.5], 0.3, 1, 1, 3, [1.2, 0.8, 0.5, 0.3, 0.6, 1.3], [[1, 1, 1, 0.4], [1, 1, 1, 0.2], [1, 1, 1, 0]], [0.25, 1], 1, 1, "", "", _ps1];
_ps1 setParticleRandom [0, [10, 10, 0], [0.25, 0.25, 0], 0, 1.5, [0, 0, 0, 0], 0, 0];
_ps1 setDropInterval 0.05;
_ps1 = "#particlesource" createVehicleLocal _posATL;
_ps1 setParticleParams [["\A3\data_f\blesk2", 16, 10, 32], "", "Spaceobject", 1, 1, [0, 0, 25], [0, 0, 0.5], 0.3, 1, 1, 3, [1.2, 0.8, 0.5, 0.3, 0.6, 1.3], [[1, 1, 1, 0.4], [1, 1, 1, 0.2], [1, 1, 1, 0]], [0.25, 1], 1, 1, "", "", _ps1];
_ps1 setParticleRandom [0, [10, 10, 0], [0.25, 0.25, 0], 0, 1.5, [0, 0, 0, 0], 0, 0];
_ps1 setDropInterval 0.05;
_ps1 = "#particlesource" createVehicleLocal _posATL;
_ps1 setParticleParams [["\A3\data_f\VolumeLight", 1, 0, 1], "", "SpaceObject", 1, 3, [0, 0, 0], [0, 0, 0], 0, 10, 7.6, 0, [25, 350, 50, 200, 75], [[0, 0, 1, 0.2]], [0.08], 1, 0, "", "", _ps1];
_ps1 setParticleRandom [0, [10, 10, 0], [0.25, 0.25, 0], 0, 1.5, [0, 0, 0, 0], 0, 0];
_ps1 setDropInterval 0.05;
_lightSource = "#lightpoint" createVehicleLocal _posATL modelToWorld [0.2, 0, 0.1];
_posATL only lives in foreach scope. So put all those particles and lights inside the foreach scope.
Ohhhh I see mate, okay im getting it thank you
first time working with arrays, thanks heaps
Clients:
doClientTimerStuff = {
Para_endTime = _this;
//...
};
Server, execute when you want timer to start:
private _end = ([ time, serverTime ] select isMultiplayer) + 900;
_end remoteExecCall ["doClientTimerStuff", 0, true];
am i not doing that with this ?
[900] remoteExec ["Para_ServerTimer",2];
OR, from server-only trigger context:
private _end = ([ time, serverTime ] select isMultiplayer) + 900;
[_end, {
Para_endTime = _this;
// ...
}] remoteExecCall ["spawn", 0, true];
No, you have client ask the server to do some timer calculation and then send it back through publicVariable, in a meanwhile you already starting the timer without waiting from server, this makes no sense.
The idea is to display timer on each client, if you run your private _handle = ... code piece on each client, each client will ask the server to recalculate and rebroadcast Para_time
I see now. Also why are you using remoteExecCall instead remoteExec ?
Almost everything I do including RE is in unscheduled
For RE spawn it makes no difference, so its just a habit
enableCamShake true;
addCamShake [2.5, 4, 40];
enableCamShake true;
private _Arraye = [part_0, part_1, part_2, part_3, part_4, part_5, part_6, part_7, part_8, part_9, part_10, part_11, part_12, part_13, part_14, part_15];
{
private _posATL = _x modelToWorld [0,10,0];
} foreach _Arraye;
{
_ps1 = "#particlesource" createVehicleLocal _x;
_ps1 setParticleParams [["\A3\data_f\cl_exp", 1, 0, 1], "", "Billboard", 1, 2.5, [0, 0, 0], [0, 0, 0], 13, 10, 7.6, 0, [75, 125, 150, 125, 100], [[0.1, 0, 0.2, 1]], [0.08], 1, 0, "", "", _ps1];
_ps1 setParticleRandom [0, [10, 10, 0], [0.25, 0.25, 0], 0, 1.5, [0, 0, 0, 0], 0, 0];
_ps1 setDropInterval 0.05;
} foreach _posATL;
{
_ps1 = "#particlesource" createVehicleLocal _x;
_ps1 setParticleParams [["\A3\data_f\blesk2", 16, 10, 32], "", "Spaceobject", 1, 1, [0, 0, 0], [0, 0, 0.5], 0.3, 1, 1, 3, [1.2, 0.8, 0.5, 0.3, 0.6, 1.3], [[1, 1, 1, 0.4], [1, 1, 1, 0.2], [1, 1, 1, 0]], [0.25, 1], 1, 1, "", "", _ps1];
_ps1 setParticleRandom [0, [10, 10, 0], [0.25, 0.25, 0], 0, 1.5, [0, 0, 0, 0], 0, 0];
_ps1 setDropInterval 0.05;
} foreach _posATL;
{
_ps1 = "#particlesource" createVehicleLocal _x;
_ps1 setParticleParams [["\A3\data_f\blesk2", 16, 10, 32], "", "Spaceobject", 1, 1, [0, 0, 25], [0, 0, 0.5], 0.3, 1, 1, 3, [1.2, 0.8, 0.5, 0.3, 0.6, 1.3], [[1, 1, 1, 0.4], [1, 1, 1, 0.2], [1, 1, 1, 0]], [0.25, 1], 1, 1, "", "", _ps1];
_ps1 setParticleRandom [0, [10, 10, 0], [0.25, 0.25, 0], 0, 1.5, [0, 0, 0, 0], 0, 0];
_ps1 setDropInterval 0.05;
} foreach _posATL;
{
_ps1 = "#particlesource" createVehicleLocal _x;
_ps1 setParticleParams [["\A3\data_f\VolumeLight", 1, 0, 1], "", "SpaceObject", 1, 3, [0, 0, 0], [0, 0, 0], 0, 10, 7.6, 0, [25, 350, 50, 200, 75], [[0, 0, 1, 0.2]], [0.08], 1, 0, "", "", _ps1];
_ps1 setParticleRandom [0, [10, 10, 0], [0.25, 0.25, 0], 0, 1.5, [0, 0, 0, 0], 0, 0];
_ps1 setDropInterval 0.05;
} foreach _posATL;
{
_lightSource = "#lightpoint" createVehicleLocal _x modelToWorld [0.2, 0, 0.1];
} foreach _posATL;
Its still throwing up the same error, I think im doing it wrong tho - should I be adding private to the start of all of it too?
enableCamShake true;
addCamShake [2.5, 4, 40];
enableCamShake true;
private _Arraye = [part_0, part_1, part_2, part_3, part_4, part_5, part_6, part_7, part_8, part_9, part_10, part_11, part_12, part_13, part_14, part_15];
{
private _posATL = _x modelToWorld [0,10,0];
private _ps1 = "#particlesource" createVehicleLocal _posATL;
_ps1 setParticleParams [["\A3\data_f\cl_exp", 1, 0, 1], "", "Billboard", 1, 2.5, [0, 0, 0], [0, 0, 0], 13, 10, 7.6, 0, [75, 125, 150, 125, 100], [[0.1, 0, 0.2, 1]], [0.08], 1, 0, "", "", _ps1];
_ps1 setParticleRandom [0, [10, 10, 0], [0.25, 0.25, 0], 0, 1.5, [0, 0, 0, 0], 0, 0];
_ps1 setDropInterval 0.05;
} foreach _Arraye;
Herro. I've been trying to get a door scripted on a mission I'm making but I can't seem to get it to work. I have an Arma 3 trigger that locks a door if a player steps into the zone that is linked to a Game Logic with the name "Door1", now I want a trigger that unlocks the door whenever an explosion goes off in a 1m radius of said door. The door is located in a fixed structure with class name "Land_House_2W05_F" and it is door #4 in the house. Anyone able to help me out how to setup a proper trigger for this?
The init for the door lock trigger is as following: ((nearestobjects [Door1,["Land_House_2W05_F"], 8]) select 0) setVariable ['bis_disabled_Door_4',1,true]; systemChat "Door Locked";
FYI: this is for a multiplayer mission if that's helpful
Place like a helper object and put this code inside that helper object. Basicly in front of the door.
Also you are gonna need Animation name for the door and put anim name in animate witch you can get with this script:
animationNames cursorTarget;
this addEventHandler ["Explosion", {
params ["_vehicle", "_damage", "_source"];
Door1 setVariable ['bis_disabled_Door_4',0,true];
Door1 animate ["Door_1_rot", 1, true];
_vehicle removeEventHandler [_thisEvent, _thisEventHandler];
deleteVehicle _vehicle;
}];
Basicly what this script dose is. It adds EH to a helper object witch will trigger when helper object gets damaged by explosion.
When that happends it will unlock the door and open the door with animate
And delete the eventHandler and helper object.
Basically, the helper object could be anything? Something like a bunny?
It can be anything like invisible helipad or like a bunny what ever as long its the object.
I'll have a crack at it, thanks.
I kinda assume, if I set the door in the initial script to #4.. I would use Door_4_rot for the Door1 animate line..
I told you to get the animation names of a object use this you can put this in watch field in debug console and just copy the output and one of those animation will be correct for the door:
animationNames cursorTarget;
yea, that yielded a load of animations, so not super clear to me which one to use.
["door_1_rot","door_1_handle_rot_1","door_1_handle_rot_2","door_1_locked_rot","door_1_handle_locked_rot","door_2_rot","door_2_handle_rot_1","door_2_handle_rot_2","door_2_locked_rot","door_2_handle_locked_rot","door_3_rot","door_3_handle_rot_1","door_3_handle_rot_2","door_3_locked_rot","door_3_handle_locked_rot","door_4_rot","door_4_handle_rot_1","door_4_handle_rot_2","door_4_locked_rot","door_4_handle_locked_rot","door_5a_rot","door_5a_locked_rot","door_5b_rot","door_5b_locked_rot","glass_1_hide","glass_1_unhide","glass_2_hide","glass_2_unhide","glass_3_hide","glass_3_unhide","glass_4_hide","glass_4_unhide","glass_5_hide","glass_5_unhide","glass_6_hide","glass_6_unhide","glass_7_hide","glass_7_unhide","glass_8_hide","glass_8_unhide","glass_9_hide","glass_9_unhide","glass_10_hide","glass_10_unhide","glass_11_hide","glass_11_unhide"]
try this one:
And I am right in front of the door
door_4_rot
I think it's trial and error. THe script worked, almost. Helper got removed on explosion, door didn't open. Not sure if it also is because of the fact that the trigger is still being activated because I'm in the zone.
hello, I have a question, will disablaAI RADIOPROTOCOL turn off the spoken voices? I can't check on PC at the moment.
You could also play with animations and see witch one is correct in debug console you could do this and see what happends:
cursorTarget animate ["door_4_rot", 1];
And then just replace the string name for animation.
I know "radioenable false is for radio, i need for speak for soldiers voices ai disable
Ok, so it is this one as suspected. Door opens. But I think the initial trigger might block the door from opening? For context: The trigger is a 10x10 trigger that activates on any player entering.
To disable speaking you could do this:
this setSpeaker "NoVoice";
Make sure its not repeating trigger. You just need to lock the door once.
Thx mate, best regards
This should just be it right? Or am i missing something that makes it repeatable.
Yea also you dont need nearestObject if you are refrencing the object with the variable name so you could in onActivation just do this:
Door1 setVariable ['bis_disabled_Door_4',1,true];
systemChat "Door Locked";
The reference is only to a Game Logic, not the object itself. So that's the only way I know on grabbing that data.
Unless there are better ideas to point towards the door within "Land_House_2W05_F" structure
What is the best way to show custom text on briefing stage ? I need warn players by this way
Put the variable name Door1 On a building instead of a Game Logic and it should work.
You can use CreateDiary And CreateDiarySubject You can read here :
https://community.bistudio.com/wiki/Arma_3:_Briefing
https://community.bistudio.com/wiki/createDiaryRecord
nuh, i need something more interactive than diary
You can create custom GUI then:
https://community.bistudio.com/wiki/GUI_Tutorial
Hey, can somebody tell me ho to set up a simple mission using the Old Man Modules? I got the Old Man to initialize but i donΒ΄t really know how to use the Modules (what to sync, what to place e.g.) Is there a good tutorial about it?
Okay, got it. I thought there might have been a simpler solution here. Like a hint or something else
You could also use Advanced Hint here:
https://community.bistudio.com/wiki/Arma_3:_Advanced_Hints_(Field_Manual)
https://community.bistudio.com/wiki/BIS_fnc_advHint
does it actually working at briefing stage ? Because simple hint not
UPD:
This command will not do anything for players who have "Tutorial Hints" disabled in their Options > Game difficulty settings or on servers that disable it in their relevant difficulty preset.
Sad
That's impossible though with embedded structures in a map?
No yea then Diary and custom GUI.
In this way i would prefer custom GUI. Thanks anyway π
Easy way is to just hide the map object and place the eden object witch you can edit. Other way involves a bit more scripting but i am not on a pc right now.
getting the angle difference of 2 direction vectors.
Weapondirection delivers the direction vector of the muzzle in the origin unit and eyeDirection delivers (what i believe) the direction vector of the eye memory Point in the unit to evaluate which will be always different than origin.
The objective is to check how close to 180deg the vectors are aligned to when getting Theta compared from one another, the closer they are to 180 means how close the eye is aligned to the weapon since the system is intended to detect direct visibility on it. Its an instant check, not meant to loop.
The result is satisfactory when the units are approached from side or front as it is an angle that you would expect, its just when approached from the back that the results doesnt really make sense for me, basically I just want to make sure that the script would work properly from different approaches and I dont get why I get 90deg when standing behind the unit to check.
Thanks for the help! Managed to do it this way.
So I had a script that disabled tfar radios in specific area and enabled it again on trigger, I used it 4 years ago and now I can't find it. Anyone recently used somethign similar?
@iron tundra don't crosspost thanks; I deleted in #arma3_scenario for you
You just set vars on the player. I think it's documented on the github. eg. tf_unable_to_use_radio, tf_voiceVolume
Is it possible to "swim" in the air
Which isn't very healthy to do
Is the animation itself what makes you float? Surely not
We all float down here π€‘
not even the slightest clue, i suspect it is but thats a question for dedmen/leopard/kk
is there a check, where I can filter if vehicle is actual vehicle and not a soldier ?
currently filtering classes like
private _cfg = configFile >> "cfgVehicles";
private _types = [ "C_Van_01_transport_F", "B_Soldier_F" ];
private _units = _types select { getNumber ( _cfg >> _x >> "isMan" ) isEqualTo 1 }; // [ "B_Soldier_F" ]
private _vehicles = _types select { getNumber ( _cfg >> _x >> "hasDriver" ) isNotEqualTo 0 }; // [ "C_Van_01_transport_F", "B_Soldier_F" ]
problem is, that CaManBase have in config also "hasDriver" = 1
so _vehicles is returning both, soldier and vehicle
is there any unique config value that I can use to determine driveble vehicle ( air, wheeled, tracked, ... not static MG )
I'll experiment when I get home, if not I'll see if I can't mimic it
not sure correct name, but try parachute animation ( halofreefall_non )
The parachute itself is a vehicle that is slowing you down, the animation has no effect
Does CaManBase have a typicalCargo entry
does have, empty array
Does anyone know how to make a custom gernade throw? Ive tried many diffrent configs and so far im unsuccessful to make my gernade throw :/
Strange question here, maybe somebody has had this same issue.
I have a large damage handler script that every player has running on them, at one point in the script it checks to see if the person doing the damage is in a vehicle (to detect if the player is being run over) and prevents damage from being done.
Anyway, for 99.9% of players, the script works fine, but for some, they were being hurt/killed when hit by vehicles.
I ran some tests on one of the affected players and for some reason, he is not detecting that the person doing the damage is in a vehicle, for example
(!isNull objectParent _shooter) returns false
((vehicle _shooter) isEqualTo _shooter) returns true
The shooter is the correct player (the person driving the vehicle), just for some reason these normal methods aren't working correctly.
Idea's anybody? It's an interesting case
@meager granite didn't you have an issue with roadkill event handlers?
@gentle zenith #arma3_feedback_tracker message
I'm not sure if that's the same issue or not.
I basically have an inconsistent eventhandler that properly informs most players that the vehicle that hit them had a driver, but wrong informs other players that there was never a vehicle there at all, and the _shooter (driver) is the vehicle.
do you have full HandleDamage log?
What's a rule of thumb on when to put code in a unit's init box? The BI wiki seems to discourage its use.
rule is - it depends on your code
I don't have a log. I was investigating an issue on my server so through debug console I added our normal damageHandler to the player with the issue. I put debug text in there to print out the "_shooter" and to check if the _shooter was in a vehicle or not.
The people with the issue do not think the _shooter is in a vehicle, normal checks such as (vehicle _shooter) just return the _shooter, and not the vehicle he is in
I asked here in case this issue is already known
I'll test on him now and check
When player gets collision damage, unit == shooter
So maybe it was roadkill, just from a vehicle/object without a driver
So I just ran him over with this simple damage handler
params ["_player","_part","_damage","_shooter","_projectile","_hitPartIndex","_instigator","_hitPoint"];
DS_test = [_shooter];
publicVariable "DS_test";
DS_test pushBack (vehicle _shooter);
publicVariable "DS_test";
}];```
DS_test equalled ```[O Charlie 2-1:1 (Huntah) (civ_55),O Charlie 2-1:1 (Huntah) (civ_55)]```
I am civ_55, He was civ_51.
So it's returning the vehicle as the _shooter, but then....
if(!isNull objectParent _shooter)
Is returning false, for everybody else, this returns true
systemchat str (typeof _shooter)
I'll have to do some more testing later on, the guy I was testing on is playing now. It's strange because this works for almost everybody else, and has done for years.
But I'll look into it some more
These debug outputs can be misleading
because it will return same string for vehicle and the unit
Where do you check this?
its not in your DS_test
how do I make a unit leave incapacitation state? Wiki says setUnconscious takes boolean but it does nothing when I set it to false. Do I need to manually apply an animation? Is there one meant to be used specifically with the incapacitated one?
If they were put into the animation with setUnconscious true then setUnconscious false will get them out of it.
Although it might break if you toggle too fast? Not sure.
I used _unit playMoveNow "unconsciousoutprone"; after the setUnconscious false because it doesn't have a weird 5-second pause after the roll-out.
Is there a way to 'hook' onto the respawn event? Say I want to prevent certain players from respawning for a set ammount of time without removing the respawn button entirely.
Is it possible with scripts to check the user's graphical settings for gamma, brightness and contrast?
Hey, I've done some more testing and have an interesting result.
Here's the handler I added to two players
if(!isNil "DS_index")then {
player removeEventHandler ["Killed", DS_index];
};
DS_eventIndex = player addEventHandler ["HandleDamage",{
params ["_player","_part","_damage","_shooter","_projectile","_hitPartIndex","_instigator","_hitPoint"];
if(_part isEqualTo "")then {
DS_test1 = [_shooter, (vehicle _shooter)];
DS_test1 pushBack (typeof _shooter);
DS_test1 pushBack (driver _shooter);
DS_test1 pushBack _instigator;
};
if(!isNull objectParent _shooter)then {
if(_part isEqualTo "")then {
DS_test1 pushBack "Was vehicle";
};
if(((driver (vehicle _shooter)) isEqualTo _shooter) && {!(_shooter isEqualTo player)})exitWith {
if(_part isEqualTo "")then {
DS_test1 pushBack "was driver of vehicle";
};
if(_part isEqualTo "")then {
hint format ["You have been hit with a vehicle by %1",name _shooter];
};
_exit = true;
};
};
if(_instigator != _shooter && {_shooter isKindOf "LandVehicle"})then {
if(_part isEqualTo "")then {
DS_test1 pushBack "was driver of vehicle other";
};
};
publicVariable "DS_test1";
_damage;
}];
};||```
The only difference between these players is that one had logged in after I had the SUV vehicle had spawned in.
I ran over both players, one player seen the _shooter as a player, the other saw it as the vehicle, here is the output of that DS_test1 variable for each player
**_shooter was the vehicle**
```[29f2a126040# 673836: suv_01_f.p3d,29f2a126040# 673836: suv_01_f.p3d,"C_SUV_01_F",civ_55,civ_55,"was driver of vehicle other"]```
**_shooter was the driver**
```[civ_55,29f2a126040# 673836: suv_01_f.p3d,"C_man_polo_1_F",civ_55,<NULL-object>,"was vehicle","was driver of vehicle"]```
Repeating this over and over yields the same results, and each person will always get the same result, even with re-logging, choosing different slots, server restart, or anything.
I am trying to add an event handler when Zeus hides interface(backspace key) but my code doesn't do anything at all. Anybody have a clue?
addUserActionEventHandler ["curatorToggleInterface", "Activate", { systemChat "Hello world!"; }]; ```
User action event handlers don't work when a display or dialog is active
So if understood correctly that would mean "curatorToggleInterface" is kinda useless? As display is always gonna be active? At least from UserActionEventHandler perspective
Yes
If incapacitated as in -Low Health State- from the vanilla system, you can use the manual medical functions for it: https://community.bistudio.com/wiki/BIS_fnc_reviveOnState
I was using it on a fully healthy player to trigger ragdoll for a falling from height event but then I couldn't make it recover from the incapacitated anim with setUnconscious false
John's workaround works though
Your logs confuse me, can't understand what's going on
Is this latest dev or stable btw?
Could someone advise which event script should I put this in
params ["_curator", "_entity"];
publicVariable "dnt_curatorPlaced";
}];```
to properly activate this EH? (Starts in *initServer.sqf*)
``` "dnt_curatorPlaced" addPublicVariableEventHandler {
null = execVM "DNT_supplies\DNT_autoSupplyActionZeus.sqf";
};
I'm pretty sure addPublicVariableEventHandler acrivated code works fine as on dedicated server in debug console I broadcasted activator variable that way publicVariable "dnt_curatorPlaced"; and the script would launch but I just can't seem to correctly assign CuratorObjectPlaced EH to curator login
Nvm, just had to add waitUntil {!isNull (getAssignedCuratorLogic _newUnit)}; at the beginning so logic has time to get assigned. Fires from onPlayerRespawn just fine
@fallen locust "@bold comet player allowSprint true;" -> I didn't test it yet but, really ? if it solves the issue then the wiki page needs to be updated :p
well it should but it kinda dosent work atm so yea
yep
Why are you making an EH of an EH?
I'm more waiting for a fix to the stamina system cause it feels like playing with "enableStamina false" should already allow you to move (not even sprint, just jog) with a ridiculous loadout
and currently you can't
Expansion: you don't need an EH just to trigger another EH; you can simply have the first EH do everything you want.
e.g.
getAssignedCuratorLogic player addEventHandler ["CuratorObjectPlaced", {
params ["_curator", "_entity"];
["DNT_supplies\DNT_autoSupplyActionZeus.sqf"] remoteExec ["execVM",2];
}];```
(ideally, the DNT_autoSupplyActionZeus.sqf file should be turned into a function since it'll be used a lot, rather than execVM'ing a "naked" SQF file every time - <https://community.bistudio.com/wiki/Arma_3:_Functions_Library>)
@proper sigil β¬οΈ
Question how can i get MachineNetwork ID of players ?
owner (server), clientOwner (clients, self only)
Note that for common uses like remoteExec, you don't need the network ID itself, because the command accepts an object as a locality target
I see thanks.
That's fine, this is stable.
The logs are just showing two people getting a totally different set of information from the damageHander while being hit by a vehicle. One person believes the driver is responsible, the other believes the vehicle is.
This isn't random, person A will always see the same thing, as will person B. Maybe framerate has something to do with it? I can't think of what other variables would remain persistent.
Anyway, I'll simply modify the script to suit both situations, it's just so strange because this has worked for a decade.
I thought running over a unit with a vehicle generated more than one general-damage hit.
I have suspicions that the issue here is actually with your publicVariable.
Try calling a logging function on the server instead.
Yes, that's why the data is only being stored when _part isEqualTo "" as this is only called once
Inside my normal script, there is an output systemchat and hint that tells the player that they have been hit by a vehicle by (name of driver). They only get this message once (it's called if _part isEqualTo "")
when hit by a vehicle you get multiple structural damages in the same frame so framerate is definitely a factor in your differences.
It could be a good idea to limit your detection per frame to avoid duplicates and get more consistent results
ENGINE:
Fixed: No longer forcing walk when Stamina is switched off by script (http://feedback.arma...ew.php?id=26727)
well, ok
Thanks for the suggestion mate, I'll do a test today. Either way, I'll have to test for both conditions in my anti-VDM script in the future. Maybe people just have better computers nowadays, that's why it never used to be an issue?
IME attempting to get good information out of HandleDamage has always been a disaster :P
Heya all, does someone know how to enable the full debug mode on ACE3, so stuff writes logs?
not only performance, but mod methodology. Nowadays there is a lot of hacky solutions to very niche problems that people have done and decide to sacrifice in order to get their desired effects for the mods. Geometry, phyxs, fireGeo. All that kind of situations are never up to standard equally done, like with default game/cdlcs/dlcs assets
You have to define
#define DEBUG_MODE_FULL
In main's script mod. If you are using a fork, it should just be commented out by default.
Just do a repository search
After some testing I found some interesting results, The forward and backwards diving animations DO move you, However the up and down do not.
Just log the whole EH
_log = str (_this apply {if(_x isEqualType objNull) then {format ["%1 (%2)", _x, typeOf _x]} else {_x}});
to log whole array, also class for entities
because vehicle name can be misleading
CtrlSetText [1000, str (_array select 0)]; CtrlSetText [1001, str (_array select 1)]; CtrlSetText [1002, str (_array select 2)]; this goes on for a few more lines. Is it possible to condense this so itβs not so repetitive?
Also Iβm typing on my phone currently so the format maybe wonky
yes
ctrlSetText [1000, str (_array select 0)];
ctrlSetText [1001, str (_array select 1)];
ctrlSetText [1002, str (_array select 2)];
```converted to```sqf
{
ctrlSetText [1000 + _forEachIndex, str _x];
} forEach _array;
This rocks thank you!
Can I get help with a script? http://pastebin.com/raw.php?i=NTJesBxN The intention is to have the player attach to the vehicle (crouched) in the gunner position when they press the c key, and then return to manning the gun when they press it again
The behavior now is when I press C, i seem to attach for a second and then move below the vehicle under the ground
the detach isnt working unless i do it manually with the debug console
Hey, again thanks for trying to assist me.
I've fixed my issue, I simply just check for both conditions. Player A and player B always get different results, but each player always gets the same result they had last time.
I couldn't find anything about it, but could playing on the 'profiling branch' change something here? That was a difference between player A and player B.
That's possible, yes. It only takes a couple of minutes to switch branches, so it's easy to test.
Anyone able to help me spot the issue with my script here? I'm trying to come up with a means to make this main menu song play, but externally i have a button which acts as a mute feature, to change the profilenamespace var to interupt and stop the song, but its not stopping, its repeating it.
stop button
_var = profileNameSpace getVariable ["mutedmaintheme",0];
if (_var isEqualTo 1) then {
profileNameSpace setVariable ["mutedmaintheme",0];
playsound "additemok";
//playmusic "";
1 fadeSound 1;
enableEnvironment [true, true];
saveProfileNamespace;
};
if (_var isEqualTo 0) then {
profileNameSpace setVariable ["mutedmaintheme",1];
playsound "additemfailed";
//playmusic "slay_intro";
stopSound the_sound;
1 fadeSound 0;
enableEnvironment [false, false];
saveProfileNamespace;
};
intro script
the_sound = nil;
while {true} do
{
_value = (profileNameSpace getVariable ["mutedmaintheme",0]);
if ((profileNameSpace getVariable ["mutedmaintheme",0]) isEqualTo 0) then {
the_sound = playSoundUI ["IFA3WARMod_client\video\slay_intro.ogg", 0.5, 2.0];
//publicVariable the_sound;
1 fadeSound 0;
enableEnvironment [false, false];
waitUntil { (soundParams the_sound isEqualTo []) || ((profileNameSpace getVariable ["mutedmaintheme",0]) isEqualTo 1) };
stopSound the_sound;
} else {
sleep 5;
};
};
I'm using playSoundUI to bypass the music volume mixer.
Is there any script like disable anim so that the injured soldier doesn't drag his legs and runs normally?
would this be an effective way to pause a script if no players are connected to server? waitUntil {sleep 1; (count call BIS_fnc_listPlayers) > 0}; or would there be a better way?
@terse tinsel You mean without actually healing the guy?
yes maet
can yu help me ?
I don't know a way. You can force an animation but if you want them to otherwise act normally then the sensible way is to heal the hitpoint.
ok but thx
the thing is that sometimes the ai commander gives the order to heal other ai and it annoys me, and is it possible to make the ai in the group heal themselves without receiving the order to heal himself?
Not sure what you're asking. This is a scripting channel. You can just script-order them to heal themselves.
That's what I mean, and what should this script look like?
The eventual command is _unit action ["HealSoldierSelf", _unit];
But you'd want some sort of monitor loop to manage it.
ok, understeand Thx dude π
Unfortunately, this did not help me, if anyone knows how to write a script that would prevent the AI from animating the injured person, please help
disableAI?
not entirely, I mean to disable only the injured animation for ai, but I don't see it in disable ai π¦
Wait, do you mean limping?
Then I don't think there is. Also you can just edit your typo not spam Enter
OK, thank you . Could you help me edit this script so that the unit receives actions in the script when it is wounded and does not have to wait for the commander's order? something like this but for one ai [] spawn { while {sleep 1; alive medic_1} do {{ if (damage _x *symbol of greater than 0) then { medic_1 action ["healsoldier", _x]}} forEach units team_1}}
!code
```sqf
// your code here
hint "good!";
```
β
// your code here
hint "good!";
And no, I can't help with a complex one ASAP
ok, thank you and best regards
well BIS_fnc_lerp isn't as exciting as i'd hoped
does anyone know how to do this without needing this script? I'm trying to make this one singular chair rotate while it floats and I can't seem to find ANYTHING to help me do it
https://steamcommunity.com/sharedfiles/filedetails/?id=1387052380
(the chair in question)
I would use the script but 1: it only works on Altis and im using a different map 2: either the script is broken or im stupid cause i cant find the .sqf or the mission to load that scenario
Is you mission MP?
if you're asking will the mission im using the chair on will be MP then yes. I'm trying to make an SCP short film using Arma
nah i just need it to float and rotate. its just to make the scene look a little more ominous
Will you have lots of such objects?
Having it smooth is MP could be somewhat difficult π€
Probably gonna need a fake local version created on each client or something
that should be fine because it wont be like super focused on in the film its just something to make the scene look a bit spooky
does anyone have an idea how to make a bu a script out of it and if it gets 0.5 injuries, autoheal is turned on?? {{ if (damage _x > 0) then { this action ["healsoldier", _x]}}
private _real = this;
_real enableSimulation false;
_real hideObject true;
private _fake = createVehicleLocal [typeOf _real, ASLtoAGL getPosASL _real, [], 0, "CAN_COLLIDE"];
_fake setVectorDirAndUp [vectorDir _real, vectorUp _real];
_fake setPosWorld getPosWorld _real;
_fake enableSimulation false;
addMissionEventHandler ["EachFrame", {
_thisArgs params ["_real", "_obj", "_pos", "_vdir", "_vup"];
if(isNull _real) exitWith {
deleteVehicle _obj;
removeMissionEventHandler [_thisEvent, _thisEventHandler];
};
private _z_period = 3;
private _z_amplitude = 1;
private _z_offset = sin(serverTime % _z_period / _z_period * 360) * _z_amplitude / 2;
_obj setPosWorld (_pos vectorAdd [0, 0, _z_offset]);
private _rot_period = 5;
private _rot_angle = serverTime % _rot_period / _rot_period * 360;
private _rot_vdir = [_vdir, _rot_angle, 2] call BIS_fnc_rotateVector3D;
private _rot_vup = [_vup, _rot_angle, 2] call BIS_fnc_rotateVector3D;
_obj setVectorDirAndUp [_rot_vdir, _rot_vup];
}, [_real, _fake, getPosWorld _fake, vectorDir _fake, vectorUp _fake]];
Wrote this script for you, add into init field of object you want to float
thank you so much!
_z_period is how many seconds it takes for object to do full up&down float, _z_amplitude is how long full up&down float takes, _rot_period is how long it takes to do 360 rotation
howd you make the message look like that btw?
!code
```sqf
// your code here
hint "good!";
```
β
// your code here
hint "good!";
Just tested it, MP compatible
Object is not interatible though, some restrictions apply (like you can't delete it)
restrictions can be bypassed though, depending on what you need
Actually, let me improve it so its at least deleteable
Done, now it can be deleted
Thank you so much! Also I may have one more favor to ask but I will DM you it. Is that okay?
If its script related ask here so others can find it
well i also need a specialized mod for the film. I dont want to go too much into detail in a public forum but there are mods that already exist that do what i need i just need certain paramaters changed and i can't read code nor do i really know how to write it
i can do retextures but thats about it
Sorry, can't help, you'll need to learn it
would you happen to know what channel i could ask for help in?
i do not have the time to learn code just for this short film
thank you
@meager granite how would i make the chair rotate slower and just rotate without moving up and down?
i assume it would be changing the " private _rot_period = 5;" to a higher number?
Yes
_z_amplitude to 0 to stop it from floating up and down
or to very small number for slight movement
Or increase _z_period to large value so it move very slowly
period is in seconds
okay cool cool and then is there a way to get it to rotate up and down too or no?
so if the rot_period is the blue is there a way to rotate the red and maybe even green?
if not no worries just curious
Right now it rotates around global Z axis
So yeah, blue handle
Its possible, just needs more code
i'd hate to ask you to do more work but if you wouldnt mind it would be amazing
private _rot_vdir = [_vdir, _rot_angle, 2] call BIS_fnc_rotateVector3D;
private _rot_vup = [_vup, _rot_angle, 2] call BIS_fnc_rotateVector3D;
```Change `2` to `1` or `0` in both functions here and see what happens
it will rotate around different axis but also do full 360 rotation
Yeah, its rotation by single axis right now
ah would i just copy the rotation code to make it rotate on another axis then?
you'll also need to change variables
private _rot_period = 5;
private _rot_angle = serverTime % _rot_period / _rot_period * 360;
private _rot_vdir = [_vdir, _rot_angle, 2] call BIS_fnc_rotateVector3D;
private _rot_vup = [_vup, _rot_angle, 2] call BIS_fnc_rotateVector3D;
to
private _rot_period = 5;
private _rot_angle = serverTime % _rot_period / _rot_period * 360;
private _rot_vdir = [_vdir, _rot_angle, 2] call BIS_fnc_rotateVector3D;
private _rot_vup = [_vup, _rot_angle, 2] call BIS_fnc_rotateVector3D;
_rot_vdir = [_rot_vdir, _rot_angle, 1] call BIS_fnc_rotateVector3D;
_rot_vup = [_rot_vup, _rot_angle, 1] call BIS_fnc_rotateVector3D;
```first rotates by Z axis, then by Y axis
it uses same angle for both though
if you want another rate of rotation you'll need new _rot_angle for another axis
private _rot_x_period = 1;
private _rot_x_angle = serverTime % _rot_x_period / _rot_x_period * 360;
private _rot_vdir = [_vdir, _rot_x_angle, 0] call BIS_fnc_rotateVector3D;
private _rot_vup = [_vup, _rot_x_angle, 0] call BIS_fnc_rotateVector3D;
private _rot_y_period = 3;
private _rot_y_angle = serverTime % _rot_y_period / _rot_y_period * 360;
_rot_vdir = [_rot_vdir, _rot_y_angle, 1] call BIS_fnc_rotateVector3D;
_rot_vup = [_rot_vup, _rot_y_angle, 1] call BIS_fnc_rotateVector3D;
private _rot_z_period = 5;
private _rot_z_angle = serverTime % _rot_z_period / _rot_z_period * 360;
_rot_vdir = [_rot_vdir, _rot_z_angle, 2] call BIS_fnc_rotateVector3D;
_rot_vup = [_rot_vup, _rot_z_angle, 2] call BIS_fnc_rotateVector3D;
_obj setVectorDirAndUp [_rot_vdir, _rot_vup];
periodical rotation by all 3 axis
pendulum like rotation gonna need different code
this is full 360 around axis rotation
i think just z and x might look best sorry
i just finally got it to load and see how it looked
the y rotation makes it look a bit odd but a do really appreciate all your help!
private _real = this;
_real enableSimulation false;
_real hideObject true;
private _fake = createVehicleLocal [typeOf _real, ASLtoAGL getPosASL _real, [], 0, "CAN_COLLIDE"];
_fake setVectorDirAndUp [vectorDir _real, vectorUp _real];
_fake setPosWorld getPosWorld _real;
_fake enableSimulation false;
addMissionEventHandler ["EachFrame", {
_thisArgs params ["_real", "_obj", "_pos", "_vdir", "_vup"];
if(isNull _real) exitWith {
deleteVehicle _obj;
removeMissionEventHandler [_thisEvent, _thisEventHandler];
};
private _z_period = 3;
private _z_amplitude = 0.25;
private _z_offset = sin(serverTime % _z_period / _z_period * 360) * _z_amplitude / 2;
_obj setPosWorld (_pos vectorAdd [0, 0, _z_offset]);
private _rot_x_period = 15;
private _rot_x_angle = if(_rot_x_period != 0) then {serverTime % _rot_x_period / _rot_x_period * 360} else {0};
private _rot_vdir = [_vdir, _rot_x_angle, 0] call BIS_fnc_rotateVector3D;
private _rot_vup = [_vup, _rot_x_angle, 0] call BIS_fnc_rotateVector3D;
private _rot_y_period = 15;
private _rot_y_angle = if(_rot_y_period != 0) then {serverTime % _rot_y_period / _rot_y_period * 360} else {0};
_rot_vdir = [_rot_vdir, _rot_y_angle, 1] call BIS_fnc_rotateVector3D;
_rot_vup = [_rot_vup, _rot_y_angle, 1] call BIS_fnc_rotateVector3D;
private _rot_z_period = 15;
private _rot_z_angle = if(_rot_z_period != 0) then {serverTime % _rot_z_period / _rot_z_period * 360} else {0};
_rot_vdir = [_rot_vdir, _rot_z_angle, 2] call BIS_fnc_rotateVector3D;
_rot_vup = [_rot_vup, _rot_z_angle, 2] call BIS_fnc_rotateVector3D;
_obj setVectorDirAndUp [_rot_vdir, _rot_vup];
}, [_real, _fake, getPosWorld _fake, vectorDir _fake, vectorUp _fake]];
that would be the final product then yeah?
yeah
Just tried it, doesn't support 0 period for no rotation
@agile pumice you have if (_vcl == player) exitwith {}; - after player gets out the first time, vehicle player will be equal to player and thus the code is exitWith'ed right there when executed a second time
Change rotation angle to these lines
private _rot_x_angle = if(_rot_x_period != 0) then {serverTime % _rot_x_period / _rot_x_period * 360} else {0};
private _rot_y_angle = if(_rot_y_period != 0) then {serverTime % _rot_y_period / _rot_y_period * 360} else {0};
private _rot_z_angle = if(_rot_z_period != 0) then {serverTime % _rot_z_period / _rot_z_period * 360} else {0};
updated and took out the y cause i forgot to earlier
You could've just set _rot_y_period to 0 so it doesn't rotate
oh duh sorry im stupid
so in case you'll need different rotation in another object when you'll copy the script there
fair
okay so like that then but for the chair just set _rot_y_period to 0 so it doesnt rotate on y
Yes
it looks like its still rotating on the y axis but i might just be dumb
It rotates the object by global axis, not object axis, so you end up with rotation also being applied on Y axis
ah i see thats fine then im not too worried about it
If you don't want your chair upside down you probably wanted pendulum-like rotation for X and Y
_rot_x_angle formula needs to be changed
private _rot_x_period = 1;
private _rot_x_amplitude = 45;
private _rot_x_angle = if(_rot_x_period != 0) then {sin(serverTime % _rot_x_period / _rot_x_period * 360) * _rot_x_amplitude} else {0};
private _rot_vdir = [_vdir, _rot_x_angle, 0] call BIS_fnc_rotateVector3D;
private _rot_vup = [_vup, _rot_x_angle, 0] call BIS_fnc_rotateVector3D;
private _rot_y_period = 0;
private _rot_y_amplitude = 45;
private _rot_y_angle = if(_rot_y_period != 0) then {sin(serverTime % _rot_y_period / _rot_y_period * 360) * _rot_y_amplitude} else {0};
_rot_vdir = [_rot_vdir, _rot_y_angle, 1] call BIS_fnc_rotateVector3D;
_rot_vup = [_rot_vup, _rot_y_angle, 1] call BIS_fnc_rotateVector3D;
private _rot_z_period = 15;
private _rot_z_angle = if(_rot_z_period != 0) then {serverTime % _rot_z_period / _rot_z_period * 360} else {0};
_rot_vdir = [_rot_vdir, _rot_z_angle, 2] call BIS_fnc_rotateVector3D;
_rot_vup = [_rot_vup, _rot_z_angle, 2] call BIS_fnc_rotateVector3D;
X and Y are now pendulum rotations instead of 360 around axis rotations
private _rot_x_period = 1;
private _rot_x_amplitude = 45;
``` is 1 second for full back and forth -45 to 45 degrees swing
i would try and confirm i have the whole thing right but i would need nitro for that XD
i assume that if i change the number of the amplitude it would go to whatever the number is back and forth right? so likeif i changed it to 15 it would swing from -15 to 15 just like you said with the -45 to 45?
Yes
cool cool just wanted to be sure
And period is time for full swing both sides
π
hell yeah dude this is awesome!
Try adding very slight Y pendulum rotation too, might make it even better
good point, changing the line to read: if (_vcl == player && (isNull (attachedTo player))) exitwith {}; fixes the detach issue, but the player isnt put back in the gunner with the line below
ouuu yeah it looks pretty good one sec im gonna add some sound design to it real quick and see how it sounds with ti
this isnt how the film will look like at all but just as a spoiler i think its pretty decent
@meager granite do you have a youtube or something you'd like to be mentioned in the credits of the film for the help?
I do but its not Arma related
thats about all I can offer at the moment this is an extremely low budget film lol
thats fine
Just credit my nickname somewhere, should be enough
In the credits of the film i'll just put
"Floating Chair Script by Sa-Matra"
does that work?
π
thank you so much for your help i really do appreciate it!
will also put a thank you in the spoiler im posting
problem solved, if someone needs it, it looks like this aUnit addEventHandler ["Hit", {
params["_target"];
_target setHitPointDamage ["hitLegs",0];
}];
BIS_fnc_lerp is the sqf function isn't it?
not as exciting as you'd hoped? what exactly did you expect π
Good day. Quick question, if we do
object setVariable ["%VARNAME%",%VALUE%,true];
several times. Does it add to JIP or replace? Concern is whether or not we bloat JIP queue by doing that.
Not 100% sure but you could monitor the JIP queue to find out
I would imagine it will replace but yeah not 100%
replace
(but I take %VALUE% is not a valid variable name π)
Thank you @flint topaz @winter rose . Tested with
exportJIPMessages ""
It is indeed replacing the value in JIP (at least not increasing the queue, that's for sure)
Hello, can somebidy tell me how to see in realtime the camo coef and alert level of opford in editor? I need to test some mod regarding dinamic camo
player getUnitTrait "camouflageCoef"; ?
excitement
ok and how to know alert level?
dunno
Hello, quick question, is there any easy-to-use method for moving pop-up targets? Note that it needs to blend into a regular mission and as such can not use a Firing Drill module.
Herroh I am come to let you peeps double check my work π , I'm working on turning my camera intro (see above ^) from the global exec mess it is currently into an initPlayerLocal script, I've gotten to this script thus far and it seems to be working when I test it on a locally hosted server but I havent tried a dedi one yet
If you have any tips for improvements / spot problems please do tell

initplayerlocal.sqf:
[] spawn
{
//switch to cam, start cinematic borders
[intro_camera, "INTERNAL"] remoteExec ["switchCamera"];
//[0, 0] remoteExec ["BIS_fnc_cinemaBorder"];
//enable AAN news borders
[
parseText "<t size='2'>New high in rising tensions between NATO and CSAT</t><br/>
<t size='1'>Mathew McMath reporting live from Malden </t>",
parseText "--- CSAT rumoured to be breaching Mediterranean Arms Reduction treaty --- NATO politician Aron Swartz calling for combat readying of an intervention task force"
] spawn BIS_fnc_AAN;
//start timeline
[into_timeline] remoteExec ["BIS_fnc_timeline_play"];
//wait for duration
sleep 10;
//when done switch back camera to player, end cinematic borders
[player, "INTERNAL"] remoteExec ["switchCamera"];
//delete AAN UI
(uiNamespace getVariable "BIS_AAN") closeDisplay 1;
};
Actually, no. After some investigation it is very hardcoded (well sort of) into a3\modules_f_beta\FiringDrills\functions\fn_moduleFDCPIn.fsm and the code is, well, very dated. I would write one instead if I want one
Understood, thanks. Any point in making a feature request in the feedback tracker?
Handy to have I guess, but not sure it's worth it of official implementation nowadays
Alrighty, thanks anyways, POLPOX.
and how to see this value in realtime while playing?
do a while loop and have it written to a systemchat or a hint
while {true} do
{
systemChat str (_someUnit getUnitTrait "camouflageCoef");
sleep 0.5;
};
or something of that style
onEachFrame {
hintSilent format ["Player Camo: %1\nEnemy behaviour: %2", player getUnitTrait "camouflageCoef", combatBehaviour zeEnemy];
};
```:p
ok so writing this in editor I will see in my screen while playing/testing?
sorry but I'm not expert on this
have this should be great + camocoef
that very specific info, are you testing ReEngine?
yes
good mod, you can sneak up to like 1m with that enabled
can you help me to have the correct sript in order to see this info?
or some of this . I'm interesting to see camocoef, distance, knowsabout, spot distance, behaviour
I believe that comes integrates in the mod, it might be a debug function. You might have to ask in the workshop entry
I think becouse you are putting this code in initPlayerLocal you dont need to remoteExec.
Oh right good call, thats a wrong copy paste 
need the code below the "add" hint to work tho :(
oh i think i see whats happening
_animation and _weapons is being overwritten when i dont want them to be
yeah i guess linear interpolation is pretty exciting :D
dude i got excited for pushBack and params, must live a sad life
Having some problem setting up my macros. I keep getting this error on start up. I'm using an #include in my config.cpp from a different pbo with, as far as I can tell, correct paths.
#define SETPOS(CONTROL,SELECTOR)\
(_ui displayCtrl CONTROL) ctrlSetPosition [_pos # SELECTOR # 0, _pos # SELECTOR # 1]; \
(_ui displayCtrl CONTROL) ctrlCommit 0```
This is the macro
You might need a ; after ctrlCommit 0.
Alternatively, using a macro with the same name as a command (setPos) might be freaking it out.
Ah, alright, I'll look into that, thank you for the swift reply.
setText is also a command name so if it is the name that's doing it, you'll have the same issue there
Doesn't seem to have helped, I'm afraid.
I did too haha
The script error would show the post-preprocessed text
either that script wasn't preprocessed at all, or it didn't detect that your macro exists
Also the error is in a .sqf. You said you ahve the include in a config.cpp
Correct, I am very new to macro usage so still getting the lay of the land so to speak. I've tried putting the #include in the .sqf files and got this error:
path is wrong
I think I'd expect a leading backslash
Also make sure the .hpp file is packed into the PBO
some pbo packing tools might exclude .hpp files by default
yes you need the include inside the .sqf file
Understood, I'll look into it, thank you Dedmen.
also there is a leading backslash in the code file, so no idea why it doesn't show up in the error message.
might be an error in the error message box thing
Forgive my ignorance, but how do I make sure it gets preprocessed?
I would suggest hemtt if you are gonna be using the cba system
it depends on how the script is loaded.
with compileScript command usually. If you use the cba setup then it'll already be us.. Actually it is preprocessed
If you get include file not found error, that means its being preprocessed
I think I managed to figure out what the problem was:
- pboProject excluded
.hpp. - I used
#in place ofselectin my macro.
jup that sounds right
That would be it, works flawlessly now, thank you for your patience.
Is there a way to make a custom chat channel that scripts can talk in but players can't?
For like, say, an "intercepted" transmission stream.
Add the players to the channel with radioChannelAdd, then use enableChannel to prevent them from talking in it
need the me and my AI group that are falling from the sky (freak phenomenon) to have parachutes once they hit a trigger, and then once they land they get their original backpack and its custom contents back
Here's the completed code for anyone interested
works best with vanilla technicals
Helloh, is the post processing effect or ui overlay etc. to add a vignette to the users ingame view?
I know arma can do it in the main menu, but couldnt figure out how
both can do it, but for a static vignette I would recommend ui overlay
π , any chance you have the command to enable those in your head (or a link to the wiki π )? I only know the way of enabling them via trigger
I don't want you to enable those in my head!
https://community.bistudio.com/wiki/createDisplay#Example_2 creates a "RscDisplayEmpty" that has a smol vignette
if you want the big vignette from main menu, lemme see
(if it isn't BIS_fnc_initWorldScene⦠lemme confirm)
I think thats what it said on the wiki, I dont want the full fnc executed though I think
you could check the function's code (if that's the one)
how I do dat 
Functions Viewer?
Or put the function name into a watchfield of the debug console and hit enter.
It will then show the code in the watchfield, then just copy it into Notepad etc^^
Huh interesting, apparently it just uses a color correction
oh, I thought it was a RscDisplay for this one
then yep, PPEffects it is! ^^
"colorCorrections" ppEffectAdjust [1,1,0,[0,0,0,0],[0,0,0,0.24],[1,1,1,0],[0.7,0.7,0,0,-0.1,0.4,0.8]];
"colorCorrections" ppEffectEnable TRUE;
"colorCorrections" ppEffectCommit 0;
that the code from the fnc

it wΓΆrk
it gives a very good "close photograph flash / lighting"
I'll write you one when I'm done watching Avatar.
Mr MMM on Malden π
uuhhh wut

You spotted it
man's also good at math
The last air bender
π€·πΏββοΈ
I'll write you what you need. Just acknowledging your question before it gets buried.
so many numbers 
optional numbers ^^
hey, that's not the (un)official Dark Theme!
using Dark Reader? π
Yeep dark reader, works pretty well on most of the wiki
also I'm not sure what I expected, but here's a vignette at max radius (as much as possible)
or well min radius I guess?
(if needed)
but yeah.. not sure what else I was expecting
uuh nice 
thanx
Dark Reader's SQF highlight is quite OK actually
but man is Enforce Script an eye murder xD
True π
I feel like a big boy mission maker now, using keyframe anims, cameras, inits, initplayerlocals, etc π
And fake light cones of course
very noice! I don't use keyframe anims, I think I tried once or twice and didn't figure it out π u gud!
they can be finnicky to work with and annoying, but once you know how to use them right they're quite nice
for example the timeline has a built in feature to 'play at start', which apparently just doesnt work correctly, and so on
theres a good bit of stuff like that
and when you have a few curve keys your game can really slow down when selecting/moving it at all, since the keyframe path preview is re-rendered for each frame
Here's the mission intro I learned keyframes for fyi https://cdn.discordapp.com/attachments/602610392220565505/1212591942463131708/2024-02-29_03-42-24.mp4?ex=65fb9fbf&is=65e92abf&hm=5af59a1eb45336a5fcc03eab48909cf197fd6f51e658a9e736bcfaef7c242451&
you know, that cutscene could use a vignette π
waaaaaait you can roll a camera with keyframe anims?? :)
you have complete 3-axis control as with any object
the keyframe path adjusts to whatever the curve key is rotated to
if you want I can throw you that mission file over in a bit, its got a fair few mods on it but since the keyframes are vanilla they should force-load fine I think
maybe I will practice myself a bit later, it's been ages since I worked on an A3 mission
but thanks and kudos!
There's a nifty german tutorial on it that helped me a good bit, not sure how good it'd be for you though π
also have fun encountering camera bugs, if you place it and your own camera gets stuck to the ground whats worked for me is deleting it and completely save/loading the mission file, sometimes even had to exit and reenter the 3den editor
where is that boat from i keep forgetting
You mean the MV Default Arma 3 Trawler?
Yeah thats just the β vanilla arma 3 trawler β π
meh ...
anybody got some fancy ideas for some insurgency algo?
currently writing some in OOS and not sure which way i should take thus would like to hear yours
https://github.com/X39/XInsurgency/blob/OOS_Insurgency/InsurgencyModule/src/X39/Insurgency/Square.oos
its more or less just how i should handle the different buildings etc.
I love scripting with things that have color attributes
accidentally turned the alpha for a 3d icon to 0 and have been trying to figure out for 10 minutes why it isnt showing up
Is there a way to play a non-positional, non-UI sound, with pitch/volume parameters?
playSound3D has the parameters, but it's positional.
playSoundUI has the parameters, but it uses the UI volume channel.
playSound is non-positional and uses the Effects channel, but it doesn't have the parameters.
Oh, I see playSoundUI has an isEffect override. What an awkward way of doing it π€
You don't need to use a trigger, you can just use a height over land. And if you create a already floating parachute and move them in it, you don't have to do any backpack item saving (no need to remove backpack) as well as not having to do any ground checks since the parachute will automatically remove itself.
Most of my stuff works, one problem though
for the big keyframe animation if I try to just call it in the initplayerlocal it doesnt seem to work at all, the camera only moves to a somewhat random spot and then not at all
If I remote exec it in the initplayerlocal it does work, however the first few seconds of it are quite glitchy which isnt great, I'd also like to avoid remoteexecing stuff if possible π
Anyone have an idea?
Ah throwing it in initServer seems to have done the trick, even if its a little wobbly 
Ok now I just gotta figure out why my showHUD [false,false,false,false,false,false,false,false]; in initPlayerLocal isnt working in dedicated server mp
If someone has an idea let me know π
Client is not fully init yet something-something
Add waitUntil {!isNull findDisplay 46}?
Ooh yeah that could be it, I'll try that
thanku
Some for camera probably?
everything else seems to be working more or less properly
just showHud/showChat dont work
but I think I'll leave trying the waituntil and further troubleshooting on that for tomorrow, been at this for 6+ hours now and need a break π
Thnx, I'll test it out
where do i put this ingame? And also will it respawn my original backpack once i land
what's the best way to do a horizontal list box in a ui?
is it possible somehow? can't find anything useful from googling
dont think so
its not rly a common UI element tbh
closest you could ever get would be a tab
tab or table?
tab
tabcontrol or something like that
not sure if something like that exists in arma though
I made some assumptions, that you know when the units will be falling. When are you putting the units in the air?
They start in the air and the chute opens when they are close to the ground, maybe 100m above ground
god damn i hate making ui's in this engine
its fairly simple tbh ^^
simple if you don't mind it looking shit yeah
gets even more simple if you use objective systems
what's your workflow for ui's? gui editor?
configs
and ages of rage
even more then i tend to do in here
placing will be done with the ArmA ingame UI editor thingy
which is broken like shit
however, new UIs will be created dynamically by me
using OOS
((OOs mainly to make creating them easier :P))
Please post that in #arma3_feedback_tracker
That function was added recently..perhaps it can still be updated.
that sounds like even more hassle tbh
not rly
less commands
more ui
but busy right now
can go into detail later in private talk
as its kinda ot
fuck configs, ctrlCreate for life
shit is so much nicer to use than configs
only time you need configs is when you need to tweak a base class
other than it is fucking easy mode, just close the display and reopen it with new code and voila, you can make dialogs in no time... no mission restarts, no game restarts
fucking pants on head easy
the reason why object oriented scripting stuff like yours and mine @grizzled cliff are helpfull for UIs is also kinda funny :P
you can create new UI elements and implement em properly