#arma3_scripting
1 messages · Page 251 of 1
The first time I was in a zeus mission, I was killed by artillery. He defending using it, because we didn't move enough
want to increase network traffic ? enable remoteExec whitelisting while blocking arsenal
enjoy the desync / crashes
Using anything made by BIS hue hue hue
we are stuck with that I guess
cough mars cough cough
cough tmf cough
At least KK is doing a good job on fixing the function library. < imo
Da.
yup
Still no fucking createNamespace
there is head
and ragdoll mode command
locations 😄
throws sand into @lone glade eyes
not allowing people to carry RPGs + sniper rifles and ghillie suits isn't the wrong direction tbh
I never saw what he did
dunno, I made the limitations quite fair, he probably changed them
oh yeah I disabled people using MOS / SOS without being marksman
it stops people from camping on hills
sounds reasonable tbh
Pfft, i have full platoon loadouts with TMF
restricting sniper scopes, ghillies and at + sniper doesn't sound bad
but you can easily go too far with restrictions
@tough abyss what zeus thing? not ares?
are you just talking about public zeus sessions he hosts?
¯_(ツ)_/¯
Player control is the utmost form of gameplay marsheling ;)
You let people take what they want, they take nice long range scopes and sit out 1 km from the object snipeing stupid AI that just go prone
until they wake up and end you with a perfect headshot
;)
that is why I took them from most of them
and removed fucking thermals
you cannot believe how much teamkilling is going on with those
i do know..
@tough abyss what zeus thing? not ares?
ok then. that answers it.
lol
does ACE have me?
go hide 😛
of course not
nah
because they can't see it in arsenal
I remove all the items then rebuild it without the blacklisted stuff
yep
there's a check when you exit arsenal to remove what you shouldn't have if you managed somehow to get a hold of it
slowest run speed
waiving your gun like a flag
sounds like 14 year olds
It's a shame BIs new fatigue system doesnt punish this more
true that
adding zeus style points to arsenal items might be interesting
choose a loadout within n points
Oh god no
there's already that one guy using a hunter filled with ammo raping AOs
players will find ways around it indeed
yeah , make a server and let the players buy the biggest gun/backpack/thermals
there are people dumb enough to fall for this scheme
isn't that illegal ?
its not allowed under BIs monetization scheme
but would buying additional points for the whole equippment be illeagl too?
that's the wrong crowd playing arma 3
1.5x movement speed does sound like it could be fun though
would be weird, the anims would just be sped up
now someone implement bunny hops
alganthe, I'm fairly sure that jumping is a ACE thing
gimme a sec going to check the action
And that jumping is not what I mean with bunny hoping
oooh 😦
_unit setPosASL getPosASL _unit ?
oh, how to get someone into that anim
yeah, it's hard coded
some loop internally does handle this
it also has bugs where you are stuck with it on the ground and can't die nor move
Make a animation that cannot transition into freefalling
not localized, 3/10
You thought I would bother localizing ? what do you think I am ? A chinese dev ? :troll:
I thought the French hated the English
I hate the french as much as the english
living near paris might do that to people
I heard if you smile in the metro you get a ticket
Parisians are the most stuck up, unhappy people ever
seeing a smile is abnormal there
now back on subject: that action works at any height, you just go sploosh if you open too late
well, or you are stuck
oh, fuck trees
got so many prowler dropped getting stuck in those on tanoa
you don't, you pray that the players on the ground are good at shooting ropes
does that actually work? no way
I dream of proper tank physx
reminds me of the spaghetti monster me and baer created when testing ace fastroping
pls rate/no bully: bug_out = { sleep 0.5; player switchMove "HubStandingUB_idle1"; sleep 0.5; player switchMove ""; }; player addEventHandler [ "AnimChanged", { _alt_player_pos = getPosATL player; _alt_z = _alt_player_pos select 2; _alt_high_enough = _alt_z > 150; _anim = _this select 1; _is_anim = [ "HaloFreeFall", _anim, false ] call BIS_fnc_inString; if ( _alt_high_enough && { _is_anim } ) then { [] spawn bug_out; }; } ];
no private and uses BIS functions 2/10
^ same as commy
posted in Discord. 1.5/10
lol
- use of sleep and switchMove being local in MP
I know it works. used in a mission years ago.
it's local
Oh, and using
blablabla {
instead of
blablabla
{
-1 Point
BURN DSCHA
here we go
pfft we all have formatting quirks
triggered
it's not a quirk, it's the right way to do it
like soft tabs haven't won already 😄
Rememeber: Delete every Space/Tab and make the Script a 1liner!!!111oneoneone
WHICH DOES OBFUSCATE IT TOO
OMG SUCH EFFICIENCY
no, but more seriously it's more readable for a human
Having good laugh atm, thx guys o7
and it folds properly on editors
tru. although the autism makes me more machine than man.
The downside of having the curly in the same line is just: Its not clear, where the "scope" starts. I just can't read that type of code.
for me the additional indentation is enough
if () then {
// stuff
if () then {
// stuff
};
};
it's all fine and dandy @jade abyss when it's only 3~4 scopes
for configs you have sometimes 10 of them and the indentation becomes scary
Yeah
that is a different problem though. 3den configs are sub class hell
[{}] <- ?
omfg
it is what the else command expands too
erm... meh
yeah, don't use it
looks bad, feels bad, must be bad.
just like for ARRAY
Wut?
or any of the javascript commands
what kind of torturing is that?
for [{_i=1},{_i<=10},{_i=_i+1}] do {};
for forspec
Never used it (never had to)
I love that privating is "recommended" on the for forspec wiki page but the command doesn't do it for for do
Its also trendy to smoke weed these days, doesn't mean anybody else have to do it.
never had a problem not using private
trust me, you have to
opec, the problems come when you make more complex stuff
it's a bad habbit to not use it
I spent an afternoon learning why 😛
I make complex stuff
after my var changed 6 scopes and 2 calls in
btw. anybody else got Warning Message: No entry 'bin\config.bin/CfgWeapons.'. when a player joins a game? (pure Vanilla)
fish AI and I think the feedback fsm does some spawns too
sooo muuuuch
let's not forget fog values being jacked up by a ridiculous number on tanoa
0.03 fog on tanoa looks like 0.5 on altis
unrelated alganthe. we now it triggers you
what's it called?
i know camera.sqs is still a thing
hmm
on mission start?
that would be init.sqs
same as init.sqf. runs after that one command
runInitScripts (?). Done in initFunctions.sqf
have a mode to made a array with pos and name to a foreach for create map map markers? i want to create a script like wasteland gunstores
what does your array look like?
{createMarker _x} forEach [ ["name1",[0,0,0]] , ["name2",[1,1,1]] ];
thnks, i think work. 😃
sooooo, anyone knew about this ? https://community.bistudio.com/wiki/Arma_3:_Event_Handlers/addMissionEventHandler#TeamSwitch
yes
teamSwitch != selectPlayer
I think teamSwitch is broken. Or it isn't meant to work in MP
Might trigger in missions with group respawn
_markerName = _x select 0;
_markerPoss = _x select 1;
_marker = createMarkerLocal [_markerName, _markerPoss];
correct?
_x params ["_markerName","_markerPos"];
the array after createMarkerLocal is identical to _x
so you can just feed _x into createMarkerLocal
My admin menu im working on do work like its supposed to in SP but in MP its not working as intended. http://pastebin.com/XvH9rj0r
Line 9 man
@hearty shoal use your player id
Yeah forgot to add that i took out my userid and all others thats allowed to use the menu
So on the server theres supposed to be more userIDs in there.
right so where are you executing this code?
@nocturne bluff nice, thanks.
through a displayevent. The user press F2 and this function gets spawned
@indigo snow very true
@hearty shoal and how are you adding the displayEvent? essentially: are you sure your code runs on your client(s)?
Im using this in initPlayerLocal: ```waituntil {!isnull (finddisplay 46)};
[] spawn { (findDisplay 46) displayAddEventHandler["KeyDown","_this spawn core_fnc_keysPressed"]; };
what i'd suggest is:
run a debug line (e.g. a hint or diag_log) to check if the code is actually running
if yes, the error will probably be in the if statement. Check if all the returns and values are what you expect them to be
Actually i think i know the problem now :P. If i click one of the buttons i set the global var to true. And if another player press a button he change the var to false.
i dont see any stuff in there that broadcasts values to other clients
No? So if i define myGlobalVar = false; in say init. And then change that value to true, would that only change for me and not all other players?
yes
only is you publicVariable it will broadcast
or use the global flag on setVariable
Global variables are local. The whole naming scheme is bad.
Ah so to set myGlobalVar global i have to declare that some how? so its really just myGlobalButLocalGlobalVar? xD
you need to expressly update variables on other clients, yes
Okay then i have a better understanding on that point, thanks 😃
Global variables are local. If you want to share them between different machines, you have to use missionNamespace setVariable <public> or publicVariable/Client/Server.
They are called public global variables in that case. They only take the value they had when they were shared though. Every time they are changed you have to share them again.
there is a bis wiki article that I can't find ...
next best: https://community.bistudio.com/wiki/publicVariable
Hehe i were reading exactly that wikipage @little eagle 😄
iirc there was a better one. maybe I'm dreaming
well the wiki is a total mess to navigate so im sure you are right 😛
maybe it was this https://community.bistudio.com/wiki/Locality_in_Multiplayer
...
hello fellas
i try make a script like a wasteland gun stores markers to exile. i make a code based from wasteland code, but the color markers not change the color when other guy is inside, maybe anyone can help me? the code is: http://pastebin.com/RmxijdeV
i call the file in init.sqf
if (hasInterface) then {
execVM "custom\NotSafeMarkers.sqf";
};
I think so the code run only in client right?
I'm unsure about how the script is working but it's always a good idea to either hint or diag_log your events to see that they actually are working as intended. @tough abyss
ty. @hearty shoal
Hello guys, is ther any way to check whether the player is currently using the under barrel (UGL for example) weapon? thanks in advance 😄
You would want to look into finding out what muzzle the current weapon have. @tender root
Yeah my best guess would be to compare the currentMuzzle with the currentWeapon but as far as I know the weapons "primary" muzzle and the wepaon do not have to have the same name or do they?
so that would be working in most cases but isn't a perfect solution
is there a command which returns the "primary" muzzle of a weapon
Hey @little eagle since you seem to know your stuff. Go to #arma3_questions and PM me the answer to it.
is setpos still a good command to use to elevate object in the editor or is it better to just type a number into the z-axis of the object setting?
because i notice that if i set a number on the z-axis and if i move the object around the elevation differs and adjusts to the terrain level. i want to have multiple objects elevated at the same level regardless of terrain level
i guess !isMultiplayer did not suffice?
😄
If they're gonna add simple, seamingly useless commands, I wonder why not add a isInVehicle - granted that it can be done with vehicle player != player but still
That actually would be an improvement
ikr
isGreaterThanZero?
Actually, an event handler that will be called when player is set and local could be useful
instead of waitUntil {player == player && local player};
beats me
Right after client loads so you know moment when you can start manipulating with player unit
No its way past preinit and even init
Can take a while on server.
You don't get your player unit right away, you have to wait for server to create you one (if no AI enabled) and then wait till locality changes because player might return your unit which is not yet local
Tho i never had issues with just doing in postinit, but most likely happens more in your usecase ;)
Shoulden't respawn get run?
You can't assign respawn event handler on something you don't have yet
Even if you could I don't think it would run as unit is created by server and then transfered to client
Da but respawn templates get run on player creation
Pretty sure on that point, unless they fixed it
"classname" addEntityCreatedEventHandler {};
Yes, pertty sure respawn templates get run with you jip in.
I wonder how they run, never used or looked into them
Wouldn't be surprized if it does waitUntil thingie
No idea, really but i did work into a workaround for my spectator script respawn evethandler would trigger when people jipped and not get put into spectator like they should (because they were alive)
I think display get created earlier than client gets their unit
isn't initPlayerLocal.sqf exactly that? executed when player object is available
Yep, never had any Probs with it.
postInit runs after the player is created. there is no point in having these waitUntil !isNull player loops
That's what i always figured. and used
Added: Support for retexturing simple objects
this is a good step though
//--- Run mission scripts
if !(isDedicated) then {
[player,didJIP] execvm "initPlayerLocal.sqf";
[[[player,didJIP],"initPlayerServer.sqf"],"bis_fnc_execvm",false,false] call bis_fnc_mp;
"initPlayerLocal.sqf" call bis_fnc_logFormat;
"initPlayerServer.sqf" call bis_fnc_logFormat;
};
0.90 call bis_fnc_progressloadingscreen;
//--- Call postInit functions
initFunctions.sqf
initPlayerLocal and initPlayerServer pass the player
they are guarnteed to have it defined, even after JIP
and postInit runs after that
I think they do it by waiting for getClientState != "GAME LOADED"
and at that point the avatar is transfered to the client already
Added: Support for retexturing simple objects
Retexturing in the sense of hiddenSelections[]? Or can I retexture any object in-game?
probably hiddenSelectionTexture
ah man. I wish I could rexture objects in-game which dont have a hidden selection
hi. did anybody here have a fight with setObjectViewDistance ?
it appears that you can't set it above what player has set in his video options view distance, even if you raise the view distance itself
ie. if I have 1500 set as max, then I can setViewDistance to 3000, but I can't setObjectViewDistance above 1500 no matter what
is it a bug? a feature?
sounds like a bug. never heard of this though
I've been googling around, and it appears that it might have been introduced with apex
setViewDistance 1E5; setObjectViewDistance 1E5; getObjectViewDistance
-> [2006.37,50]
can confirm
(pssst! is it a moment I create a ticket for it, or are tickets still a place where bugs go to die?)
create a ticket if one doesn't already exist
Will search and create then. I also found another bug, but this one does not look like a feature at all
- you can reset view distance with -1 parameter, but you can't do that with objects and shadows
and if you change view distance via script, it doesn't touch video settings slider, but it seems to change objects and shadows sliders
put that all into the ticket
there is a ticket, but marked as gui problem...
create a proper one then. put as much information into the OP as possible, but avoid emotional sentences/chatter
And name it drastically: "setObjectViewDistance broken"
😉
no one cares about tickets named "setObjectViewDistance doesn't work sometimes maybe"
or even worse: non sensical stuff like: "object view distance doesn't work"
whats the difference between "broken" and "doesn't work"? 😃
broken stuff generates errors
"doesn't work" just doesn't work 😄
but there's also this: https://feedback.bistudio.com/T120034
objectviewdistance cannot be higher than viewdistance
however you should be able to up the viewdistance via sqf
maybe best test in MP as your local settings cannot change the one enforced via sqf
while when you test in SP/editor, the one from options may overwrite the sqf use again
once you enter the menu
(was like this in the past at least)
it happens without going to options, and without dismissing debug console. this is what my ticket is about
well i havent scripted much in the last 2-3 years, so very possible BI introduced new bugs since
just trying to give you some general context how it is supposed to work
yeah. objectViewDistance <= viewDistance is a logical thing, unfortunately general view distance seems to constant when objectViewDistance is concerned, while it's not
Guys when a vehicle explode you no longer get the option to view what was stored in the inventory. But is the inventory still stored after the vehicle have exploded?
yes
Nice!
I use this to determine how many secondary explosions should happen after a tank blows up in ACE
Well i could find atleast one way to get the cargo of a vehicle but as soon as i made the car explode that didnt work anymore
I used getItemCargo
@little eagle
You are right, @hearty shoal
I was thinking about the vehicles weapons magazine inventory, not the cargo
Bad news. The cargo is deleted when the vehicle dies.
Ah okay thats fine i guess. Would not make sence to have the inventory saved after an explosion after all
also bad news, killed doesn't work either:
cursorTarget addEventHandler ["killed", {
params ["_vehicle"];
systemChat str [_vehicle, getItemCargo _vehicle];
}];
-> [<truck>,[[],[]]]
where i can find manual for basics in language becose i wanna know how to modify "" if(vehicle player == player) then {" to check side can add && ?? to script ?? " if(vehicle player == player && side = Independent) then { ????
whoa, cool one line code block~
OK works
if i add to if ...... && playerSide isEqualTo west work only for west ?
Would questions about the mission init order go here or the missions channel?
no no mision script for line but i wannna turn it only for medics on life server
"fn_advancedSlingLoadingInit"
hmm ```20:29:29 Error position: <_this spawn core_fnc_keysPressed>
20:29:29 Error Type Script, expected Bool
waituntil {!isnull (finddisplay 46)};
[] spawn { (findDisplay 46) displayAddEventHandler["KeyDown","_this spawn core_fnc_keysPressed"]; };```
oh i see now that the code is wihin " "
keyDown event handler expects a boolean as return value
false: don't overwrite, true: overwrite
spawn returns a script handler
Error Type Script, expected Bool
could change it to this:
"_this spawn core_fnc_keysPressed; false"
Could not find anything about that on the wiki https://community.bistudio.com/wiki/displayAddEventHandler :S
well, but that is the reason
why are you using:
[] spawn { < add key handler > }
seems pointless to me
so myKeyDownEvent = (findDisplay 46) displayAddEventHandler["KeyDown","_this spawn core_fnc_keysPressed; false"]; instead ?
xd
less text, cleaner script, easier to debug ¯_(ツ)_/¯
True, but when one start to script isnt it better to be extra clear on everything you do?
Not seeing where the clarity comes from with that one though 😉
While taking shortcuts can reduce readability of code, having superfluous stuff like saving return values in used variables, or using additional calls / spawns that only encase one command needlessly doesn't help clarity.
You should always ask yourself: "what does this do?" and if you don't need it OR don't understand it, remove it
I think that is a good tip for beginners. Maybe you disagree, but it helped me.
@little eagle I am having a strange problem with CBA. I have no idea what is causing it and how to fix it. code: http://pastebin.com/8qSrrjfN
Hey, I use for from do to remove items from player but when the value is 1 (for remove 1 item), i have 2 items deleted :/
//I want to delete 1 itemGPS
_value = "1";
for "_i" from 0 to _value do {player removeItem "itemGPS"};
😃
How to use the code format on discord ?
'try'
I can't unformat 😦
Arf :/
@coral pasture
So if I copy the code under =Relevant code= this error should appear?
Are you by chance the same guy as pultho on the github?
Nathan423
ok. He was opening another issue an hour ago
I'll look into it
@coral pasture
Can you copy paste this variable from debug console?
cba_keybinding_handlers
http://pastebin.com/aegDaiR2 @little eagle It was too long
thank you
found it
you do this:
["United Operations", "Admin Console", ["player", [], -10, "_this call uo_fnc_selfInteractMenu", "main"], [DIK_APPS, [false, false, false]], false, "keydown"] call cba_fnc_addKeybind;
parameter 2 (starting from 0) is:
["player", [], -10, "_this call uo_fnc_selfInteractMenu", "main"]
but the function needs a string:
https://github.com/CBATeam/CBA_A3/blob/master/addons/keybinding/fnc_addKeybind.sqf#L11
I don't call that (very legacy)
well the array appears in cba_keybinding_handlers
[["player",[],-10,"createDialog 'UOGM'","main"],"keydown","keydown"]
So can I just remove that entry from the array?
nah, don't touch this array
are you sure you are not calling that code? because it's strange that it appears in that array
Sucks that CBA_fnc_addKeybind has no input control
yeah, the one where it says "player"
that's the one
The last one is the only "active" keybind, the rest were completely removed from the code. They were used prior to the active code.
ah snap, I know why you can't get rid of it
it's read from profile. because you executed this once your profile is "contaminated" so to speak
shitty code from CBA tbh
*read from profile
profileNamespace setVariable ["cba_keybinding_registryNew", nil]
that should fix it, but it means that you'll have to rebind them all ...
edited*
could I just do cba_keybinding_registryNew - [["player", [], -10, "_this call uo_fnc_selfInteractMenu", "main"]]?
Or is that not safe
Nope. It's a weird multidimensional array
okay
Sorry. I'll add input control to CBA_fnc_addKeybind right now so shit like that doesn't happen again.
Quick question, if I'm using BIS_fnc_setTastState to modify a create task module do I need to place the Variable Name or the Task ID into the params?
yeah I figured it out Its looking for the TaskID not the variable name like I had tried previously
BIS_fnc_setTastState i did read that as BIS_fnc_setTasteState haha 😄
Yeah. I had to think about what he meant for a second too
Does anyone have good exprierence with remoteExecCall?
It would probably be best to just ask what you need to ask directly
{[_execUnit, _classname, _countNum] call FNC_addItemToPlayer;} remoteExecCall ["BIS_fnc_call", _execUnit, false]; is giving a Type any, expected [things]
_execUnit = nil;
{
if (name _x == _execUnitname) then {_execUnit = _x};
} forEach playableUnits;
hint format ["Unit: %1\nClassname: %2\nCount: %3", _execUnit, _classname, _countNum];
{[_execUnit, _classname, _countNum] call FNC_addItemToPlayer;} remoteExecCall ["BIS_fnc_call", _execUnit, false];
hint "Player was given the items";``` and the variables are all defined...
_execUnit, _classname and _countNum are undefined in that scope
you will have to pass them as arguments
how would I pass it?
[[_execUnit, _classname, _countNum], {_this call FNC_addItemToPlayer;}] remoteExecCall ["BIS_fnc_call", _execUnit, false];
Why not do
[_execUnit, _classname, _countNum] remoteExecCall ["FNC_addItemToPlayer", _execUnit, false];
yeah that makes more sense
Because debugging lead me to what I had, it was originally that
"BIS_fnc_call" is really to be avoided when possible. Instead of the short and sweat function names you are transfering a function name AND the function
functions are strings so what you transfer can get huge -> desynch
Arma is moving to a differnt scripting language in the next game, right?
I can't spell
the documentation for enScript is already partially available in the standalone files
I remember looking through it a few months ago
railgun tanks. that's all I say about this
Lol
The hound, that sounded intresting. but by standalone what do you refer to?
@little eagle @native hemlock That didn't work
Dayz Standalone's engine uses enScript, the engine is called enfusion, and they've stated many times that will be the arma engine moving forward
I beleive sqf will still be in there as well
But we'll have to wait and see
Ah! sounds intresting 😃
@coral pasture What about it didn't work?
Any special pbos you looked in to give me somewhere to start looking @blazing zodiac
Paste the updated line with remoteExecCall
[_execUnit, _classname, _countNum] remoteExecCall ["FNC_addItemToPlayer", _execUnit, false];
Could that function be blocked by your CfgRemoteExec values?
😶
myFunc = {
params ["_one", "_two", "_three"];
hint format ["one: %1, two: %2, three: %3", _one, _two, _three];
};
private _a = 75;
private _b = 9;
private _c = 312;
[_a, _b, _c] remoteExecCall ["myFunc"];
Just ran that in the editor and I had a hint pop up with the corresponding numbers
So that leads me to believe your function isn't getting executed
shouldn't it write to RPT if the function was blocked?
Probably
Where are you testing this?
SP for now
And the error is Type any, expected [things]?
You're in SP
19:30:00 Error in expression <um]; [_execUnit, _classname, _countNum] remoteExecCall ["FNC_addItemToPlayer", _> 19:30:00 Error position: <remoteExecCall ["FNC_addItemToPlayer", _> 19:30:00 Error Type Any, expected Number, Side, Object, Group, String 19:30:00 File z\uo\Addons\debugconsole\functions\fn_spawnItem.sqf, line 145
playableUnits doesnt return anything, does it?
It does because the list use it and they fill
yeah, in the editor
type playableUnits in a watch field
You right
allUnits instead to test
The error is referencing the "unit", wich is most likely undefined...
Let me test in MP
Yeh, as your execUnit is never defined
Also this is a bad idea
case "ALL": {
{
[_x, _classname, _countNum] remoteExecCall ["FNC_addItemToPlayer", -2, false];
} forEach playableUnits;
hint "Everyone was given the items";
};
You can use an array as the target
It's been a long day
@native hemlock I ment to change it
that would be very baf
Works in MP 😃
let's say i create a mortar round with _mortar = createVehicle ["Bo_Mk82", _psn, [], 0, "NONE"];
how can i detonate it in the air?
_mortar setDamage 1 doesn't work
Try
_mortar = "Bo_Mk82" createVehicle [0,0,9999];
_mortar setPos (getPos player);
_mortar setVelocity [0,0,-100];
or w/e position
^ that will explode on the ground, won't it?
yeh, nvm, didnt read
only CfgAmmo that have: triggerWhenDestroyed = 1; explode when killed
(might also only work on ceratin simulations)
Yeah, I don't think you can do that.
hmm, is there ANY way to make explosion in the air?
#particlesource, #soundsource, #lightsource etc. with createVehicleLocal I guess
If you can edit configs for your project, you could make a copy of your class with timeToLive = 0;
yeah i got it, not worth it, i'll try to look for any ammo that has trigger when destroyed option and if i don't find one i'll drop the idea, thanks anyway!
Everything with triggerWhenDestroyed = 1; will work
The one demo block has scripted versions that triggerWhenDestroyed
yw
I've been using attachTo to attach a chemlight to units. I've noticed when units enter vehicles it loses the chemlight. Anyone had experience with this issue or know a solution?
known by me at least
AGM / ACE just remove it while entering a vehicle and attach it later again
but that is a bitch to set up
the event handlers getIn etc are shit and dont trigger on certain script commands
and since zeus uses those they are out of the question, at least for us
I was thinking an event handler would be the way to solve it.
you can use getInMan / getOutMan, just expect it to fail on the corner cases
damn great that someone made config dump of arma, will be really easy to find triggerWhenDestroyed ammo
the chemligh isn't actually gone. it floats next to the vehicle. really annoying
I noticed the chemlights at the side of the vehicle. Forgot to check if they reattach when the unit leaves the vehicle.
they do
they actually are attached "correctly"
it's just that the part of the memory LOD is dislocated in vehicles
Comments on the wiki for attachTo mention vector getting reset when attaching an attached object to another object. I thought that was something to do with it. https://community.bistudio.com/wiki/attachTo
the soldier isn't attached to the vehicle in the same way
the problem is that attach to points to the entity, but the player becomes a proxy of the vehicle. The vehicle becomes the target entity for the attached item
the offset is no longer calculated to the solder, but to the vehicle. and the vehicle is usally bigger than a soldier, so the item ends up in a corner of the bounding box
afaik has this been in every Arma since attachTo exists
( I read the notes in the ACE 2 source )
So to get them to attach to units in vehicles, would need to find the right offset for each vehicle position and vehicle type.
Is it possible to apply unit traits to the new CfgRespawnInventory classes? I'm trying to create combat life saver and engineer roles for Zeus.
Or embed scripts somehow so I can run player setUnitTrait ["Engineer",true];
how i can make a while in 1 in 1sec in all server uptime?
use Googletranslator again pls
lol
You wanna have while{true}do , that executes only every 1s?
yes
sleep 1;
sleep not work in console right?
while{true}do
{
sleep 1;
diag_log "Scripting is easy";
};```
Console is un-scheduled, so no
{
abc = true;
while{abc}do
{
sleep 1;
diag_log "Scripting is easy";
};
};``` ServerExec
If you want to get rid of it
`abc = false;` serverExec
eeeezzzzziiiiiiiii
ty
but i want script run only in each client
is like a wasteland gun stores marker what i want to make
realy... sorry
sorry? Erm, okay. Not the answered i expected^^
Start with some Basic Scripting stuff. Learn how the basics work, rest comes after some time.
Its not "magic". Some logic thinking and knowing the commands -> pretty easy =}
so ty
Your best friend:
https://community.bistudio.com/wiki/All_Arma_Commands_Pages
i said sorry because i said server but is client actually. 😃
^^
https://community.bistudio.com/wiki/ArmA:_Introduction_to_Scripting
and all further reading @ footer
Thx, i was searching for it
This for while loops: https://community.bistudio.com/wiki/Control_Structures
i know a little the code logic because i know PHP, and yes, i'm reading all time the wiki.
ty for all the help and tips
lol
@tough abyss for run only in client?
oh god
&& hasInterface @tough abyss You forgot that
if (isSingleplayer && !isMultiplayer && hasInterface && (!isDedicated || isDedicated) && vehicle player == player) then {hint 'apex protocol babyyy!';}; take that
["LetsBreakIt","onEachFrame",{if (isSingleplayer && !isMultiplayer && hasInterface && (!isDedicated || isDedicated) && vehicle player == player) then {hint 'apex protocol babyyy!';};}] call bis_fnc_addStackedEventhandler;
the sound trying to play itself will crash the game, use hintSilent
But i wanna crash it
I'm using some small balckListedAreas in BIS_fnc_findSafePos to exclude points on vehicles (the code ignore vehicles like cars and heli), but those small black listed areas are not working, the code still find points where there is vehicles. Small blacklistAreas are ignored by the function?
this is my blacklist [[[11319,11190],[11379,11130]],[[11334.8,11199],[11394.8,11139]]]
Ops... i found a error. Lets see. Thanks anyway.
solved.
i want to to make "addaction" on every spcific class on map (that i put on editor)
_object addAction ["Hack","openintel.sqf"]
};
dont work
Whats the variable _object represent?
editor
How are you checking the placed objects?
allMissionObjects?
Or entities or something?
none?
What do you mean?
*none
So you aren't checking the objects placed?
If you don't wanna check the objects on the map you could always make a function and call it in the laptops init
And have that execute whatever you want on it
addAction and whatnot
i didnt say i dont wanna
Ok, I have never used entities before but I imagine you can go down to the class.
So something like
Run this in your debug console quick and paste it here please
copyToClipboard str (entities "Land_Laptop_device_F");
Do that in mission where your laptops are placed
So we can see if it returns them
[7eadd600# 4: laptop_unfolded_f.p3d]
Is there only one placed?
for now
ok cool
{
if ((typeOf _x)) == "Land_Laptop_device_F") then {
_x addAction ["Hack","openintel.sqf"]
};
} forEach _objects;```
Try that I think
or actually
You may be able to just do this _objects = entities "Land_Laptop_device_F"; { _x addAction ["Hack","openintel.sqf"] } forEach _objects;
Not 100% though, never tried this before
Try either and let me know
iin the first it say "missing ;" line 3
Oh yea it is
{
_x addAction ["Hack","openintel.sqf"];
} forEach _objects;```
{
if ((typeOf _x)) == "Land_Laptop_device_F") then {
_x addAction ["Hack","openintel.sqf"];
};
} forEach _objects;```
Try the first one I just posted first though
The typeOf check I dont think is required
still same error
the missing ; error?
yes
yes
Working?
Ok awesome
No problem
If you ever add a ton of objects
It may be faster to write a function for it
I'm not sure of the overhead of entities
And you would probably have to remoteExec this anyways if you are using it in multiplayer?
Again I'm not 100% sure
But with addAction being local it may be the case
doesnt matter if the command is slow if you only use it once on mission start. they are not THAT slow.
allMissionObjects was the broken one that takes 2000 times as long as entities/allUnits etc.
Ah ok, I knew I remembered reading one of them was broken
But like you said I suppose it wouldn't matter in his case
it really doesn't
with lbSetData theres is a index number. control lbSetData [index, data] im unsure what that should be :S
nope
Same with removeMagazine or removeWeapon or any other Inventory related stuff. Just not possible to remove single Items from a Vehicle Inventry (wich is crap as hell)
So in a loop that would be _x? @thin pine
if the array you're cycling through is one of listbox item indexes, yes
Does anyone know of a way to detect what someone writes in MP chat? Allowing for e.g. chat commands? Other than creating a keylogger using keyDown EH 😛
Actually nvm, I'll look at Conroy's code - http://www.armaholic.com/page.php?id=26377
You could always take a look at scripts that kick for people using 'abusive' language.
Yeah I guess but I found what I was looking for, (ctrlText (finddisplay 24 displayctrl 101)) - returns the text in the chat bar, I sometimes forget how open access arma is 😛
Could read the content of the chat logs
Anyone knows why extra added buttons to RscDisplayMainMap might not work? http://i.imgur.com/gDM6dN6.png
Can't press those at all for some weird reason.
Nothing is overlapping it
Already try ctrlSetFocus through them to pull them forward too, still no luck
@austere granite Any luck yet?
Nope
I was just working on sumn that involved a button on the map...I totally didn't test it and now I realized I added a button to a resource...so that won't work :/ If you can't add extra buttons to the main map then my plan is ruined too
ctrlSetFocus (_x controlsGroupCtrl 32);
(_x controlsGroupCtrl 32) ctrlSetPosition (ctrlPosition (_x controlsGroupCtrl 32));
(_x controlsGroupCtrl 32) ctrlCommit 0;
nil;
} count [ctrl(22), ctrl(23)];
tried this too, no luck still.
if it absolutely doesn't work you can go over the top complicated and create your own hover & click events in combination with a resource that is shown on the map.
But I suspect for the buttons to work normally you'll need to create a dialog and inside the dialog you create a map instead of trying to modify the main map
Yeah I can't figure this out at all. All the configs seem a-okay
Positioning all works fine too, but seems like something is drawn on top which prevents me from clicking
well @thin pine it does work, it's something in my config so gotta check waddap, but at least you can place buttons on map just fine
alright great 😄
Yeah listBox, it was just something on my end, not sure what I fucked up, still trying to work it out
Nah it's all good, just gotta unfuck my positioning somewhere. It's in the header bit, although the height is correc tthere, it still blocks it
So not related to arma being annoying
is https://community.bistudio.com/wiki/setHitPointDamage and similar still only in TOH ?
nah
works for all
https://community.bistudio.com/wiki/getAllHitPointsDamage get the selectrion names with that
are those selection names case sensitive?
Don't think so
Hey, I have a missionConfigFile with :
class buisson { variable = "buisson"; className = "Land_Hedge_01_s_2m_F"; interval = 4; time = 5; };
In my script I want to find the class where the classname isEqualTo _SomeVar;
anyone have an idea how to process ?
"getText (_x >> 'className') isEqualTo _SomeVar" configClasses (configFile >> "CfgName");
Possibly useful https://community.bistudio.com/wiki/getMissionConfigValue
So if i do that _a = getText (_x >> 'className') isEqualTo "Land_Hedge_01_s_2m_F"" configClasses (configFile >> "CfgName"); it's return _a = "buisson" ?
ok it's work thank
if i write
if (condition1 AND condition2 AND etc)
does it check up those in the order i defined them? Say i have a couple of more computationally tasking checks, should i place them at the end?
It will check all of the conditions regardless if one of the previous ones was false, unless you less lazy evaluation or put the conditions inside of each other.
if (condition1 && {condition2} && {condition3}) then {};
For the above code it would only check condition2 if condition1 was true, and only check condition3 if condition2 was true
There is a little blurb about it here https://community.bistudio.com/wiki/Code_Optimisation#Conditions
And KillzoneKid also describes it with more information here http://killzonekid.com/arma-scripting-tutorials-how-to-switch-on-lazy-evaluation/
k good to know
Out of interest, is there a good argument as to why lazy eval* isn't by default?
Neo probably words it better than I could summarize it https://forums.bistudio.com/topic/190680-sad-about-chains-of-conditions/?p=3022574
I don't think you'll find a good argument to why it's not enabled by default, just reasoning behind why it happens in Arma.
I entirely understand lazy eval, it just gets tiresome using it on literally everything
I have an Objective to "Disable Generator". The Generator is placed on the map and I'm running a lights script that allows an addaction to turn the lights off. I want to setup a "Fail" and "Succeed" task state but I'm unsure how to check for task fail and task succeed? Any ideas, suggestions? Note: the task fail will be at the end mission if the objective is not completed, but still do not know how to check for complete or not :(.
Is there a Ace3 scripting command to remove captives from an enemy (RHS) vehicle? I've tried both leaveVehicle and unassignVehicle and they seem to be blocked by Ace, if I run either of those commands through the debug console the door opens like the prisoner wants to get out but is blocked from moving.
I've looked over the Ace3 framework wiki and haven't found anything but not sure if its named something I'm not thinking about
Unfortunately that doesn't seem to work either, I can see that it is trying to get him out of the vehicle (he flashes out of the vehicle in the background) but then is moved right back into the vehicle.
Exec that command, where the Unit is local (e.g. Server)
nvm, its global
It should work oO
like through the trigger?
I just ran,
moveOut HRT;
I'll try that real quick
Yeah that removed everyone but the captive from the vehicle, the captive did the same thing as before, flashes on the screen for sec before getting back in the vehicle
oO
I don't know if it makes a difference but I did drop the unit into the vehicle from the editor
He was not loaded into the vehicle from a script or anything
I don't know if that makes a difference but I wouldn't think so.
No clue, haven't played around with AI alot.
kk np thx for your help, I hadn't seent that moveOut command so that'll help with something else I was trying to do.
o7
@wet pecan with ace you need to unset the ace cargo index variable or itll force the captive back in. Easiest would be to just use [HRT] call ACE_captives_fnc_vehicleCaptiveMoveOut;
Hopefully someone can help me out with this because i'm lost at this point, last night I patched together this script that removes a captive from the vehicle and places him in a random building near by.
nearesthouses = getMarkerPos Cap_Building nearObjects ["Barracks",25];
houseList = [];
{
for "_i" from 0 to 20 do {
if ( [(_x buildingPos _i), [0,0,0]] call BIS_fnc_arrayCompare ) exitWith {
if (_i > 0) then {
houseList set [count houseList, [_x, _i]];
};
};
};
}forEach nearesthouses;
randomHouse = houseList select (floor (random (count houseList)));
housePos = (randomHouse select 0) buildingPos (floor (random (randomHouse select 1)));
HRT setPosATL housePos; ```
If I run that from the debug console it works perfectly fine
Last night I placed it in a trigger with the condition (HRT_Transport in thisList) and it worked for the most part, the hostage was moved from the vehicle but not placed in a building, since it was late I saved and figured i'd work on it more in the morning
This morning now the tirgger and script didn't get saved for what ever reason and now when I recreate the trigger with that same script nothing happens, but it still runs fine in the debug console
I added a hint line at the top to make sure that the trigger was activated and it pops up fine but the script never executes
I've also tried setting up a scripted waypoint for the HRT_Transport and it moves on from the waypoint as if the script was run but he hostage is not removed from the car or placed in a building
So if anyone has any ideas as to what Im doing wrong I would appreciate it because I have no clue at this point
i gather you've named the guy HRT?
btw there's _x buildingPos -1 now, will return all the building positions
so you could use houselist = nearestHouses apply { [_x, count (_x buildingPos -1)] } select { (_x select 1) > 0 };
instead of that loop
@vapid frigate Thanks man that seemed to fix my problems not sure what was wrong with the loop but once i replaced it with your line it worked fine
is it possible to extract one bullet from the mag in the inventory, or will i have too remove the mag and add a new one with less bullets?
Is
https://community.bistudio.com/wiki/setAmmo
an option?
EDIT:
The other thing (might be the one you mentioned before) -> (Alternative Syntax)
https://community.bistudio.com/wiki/addMagazine
😄
The paste option was highlighted :D
huehue
setAmmo works only if the weapon is in hands, i need to change the ammo of a mag in the inventory
i guess i will have to remove mags and re-add them to make this work
Yeah, couldn't think of another way
Something different: Anybody played around with addMPEventHandler ["MPKilled", ?
i did
sometimes yeah, you set it up once server only and it will track the object even if it changes locality, unlike usual EH
What concerns me is: " EH code will trigger globally on every connected client and server "
hm,... if(!isServer)exitWith{}; ? hmm...
i'm not sure, but afaik it fires only where it was attached
or that to make sure yeah
It definitely does fire on all machines
the MPKilled EH
I use it for my xp gains per kill so each player gets the xp for anyone getting the kill
Assigning MPKilled EH sends entire handler code to all clients and will execute everywhere regardless of locality
Yeah, was playing around with it. As long as its just a simple !isServer check -> Might be suitable for me.
There is also EntityKilled now
Which is server-side only and locality-independent
Runs on everything though, including client-side rabbits and snakes to map objects
Yeah, thought (hoped) so
Do append or select commands have index local variable like count and forEach have _forEachIndex?
I try to pushBack some object i create but my array is constantly whiped and get only the last created object :/
Example :
``
array = [];
_a = "B_quadbike_01_F" createVehicle position player;
array pushBack _a;
array = ["967c0100# 1781324: quadbike_01_f.p3d"];
``
if I retry : array = ["84f0ab00# 1781351: quadbike_01_f.p3d"]
because you create new array each time?
array = [];
Try if(isNil "array") then {array = [];};
OOOH i'm so stupid -_-
I forgot to remove the array = []; on the top of my script so yeah is whiped
Oh, true, it doesn't.
it try to bind an addaction to a object and want to place a condition on it. in this condition i try to evaluate if a player is in a specific animationstate (climbing a ladder). in the wiki it says i can access the player using the addaction with the variable _this. so i tried to build the following check:
'''!(([animationstate _this, 0, 5] call BIS_fnc_trimString) == 'ladder')
it seems _this is not replaced with the player object. if i replace _this with player and put it in a watch it evaluates correctly. anyone an idea what i'm doing wrong? or how i could debug this problem?
To debug you can simply do: systemChat str [_this, player == _this];
to see what is _this and if its player
also in a condition of an addaction? because i tried it with hint str _this and got no output
Also you can do animation check much easier with find command:
toLower animationState player find "ladder" >= 0
Yes, right in the condition
with your condition it works now. maybe the other evaluation took to much time - so it was never really evaluated. thanks!
Or you had an error and it didn't execute
Make sure you start game with -showScriptErrors
i always run the game with that - so i think it was no error. but thanks!
@sterile ravine I think that _this in the addAction condition is actually nil and that the condition check is done oin an unscheduled environment. Therefore any command that would be fed with the nil argument would just not get executed (in your case the hint)
is it possible to setObjectTexture on weapons in some way?
like if they are in the weapon holder, that is the object - not the weapon(s)
getWeaponCargo doesnt give you the object either
the Weapon_XXX classes are also just containers and not the weapon itself (aka no object reference)
It's possible to know if an object is in the radius of source's light ?
Is it possible these days to create items that show up as "Place Whatever (2 left)" and then instead of a normal explosive placement run a function instead?
Basically wanna have action attached to a certain magazine type when in inventory
Possible, you'll have to do everything manually though
Yeah i was hoping for a way to just add it to the weapon / magazine config like some of the vanilla stuff, but I guess that's wishfull thinking.
b:STRING callextension ARRAY
anyone knows whats new in the arary version?
or why this was remove again?
b:OBJECT addmissile ARRAY
Evening o/ Anyone know if the "misleading" sections of this wiki page are detailed anywhere? https://community.bistudio.com/wiki/Function
@ivory nova this might have it: https://community.bistudio.com/wiki/Functions_Library_(Arma_3)
@austere granite Thank you!
Are ctrlEventHandlers removed along with the controls when the display closes or do they need to be removed manually?
@steep matrix Some information I dug up about the new version of callExtension
handle = "pipes" callExtension ["openPipe",[arg1, ..., argN]]
Execute an extension function with additional arguments
cheers
A magazine repack script?
You could look at how ACE does it.
Theirs is very intuitive.
You'd need to add it into a menu or an addaction rather than through the ACE Interact menu, though.
How do you plan on calling the script?
Are you making a GUI with other functionalities, or are you just doing an addaction?
Yeah, I'm certain you could implement it that way.
As far as I know ACE is open-source.
I'd much rather they fix their performance issues! :v
There's no reason I should be running at 50 FPS with a GTX 1070.
But that's for another chat.
Oh, I know. I was being liberal with 50FPS.
My networking knowledge is more profound than most, but I don't know why they'd use TCP over UDP.
Headless clients are a godsend.
AI calculations are.
Really?
I'll relay that to my group.
Do I stick 'enablesentences false' in their init field?
In my experience with my group, most people are not perceptive enough. 😛
https://www.youtube.com/watch?v=cZx-pSKGLOI This is the group I play with. We're not serious in any sense of the word.
I quite like ACE's interact menu.
Honestly, I half-wish it was integrated into base Arma
Which makes sense, they should.
The Arma interact menu has been a thing since... OFP, maybe? CWA at the latest.
You can never win
Just below the cursor works nicely, I've found.
"Yeah, this mission works fine on a local server."
And then a dedicated server just
fucks everything
You should be able to find a couple mag repack scripts floating around already.
Even before ACE3 had one, there were a couple in other game modes.
Design everything with MP in mind and you'll be fine
I always develop by hosting lan server through server browser
Dedicated server control panel.
Makes booting up and changing mods/missions around a bit more convenient
Not many cases where I really need client and server to be separate, everything is designed to run on both dedicated and listen server
\o/ having his own DevServer at home+online \o/
overkill tbh imo
but yea if i need to test ez mode i just do self-host and then start up second copy of the game and connect like that
is restart necessary?
Is there a way to control in which order UI classes are added when adding one to an already existing config?
Add at the end -> Pops up as last Item -> On Top
Yeah i want it to be at the bottom, but the classes that already exist within that dialog get drawn below it
I guess rather than deleting an existing unused entry I'll just reconfig one of those classes to be my background instead
Guys I have a question fast, I have seen alot of scripting things where there is usually a code such as "_this select 0" What does this code mean? I know _this is a local variable and I know select 0 etc is for like arrays but what does _this select 0 usually do+
Just an example maybe of what I am meaning, I saw a code like _player = _this select 0
In that scenario _this is probably an array of arguments being passed to the function. For example
testFunc = {
_message = _this select 0;
hint _message;
};
["Hi"] call testFunc;
A command that makes my example faster and easier to read from is params, so you'd do
testFunc = {
params ["_message"];
hint _message;
};
Good place to start http://killzonekid.com/arma-scripting-tutorials-arrays-part-1/
Yeah I know about that, but what does _this have for arrays? I never see like _this = "Hi" and then hint = [_this]; would've make more sense lol
_this can be anything, but it's always an argument passed to code
Oh okay
if you do "hi" call { hint _this }; then it'll work
if you do ["hi"] call { hint (_this select 0) }; it'll do the same thing
The reason almost alway an array is used, because then you can add extra argumetns without adjusting all the other _this entries
the params ["_firstArgument", "_secondArgument"] command is super useful though
by default params will use _this to select from array
Ah, I quite understand I'll try to try out stuff until I understand it 100%
Thanks anyways
Personally, I'd go vest -> backpack -> uniform if I was setting up the script
That's my personal preference
and it drives me crazy reorganizing
The arma inventory commands fill uniform -> vest -> backpack
Nothing wrong with that, unless you habitually reorganize your inventory like I do.
you repack smaller magazines into bigger one, place then where bigger ones were
vest over uniform pls
logically I mean
@velvet merlin @native hemlock
void __stdcall RVExtensionArgs(char *output, int outputSize, const char *function, const char *args[], int argCount) {
ZERO_OUTPUT();
std::stringstream debugreturn;
debugreturn << "<start> [Function: " << function << "]";
for (int i = 0; i < argCount; i++) {
debugreturn << "[arg" << i << ": " << args[i] << "] ";
};
debugreturn << "<end>";
std::string returnValue = debugreturn.str();
strncpy_s(output, outputSize, returnValue.c_str(), _TRUNCATE);
EXTENSION_RETURN();
}
Example call: "myDll" callExtension ["tFnc", [123,456,player]]
Return: "<start> [Function: tFnc][arg0: 123] [arg1: 456] [arg2: B Alpha 1-1:1] <end>"
Does callExtension pass the argCount then?
as far as I can tell, I just guessed the arguments when you said it went from @tough abyss to @20
Good to know, thanks. I was testing it with a C# extension, but that information is still helpful.
Are there any documentation on how the custom controls work? Basically i want the user to be able to choose what keys to bind and that seems the best way to go
@hearty shoal
In use with "User1", "User2" etc
then you basically check if _button (from keyDown EH) is in array for that actionKeys "User1" and tada
If you want ctrl/shift and so to work okay check the comments on actionKeys
Tweaked: The isSingleplayer command was renamed to isMultiplayerSolo
heh
thoughts on these EH changes - anything useful?
https://community.bistudio.com/wiki?title=Arma_3:_Event_Handlers&curid=12579&diff=97191&oldid=97117
seems related to FFV
FFV damage source is already unit itself, not vehicle they're in
It becomes a little bit more tricky to tell if damage from done by running over or it was FFV though but I think instigator is null with running over while its same as source in FFC case
Distance check is not a certain way to tell it
Will be very unreliable
Is collision damage check done on client or remote side?
epecontact is another thing
If its case of remote client deciding if you should get collision damage then its even more unreliable because by the time you get damage packets vehicle might be already far away
Anyway, distance check is unreliable solution here
I was talking about being run over, when vehicle runs you over its driver is sent as damage source, not the vehicle itself
I think instigator should be null in this case and not null if it was FFV since FFV also sends unit, not vehicle where unit is
I already told how, if damage source is unit that is in vehicle, instigator will be null if this was running over and not null if it was FFV
That's why I said tricky, its not explained
_ffv = vehicle _source != _source && _instigator == _source;
_runover = vehicle _source != _source && isNull _instigator;
no it will return driver
Actually not sure what it will return if you're on co-pilot, lemme check
Returns copilot properly just like driver
So running over always returns unit as source damage, not vehicle, regardless of being co-pilot
does running over return the vehicle as source?
So running over always returns unit as source damage, not vehicle, regardless of being co-pilot
No, its driver
I just checked, it properly returns actual driver even if its co-pilot
No its unrelated to driver command
I am trying to get a basic briefing on the line. It just does not execute when you switch from lobby to tactical map
Init.sqf:
execVM "briefing.sqf";
briefing.sqf:
waitUntil { !isNull player };
waitUntil { player == player };
switch (side player) do
{
case WEST:
{
player createDiaryRecord ["Diary",["Intel","Der Feind hat einen Kilometer langen Wall um die Südseite von Zargabad errichtet und umliegende Gebiete vermint. Die einzige Möglichkeit durchzubrechen ist direkt durch den Wall.
Der Wall hat mehrere Weakpoints, welche sich für einen Angriff eignen, doch diese sind stark bewacht.
Innerhalb des Walls befindet sich das FOB "Eagle's Nest", welches unser erstes Ziel sein wird:
<img image='Eagles Nest FOB Far.jpg'/>
Innerhalb des FOBs befinden sich mehrere Ziele, welche wir vernichten müssen, um zu gewährleisten, dass uns niemand auf dem Vormarsch in den Rücken fällt:
<img image='Eagles Nest FOB Close.jpg'/>"]];
player createDiaryRecord ["Diary",["Situation/Hintergrund","Zargabad, 29 Juni 2016, 0500
Der IS ist auf dem Vormarsch durch kurdisches Land. Zargabad ist eine gut befestigte Stadt des Feindes welche das taktische Ziel dieser Mission darstellt.
Wir sind in der Unterzahl doch müssen diese Ziele ausschalten um einen weiteren Vormarsch des IS zu unterbinden."]];
player createDiaryRecord ["Diary",["",""]];
};
case EAST:
{
};
case RESISTANCE:
{
};
case CIVILIAN:
{
};
};
Help would be much appreciated
Try with test texts instead of final text, maybe you have misplaces quotes or errorous structured text
I used a briefing tool
not a good one
det sich das FOB "Eagle's Nest", welches unser
breaks your string right there
ill fix
Sa-Matra - Today at 11:28 AM
Is collision damage check done on client or remote side?``` Afaik Client
the " " was the problem
it works now, even the pictures are shown
thanks for the help nick
np
@indigo snow
do you use any text tool to write these?
notepad++ has arma syntax checking
should make errors like these really noticable
Is there some extra thing i need to do before initDisplay scripts work by itself?
onLoad = "[""onLoad"",_this,""FRL_RscUnitInfo"",'FRL_IGUI'] call (uinamespace getvariable 'BIS_fnc_initDisplay')";
Checked initDisplay.sqf and the rest of the data is all saved, but for some reason uiNamespace getVariable "FRL_RscUnitInfo_script" isn't being compiled
running ```
_fncName = "FRL_RscUnitInfo" + "_script";
_fncFile = preprocessfilelinenumbers format [gettext (configfile >> "cfgScriptPaths" >> "FRL_IGUI") + "%1.sqf", "FRL_RscUnitInfo"];
fncFile = format ["scriptname '%1%2'; fnc_scriptName = '%1%2';", "FRL_RscUnitInfo", "onLoad"] + _fncFile;
uinamespace setvariable [
_fncName,
compileFinal _fncFile
];
which is just my params placed in what initDisplay.sqf runs itself works fine, but it means that my UI script only works after I run that msyelf and then restart mission.
What would be quickest way to delete all null objects from array while retaining same array (no array - [objNull])?
Quickest execution time wise
I mean not using _array = _array - [objNull] since it creates new array instead of modifying the original
_arr = ["a","b","c",ObjNull];
{if(isNull _x)then{_arr deleteAt _ForEachIndex};}forEach _arr;
``` ?
Wouldn't work, since indexes will change when you delete an element
Ah, right.
_Index = [];
_arr = ["a","b","c",ObjNull];
{if(isNull _x)then{_index pushback _ForEachIndex};}forEach _arr;
{_arr deleteAt _x}forEach _index;
``` 😄
_array = [player, objNull, objNull, player, objNull, objNull, player];
{if(isNull _x)then{_array deleteAt _ForEachIndex};}forEach _array;
array will be [player, null, player, null, player]
same thing, after you'll do deleteAt, indexes will change and you'll delete wrong elements
switch Sort